Java Spring静态资源映射不工作

Java Spring静态资源映射不工作,java,css,spring-mvc,Java,Css,Spring Mvc,我意识到以前有人问过这个问题。但我已经尝试了所有建议的解决方案,但仍然不起作用。就其本身而言,我没有收到任何错误。反正我也看不见。但我的css加载也不是这样。以下是相关信息: SpringWebAppInitializer.java public class SpringWebAppInitializer implements WebApplicationInitializer { @Override public void onStartup(ServletContext container)

我意识到以前有人问过这个问题。但我已经尝试了所有建议的解决方案,但仍然不起作用。就其本身而言,我没有收到任何错误。反正我也看不见。但我的css加载也不是这样。以下是相关信息:

SpringWebAppInitializer.java

public class SpringWebAppInitializer implements WebApplicationInitializer {
@Override
public void onStartup(ServletContext container) throws ServletException {
    AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext();
    context.register(ApplicationContextConfig.class);
    context.setServletContext(container);
    ServletRegistration.Dynamic dispatcher = container.addServlet("SpringDispatcher", new DispatcherServlet(context));
    dispatcher.setLoadOnStartup(1);
    dispatcher.addMapping("/");
}}
ApplicationContextConfig

@EnableWebMvc
@Configuration
@ComponentScan(basePackages ="com.lisawestberg.noxml.controller")
@EnableTransactionManagement
public class ApplicationContextConfig extends WebMvcConfigurerAdapter {

@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
    registry
            .addResourceHandler("/resources/**")
            .addResourceLocations("/resources/");
}

@Bean(name = "viewResolver")
public InternalResourceViewResolver getViewResolver() {
    InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
    viewResolver.setPrefix("/WEB-INF/pages/");
    viewResolver.setSuffix(".jsp");
    return viewResolver;
}

@Bean(name = "dataSource")
public DataSource getDataSource() {
    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName("org.apache.derby.jdbc.ClientDriver");
    dataSource.setUrl("jdbc:derby://localhost:1527/School");
    dataSource.setUsername("root");
    dataSource.setPassword("rootroot");
    return dataSource;
}

private Properties getHibernateProperties() {
    Properties properties = new Properties();
    properties.put("hibernate.show_sql", "true");
    return properties;
}

@Autowired
@Bean(name = "sessionFactory")
public SessionFactory getSessionFactory(DataSource dataSource) {
    LocalSessionFactoryBuilder sessionBuilder = new LocalSessionFactoryBuilder(dataSource);
    sessionBuilder.addProperties(getHibernateProperties());
    sessionBuilder
            .addAnnotatedClasses(Course.class);
    return sessionBuilder.buildSessionFactory();
}

@Autowired
@Bean(name = "transactionManager")
public HibernateTransactionManager getTransactionManager(SessionFactory sessionFactory) {
    HibernateTransactionManager transactionManager = new HibernateTransactionManager(sessionFactory);
    return transactionManager;
}

@Autowired
@Bean(name = "CourseDao")
public CourseDAO getCourseDao(SessionFactory sessionFactory) {
    return new CourseDaoImpl(sessionFactory);
}}
Launching GlassFish on Felix platform
    May 15, 2016 2:41:04 PM     com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner    createBundleProvisioner
    INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
    Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@3108b784 in service registry.
    Cannot find the resource bundle for the name com.sun.logging.enterprise.system.container.ejb for class org.glassfish.kernel.javaee.MEJBService using org.glassfish.main.core.javaee-kernel [134]
    #!## LogManagerService.postConstruct : rootFolder=C:\Program     Files\payara41\glassfish
    #!## LogManagerService.postConstruct : templateDir=C:\Program Files\payara41\glassfish\lib\templates
    #!## LogManagerService.postConstruct : src=C:\Program Files\payara41\glassfish\lib\templates\logging.properties
    #!## LogManagerService.postConstruct : dest=C:\Program Files\payara41\glassfish\domains\domain1\config\logging.properties
    Info:   Running Payara Version: Payara Server  4.1.1.161.1 #badassfish (build 63)
    Info:   Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter
Info:   Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
Info:   Registered fish.payara.ha.hazelcast.store.HazelcastBackingStoreFactoryProxy for persistence-type = hazelcast in BackingStoreFactoryRegistry
Info:   Registered Hazelcast BackingStoreFactory with persistence-type = hazelcast
Info:   Authorization Service has successfully initialized.
Info:   Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Info:   Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Info:   Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
Info:   Grizzly Framework 2.3.23 started in: 162ms - bound to [/0.0.0.0:9090]
Info:   Grizzly Framework 2.3.23 started in: 24ms - bound to [/0.0.0.0:8181]
Info:   Grizzly Framework 2.3.23 started in: 10ms - bound to [/0.0.0.0:4848]
Info:   Grizzly Framework 2.3.23 started in: 2ms - bound to [/0.0.0.0:3700]
Info:   Java security manager is disabled.
Info:   Entering Security Startup Service.
Info:   Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
Info:   Security Service(s) started successfully.
Info:   Created HTTP listener http-listener-1 on host/port 0.0.0.0:9090
Info:   Created HTTP listener http-listener-2 on host/port 0.0.0.0:8181
Info:   Created HTTP listener admin-listener on host/port 0.0.0.0:4848
Info:   Created virtual server server
Info:   Created virtual server __asadmin
Info:   Setting JAAS app name glassfish-web
Info:   Virtual server server loaded default web module 
Info:   WebModule[null] ServletContext.log():1 Spring WebApplicationInitializers detected on classpath
Info:   Initializing Mojarra 2.2.12 ( 20150720-0848 https://svn.java.net/svn/mojarra~svn/tags/2.2.12@14885) for context '/noxml'
Info:   HV000001: Hibernate Validator 5.1.2.Final
Info:   WebModule[null] ServletContext.log():Initializing Spring FrameworkServlet 'SpringDispatcher'
Info:   FrameworkServlet 'SpringDispatcher': initialization started
Info:   Refreshing WebApplicationContext for namespace 'SpringDispatcher-servlet': startup date [Sun May 15 14:41:14 CEST 2016]; root of context hierarchy
Info:   Registering annotated classes: [class com.lisawestberg.noxml.config.ApplicationContextConfig]
Info:   JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
Info:   Loaded JDBC driver: org.apache.derby.jdbc.ClientDriver
Info:   HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
Info:   HHH000412: Hibernate Core {4.3.11.Final}
Info:   HHH000206: hibernate.properties not found
Info:   HHH000021: Bytecode provider name : javassist
Info:   HHH000400: Using dialect: org.hibernate.dialect.DerbyTenSevenDialect
Info:   HHH000399: Using default transaction strategy (direct JDBC transactions)
Info:   HHH000397: Using ASTQueryTranslatorFactory
Info:   Mapped "{[/]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.handleRequest() throws java.lang.Exception
Info:   Mapped "{[/save],methods=[POST]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.saveCourse(com.lisawestberg.noxml.entity.Course)
Info:   Mapped "{[/new],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.newCourse()
Info:   Mapped "{[/edit],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.editCourse(javax.servlet.http.HttpServletRequest)
Info:   Mapped "{[/delete],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.deleteCourse(javax.servlet.http.HttpServletRequest)
Info:   Mapped URL path [/resources/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
Info:   Looking for @ControllerAdvice: WebApplicationContext for namespace 'SpringDispatcher-servlet': startup date [Sun May 15 14:41:14 CEST 2016]; root of context hierarchy
Info:   Using DataSource [org.springframework.jdbc.datasource.DriverManagerDataSource@63136c5b] of Hibernate SessionFactory for HibernateTransactionManager
Info:   FrameworkServlet 'SpringDispatcher': initialization completed in 6789 ms
Info:   Loading application [noxml] at [/noxml]
    Info:   Loading application noxml done in 14,361 ms
Info:   Payara Server  4.1.1.161.1 #badassfish (63) startup time : Felix (2,677ms), startup services(15,350ms), total(18,027ms)
Info:   Cleaning JarFileFactory Cache to prevent jar FD leaks
Info:   Grizzly Framework 2.3.23 started in: 30ms - bound to [/0.0.0.0:7676]
Info:   JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://DESKTOP-UTDNPN2.lan:8686/jndi/rmi://DESKTOP-UTDNPN2.lan:8686/jmxrmi
Info:   Created HTTP listener http-listener-2 on host/port 0.0.0.0:8181
Info:   Grizzly Framework 2.3.23 started in: 4ms - bound to [/0.0.0.0:8181]
Info:   Created HTTP listener http-listener-1 on host/port 0.0.0.0:9090
Info:   Grizzly Framework 2.3.23 started in: 15ms - bound to [/0.0.0.0:9090]
Info:   WebModule[null] ServletContext.log():Destroying Spring FrameworkServlet 'SpringDispatcher'
Info:   Closing WebApplicationContext for namespace 'SpringDispatcher-servlet': startup date [Sun May 15 14:41:14 CEST 2016]; root of context hierarchy
Severe:   Cannot find the resource bundle for the name com.sun.logging.enterprise.system.core for class com.sun.ejb.containers.interceptors.JavaEEInterceptorBuilderImpl using org.glassfish.main.ejb.ejb-container [73]
Severe:   Cannot find the resource bundle for the name com.sun.logging.enterprise.resource.corba for class org.glassfish.enterprise.iiop.impl.GlassFishORBManager using org.glassfish.main.orb.iiop [222]
Info:   Listening to REST requests at context: /management/domain.
Info:   Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@7c1812b3 as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@4e31c3ec.
Info:   WebModule[null] ServletContext.log():1 Spring WebApplicationInitializers detected on classpath
Info:   Initializing Mojarra 2.2.12 ( 20150720-0848 https://svn.java.net/svn/mojarra~svn/tags/2.2.12@14885) for context '/noxml'
Info:   Initializing Mojarra 2.2.12 ( 20150720-0848 https://svn.java.net/svn/mojarra~svn/tags/2.2.12@14885) for context ''
Info:   WebModule[null] ServletContext.log():Initializing Spring FrameworkServlet 'SpringDispatcher'
Info:   FrameworkServlet 'SpringDispatcher': initialization started
Info:   Refreshing WebApplicationContext for namespace 'SpringDispatcher-servlet': startup date [Sun May 15 14:41:29 CEST 2016]; root of context hierarchy
Info:   Loading application [__admingui] at [/]
Info:   Loading application __admingui done in 2,567 ms
Info:   Registering annotated classes: [class com.lisawestberg.noxml.config.ApplicationContextConfig]
Info:   JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
Info:   Loaded JDBC driver: org.apache.derby.jdbc.ClientDriver
Info:   HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
Info:   HHH000412: Hibernate Core {4.3.11.Final}
Info:   HHH000206: hibernate.properties not found
Info:   HHH000021: Bytecode provider name : javassist
Info:   HHH000400: Using dialect: org.hibernate.dialect.DerbyTenSevenDialect
Info:   HHH000399: Using default transaction strategy (direct JDBC transactions)
Info:   HHH000397: Using ASTQueryTranslatorFactory
Info:   Mapped "{[/]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.handleRequest() throws java.lang.Exception
Info:   Mapped "{[/save],methods=[POST]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.saveCourse(com.lisawestberg.noxml.entity.Course)
Info:   Mapped "{[/new],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.newCourse()
Info:   Mapped "{[/edit],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.editCourse(javax.servlet.http.HttpServletRequest)
Info:   Mapped "{[/delete],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.deleteCourse(javax.servlet.http.HttpServletRequest)
Info:   Mapped URL path [/resources/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
Info:   Looking for @ControllerAdvice: WebApplicationContext for namespace 'SpringDispatcher-servlet': startup date [Sun May 15 14:41:29 CEST 2016]; root of context hierarchy
Info:   Using DataSource [org.springframework.jdbc.datasource.DriverManagerDataSource@12e15b8a] of Hibernate SessionFactory for HibernateTransactionManager
Info:   FrameworkServlet 'SpringDispatcher': initialization completed in 4320 ms
Info:   Loading application [noxml] at [/noxml]
Info:   noxml was successfully deployed in 8,755 milliseconds.
Info:   Hibernate: select this_.ID as ID1_0_0_, this_.NAME as NAME2_0_0_ from COURSE this_
Info:   Hibernate: select this_.ID as ID1_0_0_, this_.NAME as NAME2_0_0_ from COURSE this_
CourseController

@Controller
public class CourseController {

@Autowired
private CourseDAO dao;

@RequestMapping("/")
public ModelAndView handleRequest() throws Exception {
        List<Course> listCourses = dao.list();
        ModelAndView model = new ModelAndView("course");
        model.addObject("course", listCourses);
        return model;
}

@RequestMapping(value = "/new", method = RequestMethod.GET)
public ModelAndView newCourse() {
    ModelAndView model = new ModelAndView("CourseForm");
    model.addObject("course", new Course());
    return model;       
}

@RequestMapping(value = "/edit", method = RequestMethod.GET)
public ModelAndView editCourse(HttpServletRequest request) {
    int courseId = Integer.parseInt(request.getParameter("id"));
    Course course = dao.get(courseId);
    ModelAndView model = new ModelAndView("CourseForm");
    model.addObject("course", course);
    return model;       
}

@RequestMapping(value = "/delete", method = RequestMethod.GET)
public ModelAndView deleteCourse(HttpServletRequest request) {
    int courseId = Integer.parseInt(request.getParameter("id"));
    dao.delete(courseId);
    return new ModelAndView("redirect:/");      
}

@RequestMapping(value = "/save", method = RequestMethod.POST)
public ModelAndView saveCourse(@ModelAttribute Course course) {
    dao.saveOrUpdate(course);
    return new ModelAndView("redirect:/");
}}

您可以右键单击网页,打开“查看页面源代码”并查看链接映射到的内容吗。它看起来应该是
谢谢,再见!我相信你在某种意义上是对的。它没有映射完整的uri。只有从资源开始。所以我添加了${pageContext.request.contextPath},它似乎做到了这一点。我还认为服务器缓存在某种程度上也应该受到责备,因为我以前尝试过完整的uri,但它不起作用。所以我删除了服务器缓存,在我添加了contextPath之后,它开始工作。你能右键点击网页,打开“查看页面源代码”,看看链接映射到了什么吗。它看起来应该是
谢谢,再见!我相信你在某种意义上是对的。它没有映射完整的uri。只有从资源开始。所以我添加了${pageContext.request.contextPath},它似乎做到了这一点。我还认为服务器缓存在某种程度上也应该受到责备,因为我以前尝试过完整的uri,但它不起作用。因此,我删除了服务器缓存,在添加contextPath后,它开始工作。
Launching GlassFish on Felix platform
    May 15, 2016 2:41:04 PM     com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner    createBundleProvisioner
    INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
    Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@3108b784 in service registry.
    Cannot find the resource bundle for the name com.sun.logging.enterprise.system.container.ejb for class org.glassfish.kernel.javaee.MEJBService using org.glassfish.main.core.javaee-kernel [134]
    #!## LogManagerService.postConstruct : rootFolder=C:\Program     Files\payara41\glassfish
    #!## LogManagerService.postConstruct : templateDir=C:\Program Files\payara41\glassfish\lib\templates
    #!## LogManagerService.postConstruct : src=C:\Program Files\payara41\glassfish\lib\templates\logging.properties
    #!## LogManagerService.postConstruct : dest=C:\Program Files\payara41\glassfish\domains\domain1\config\logging.properties
    Info:   Running Payara Version: Payara Server  4.1.1.161.1 #badassfish (build 63)
    Info:   Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter
Info:   Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
Info:   Registered fish.payara.ha.hazelcast.store.HazelcastBackingStoreFactoryProxy for persistence-type = hazelcast in BackingStoreFactoryRegistry
Info:   Registered Hazelcast BackingStoreFactory with persistence-type = hazelcast
Info:   Authorization Service has successfully initialized.
Info:   Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Info:   Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Info:   Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
Info:   Grizzly Framework 2.3.23 started in: 162ms - bound to [/0.0.0.0:9090]
Info:   Grizzly Framework 2.3.23 started in: 24ms - bound to [/0.0.0.0:8181]
Info:   Grizzly Framework 2.3.23 started in: 10ms - bound to [/0.0.0.0:4848]
Info:   Grizzly Framework 2.3.23 started in: 2ms - bound to [/0.0.0.0:3700]
Info:   Java security manager is disabled.
Info:   Entering Security Startup Service.
Info:   Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
Info:   Security Service(s) started successfully.
Info:   Created HTTP listener http-listener-1 on host/port 0.0.0.0:9090
Info:   Created HTTP listener http-listener-2 on host/port 0.0.0.0:8181
Info:   Created HTTP listener admin-listener on host/port 0.0.0.0:4848
Info:   Created virtual server server
Info:   Created virtual server __asadmin
Info:   Setting JAAS app name glassfish-web
Info:   Virtual server server loaded default web module 
Info:   WebModule[null] ServletContext.log():1 Spring WebApplicationInitializers detected on classpath
Info:   Initializing Mojarra 2.2.12 ( 20150720-0848 https://svn.java.net/svn/mojarra~svn/tags/2.2.12@14885) for context '/noxml'
Info:   HV000001: Hibernate Validator 5.1.2.Final
Info:   WebModule[null] ServletContext.log():Initializing Spring FrameworkServlet 'SpringDispatcher'
Info:   FrameworkServlet 'SpringDispatcher': initialization started
Info:   Refreshing WebApplicationContext for namespace 'SpringDispatcher-servlet': startup date [Sun May 15 14:41:14 CEST 2016]; root of context hierarchy
Info:   Registering annotated classes: [class com.lisawestberg.noxml.config.ApplicationContextConfig]
Info:   JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
Info:   Loaded JDBC driver: org.apache.derby.jdbc.ClientDriver
Info:   HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
Info:   HHH000412: Hibernate Core {4.3.11.Final}
Info:   HHH000206: hibernate.properties not found
Info:   HHH000021: Bytecode provider name : javassist
Info:   HHH000400: Using dialect: org.hibernate.dialect.DerbyTenSevenDialect
Info:   HHH000399: Using default transaction strategy (direct JDBC transactions)
Info:   HHH000397: Using ASTQueryTranslatorFactory
Info:   Mapped "{[/]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.handleRequest() throws java.lang.Exception
Info:   Mapped "{[/save],methods=[POST]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.saveCourse(com.lisawestberg.noxml.entity.Course)
Info:   Mapped "{[/new],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.newCourse()
Info:   Mapped "{[/edit],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.editCourse(javax.servlet.http.HttpServletRequest)
Info:   Mapped "{[/delete],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.deleteCourse(javax.servlet.http.HttpServletRequest)
Info:   Mapped URL path [/resources/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
Info:   Looking for @ControllerAdvice: WebApplicationContext for namespace 'SpringDispatcher-servlet': startup date [Sun May 15 14:41:14 CEST 2016]; root of context hierarchy
Info:   Using DataSource [org.springframework.jdbc.datasource.DriverManagerDataSource@63136c5b] of Hibernate SessionFactory for HibernateTransactionManager
Info:   FrameworkServlet 'SpringDispatcher': initialization completed in 6789 ms
Info:   Loading application [noxml] at [/noxml]
    Info:   Loading application noxml done in 14,361 ms
Info:   Payara Server  4.1.1.161.1 #badassfish (63) startup time : Felix (2,677ms), startup services(15,350ms), total(18,027ms)
Info:   Cleaning JarFileFactory Cache to prevent jar FD leaks
Info:   Grizzly Framework 2.3.23 started in: 30ms - bound to [/0.0.0.0:7676]
Info:   JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://DESKTOP-UTDNPN2.lan:8686/jndi/rmi://DESKTOP-UTDNPN2.lan:8686/jmxrmi
Info:   Created HTTP listener http-listener-2 on host/port 0.0.0.0:8181
Info:   Grizzly Framework 2.3.23 started in: 4ms - bound to [/0.0.0.0:8181]
Info:   Created HTTP listener http-listener-1 on host/port 0.0.0.0:9090
Info:   Grizzly Framework 2.3.23 started in: 15ms - bound to [/0.0.0.0:9090]
Info:   WebModule[null] ServletContext.log():Destroying Spring FrameworkServlet 'SpringDispatcher'
Info:   Closing WebApplicationContext for namespace 'SpringDispatcher-servlet': startup date [Sun May 15 14:41:14 CEST 2016]; root of context hierarchy
Severe:   Cannot find the resource bundle for the name com.sun.logging.enterprise.system.core for class com.sun.ejb.containers.interceptors.JavaEEInterceptorBuilderImpl using org.glassfish.main.ejb.ejb-container [73]
Severe:   Cannot find the resource bundle for the name com.sun.logging.enterprise.resource.corba for class org.glassfish.enterprise.iiop.impl.GlassFishORBManager using org.glassfish.main.orb.iiop [222]
Info:   Listening to REST requests at context: /management/domain.
Info:   Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@7c1812b3 as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@4e31c3ec.
Info:   WebModule[null] ServletContext.log():1 Spring WebApplicationInitializers detected on classpath
Info:   Initializing Mojarra 2.2.12 ( 20150720-0848 https://svn.java.net/svn/mojarra~svn/tags/2.2.12@14885) for context '/noxml'
Info:   Initializing Mojarra 2.2.12 ( 20150720-0848 https://svn.java.net/svn/mojarra~svn/tags/2.2.12@14885) for context ''
Info:   WebModule[null] ServletContext.log():Initializing Spring FrameworkServlet 'SpringDispatcher'
Info:   FrameworkServlet 'SpringDispatcher': initialization started
Info:   Refreshing WebApplicationContext for namespace 'SpringDispatcher-servlet': startup date [Sun May 15 14:41:29 CEST 2016]; root of context hierarchy
Info:   Loading application [__admingui] at [/]
Info:   Loading application __admingui done in 2,567 ms
Info:   Registering annotated classes: [class com.lisawestberg.noxml.config.ApplicationContextConfig]
Info:   JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
Info:   Loaded JDBC driver: org.apache.derby.jdbc.ClientDriver
Info:   HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
Info:   HHH000412: Hibernate Core {4.3.11.Final}
Info:   HHH000206: hibernate.properties not found
Info:   HHH000021: Bytecode provider name : javassist
Info:   HHH000400: Using dialect: org.hibernate.dialect.DerbyTenSevenDialect
Info:   HHH000399: Using default transaction strategy (direct JDBC transactions)
Info:   HHH000397: Using ASTQueryTranslatorFactory
Info:   Mapped "{[/]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.handleRequest() throws java.lang.Exception
Info:   Mapped "{[/save],methods=[POST]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.saveCourse(com.lisawestberg.noxml.entity.Course)
Info:   Mapped "{[/new],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.newCourse()
Info:   Mapped "{[/edit],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.editCourse(javax.servlet.http.HttpServletRequest)
Info:   Mapped "{[/delete],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView com.lisawestberg.noxml.controller.CourseController.deleteCourse(javax.servlet.http.HttpServletRequest)
Info:   Mapped URL path [/resources/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
Info:   Looking for @ControllerAdvice: WebApplicationContext for namespace 'SpringDispatcher-servlet': startup date [Sun May 15 14:41:29 CEST 2016]; root of context hierarchy
Info:   Using DataSource [org.springframework.jdbc.datasource.DriverManagerDataSource@12e15b8a] of Hibernate SessionFactory for HibernateTransactionManager
Info:   FrameworkServlet 'SpringDispatcher': initialization completed in 4320 ms
Info:   Loading application [noxml] at [/noxml]
Info:   noxml was successfully deployed in 8,755 milliseconds.
Info:   Hibernate: select this_.ID as ID1_0_0_, this_.NAME as NAME2_0_0_ from COURSE this_
Info:   Hibernate: select this_.ID as ID1_0_0_, this_.NAME as NAME2_0_0_ from COURSE this_