-
1. Re: Wildfly + Null Pointer Exception
jaikiran Jul 10, 2015 11:45 PM (in response to aashishdalmia)The NullPointerException is coming from a struts package. You will have to check what that class is trying to do and what object is null.
P.S: WildFly 9.0.0.Final has been released, so please try it against that version Announcement: WildFly 9.0.2.Final released
P.P.S: Please copy/paste the exception stacktraces in forums instead of attaching/inline an image about the stacktrace. That way it's easier to read and the thread/post will also show up next time someone searches for a similar exception.
-
2. Re: Wildfly + Null Pointer Exception
dlofthouse Jul 13, 2015 6:48 AM (in response to aashishdalmia)BTW when posting an exception please copy and paste the actual text, posting an image makes it impossible for other to search for other posts with the same stack / error.
-
3. Re: Wildfly + Null Pointer Exception
aashishdalmia Jul 13, 2015 11:58 AM (in response to jaikiran)Thanks for your reply.
1. When the debugger comes to the first line of the struts action class, the form and every other parameter is coming as null.
2. I will try wildfly 9 and see if it makes any difference. But I would like to fix it on 8 if possible.
3. I tried to copy/paste the error text on the post but the editor did not let me for some reason thus I had to put it in an image. Anyway, will try to do it next time and see if it lets me.
-
4. Re: Wildfly + Null Pointer Exception
aashishdalmia Jul 13, 2015 6:28 PM (in response to jaikiran)So, it is failing on Wildfly 9 as well. Same logs appeared-
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
14:09:21,603 ERROR [io.undertow.request] (default task-75) UT005023: Exception handling request to /abc.do: javax.servlet.ServletException: java.lang.NullPointerException
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286) [struts-core-1.3.10.jar:1.3.10]
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) [struts-core-1.3.10.jar:1.3.10]
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) [struts-core-1.3.10.jar:1.3.10]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:230) [spring-orm-4.1.4.RELEASE.jar:4.1.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at abc.common.app.servlet.CrossScriptingFilter.doFilter(CrossScriptingFilter.java:49) [sdscommonServlet.jar:]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:72) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:282) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:261) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:80) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:172) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:774) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_45]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_45]
Caused by: java.lang.NullPointerException
at java.lang.Class.isAssignableFrom(Native Method) [rt.jar:1.8.0_45]
at org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506) [struts-core-1.3.10.jar:1.3.10]
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459) [struts-core-1.3.10.jar:1.3.10]
at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50) [struts-core-1.3.10.jar:1.3.10]
at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60) [struts-core-1.3.10.jar:1.3.10]
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) [struts-core-1.3.10.jar:1.3.10]
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191) [commons-chain-1.2.jar:1.2]
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305) [commons-chain-1.2.jar:1.2]
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191) [commons-chain-1.2.jar:1.2]
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) [struts-core-1.3.10.jar:1.3.10]
... 43 more
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Any thoughts?
-
5. Re: Wildfly + Null Pointer Exception
ctomc Jul 13, 2015 5:40 PM (in response to aashishdalmia)I would recommend you upgrade to struts 2 as version 1 is EOL and really out of date.
it is quite possible that it doesn't work properly on java 8.
see Migration Guide for migration.
-
6. Re: Wildfly + Null Pointer Exception
aashishdalmia Jul 15, 2015 1:12 PM (in response to aashishdalmia)So apparently I reverted back to struts1.3.8 and it worked fine. Not sure why the upgrade to struts 1.3.10 was not working with wildfly, java8.