2016-08-02 10 views
1

Ich bekomme NullPointerException bei Unterlauf und Spring-Boot 1.4 ausgeführt.Fehler mit Sog und Spring-Boot 1.4

Sie diesen Fehler sehen können, wenn Sie joinfaces-example mit

java -jar Ziel/run joinfaces-example-2.1.3-SNAPSHOT.jar

Ich erkannte, dass der Fehler nicht auftritt, wenn ich debuggen Sie das Projekt in IDE (NetBeans).

Mehr, begann dieser Fehler, wenn ich Spring Boot auf 1.4 aktualisiert. Kein Fehler tritt auf, wenn ich jsf-spring-boot-parent-Version zu 2.0.0 ändere, die Springboot 1.3-Version verwendet.

Dieser Fehler kann auftreten, wenn StartupServletContextListener nicht aktiviert ist. Es wird von UndertowMyfacesSpringBootAutoConfiguration erstellt. Debug sagte er aktiviert wird:

 
    UndertowMyfacesSpringBootAutoConfiguration matched 
     - @ConditionalOnClass classes found: io.undertow.Undertow,org.apache.myfaces.webapp.StartupServletContextListener (OnClassCondition) 

Stapelüberwachung oben:

 
java.lang.NullPointerException: null at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:62) ~[myfaces-bundle-2.2.10.jar!/:2.2.10] 
    at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:172) ~[myfaces-bundle-2.2.10.jar!/:2.2.10] 
    at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:121) [myfaces-bundle-2.2.10.jar!/:2.2.10] 
    at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187) [undertow-servlet-1.3.23.Final.jar!/:1.3.23.Final] 
    at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:198) [undertow-servlet-1.3.23.Final.jar!/:1.3.23.Final] 
    at org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServletContainerFactory.createDeploymentManager(UndertowEmbeddedServletContainerFactory.java:390) [spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE] 
    at org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServletContainerFactory.getEmbeddedServletContainer(UndertowEmbeddedServletContainerFactory.java:224) [spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE] 
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:164) [spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE] 
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134) [spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE] 
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:535) [spring-context-4.3.2.RELEASE.jar!/:4.3.2.RELEASE] 
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) [spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE] 
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE] 
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369) [spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) [spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1185) [spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1174) [spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE] 
    at org.joinfaces.example.JoinFacesExampleApplication.main(JoinFacesExampleApplication.java:10) [classes!/:2.1.4-SNAPSHOT] 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101] 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_101] 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_101] 
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_101] 
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [joinfaces-example-2.1.4-SNAPSHOT.jar:2.1.4-SNAPSHOT] 
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [joinfaces-example-2.1.4-SNAPSHOT.jar:2.1.4-SNAPSHOT] 
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [joinfaces-example-2.1.4-SNAPSHOT.jar:2.1.4-SNAPSHOT] 
    at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:58) [joinfaces-example-2.1.4-SNAPSHOT.jar:2.1.4-SNAPSHOT] 
+0

Was ist die Stack-Spur der NPE? –

+0

Ich habe gerade die Frage @AndyWilkinson bearbeitet. –

Antwort

Verwandte Themen