Re: NullPointerException - com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209) of "Apache Struts 2 Web Application Development" book
As per your suggestion, changing struts2 version to 2.1.8 fix the problem. Thanks! On Sun, Nov 12, 2017 at 12:29 PM, Yasser Zamani wrote: > > > On 11/12/2017 2:28 AM, albert kao wrote: > > java.lang.NullPointerException > > com.opensymphony.xwork2.util.FileManager$FileRevision. > needsReloading(FileManager.java:209) > > I just googled "needsReloading(FileManager.java:209)" and found [1] :) > it seems has been a bug and has fixed in 2.1.8. > > [1] https://issues.apache.org/jira/browse/WW-2956 > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org >
Re: NullPointerException - com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209) of "Apache Struts 2 Web Application Development" book
On 11/12/2017 2:28 AM, albert kao wrote: > java.lang.NullPointerException > com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209) I just googled "needsReloading(FileManager.java:209)" and found [1] :) it seems has been a bug and has fixed in 2.1.8. [1] https://issues.apache.org/jira/browse/WW-2956 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: NullPointerException - com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209) of "Apache Struts 2 Web Application Development" book
Please create a GitHub repo with your code and I'll take a look. Note that the examples from the book were tested only on Tomcat, and a pretty long time ago. I'll need any server details you're using. Also note that S2 is fairly different now than when the book was written. On Sun, Nov 12, 2017 at 8:26 AM albert kao wrote: > struts2 version: 2.1.6 > > On Sat, Nov 11, 2017 at 9:47 PM, Dave Newton > wrote: > > > What version of Struts 2 are you attempting to use? > > > > On Sat, Nov 11, 2017 at 5:58 PM albert kao wrote: > > > > > I downloaded the source code of the book "Apache Struts 2 Web > Application > > > Development" by Dave Newton from the > > > https://www.packtpub.com/books/content/support. > > > > > > Chapter 2 had compile error with Apache Maven 3.5.0. > > > $ mvn -version > > > Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; > > > 2017-04-03T15:39:06-04:00) > > > Maven home: /home/alkao/maven/apache-maven-3.5.0 > > > Java version: 1.8.0_144, vendor: Oracle Corporation > > > Java home: /home/alkao/jdk/jdk1.8.0_144/jre > > > Default locale: en_CA, platform encoding: UTF-8 > > > OS name: "linux", version: "4.4.0-21-generic", arch: "i386", family: > > "unix" > > > > > > To fix it, I removed just the tag in pom.xml. > > > Then run mvn: > > > $ cd > > > /home/alkao/Struts2/Apache_Struts_2_Web_Application_ > > Development/ch02/sanity > > > $ mvn clean package > > > > > > Running wildfly-10.1.0.Final: > > > $ JBOSS_HOME/bin/standalone.sh > > > $ jboss-cli.sh --connect --command="deploy > > > > > > /home/alkao/Struts2/Apache_Struts_2_Web_Application_ > > Development/ch02/sanity/target/ch02-sanity-1.0.war > > > --force" > > > > > > Running these 3 http links resulted in the same error in the web > browser > > > below. > > > Please help. Thanks. > > > http://localhost:8080/ch02-sanity-1.0/index.html > > > http://localhost:8080/ch02-sanity-1.0/sanity.jsp > > > http://localhost:8080/ch02-sanity-1.0/sanity.action > > > > > > > > > > > > > > > Error processing request > > > Context Path: > > > /ch02-convention-1.0 > > > > > > Servlet Path: > > > /index.html > > > > > > Path Info: > > > null > > > > > > Query String: > > > null > > > > > > Stack Trace > > > java.lang.NullPointerException > > > > > > com.opensymphony.xwork2.util.FileManager$FileRevision. > > needsReloading(FileManager.java:209) > > > > > > com.opensymphony.xwork2.util.FileManager.fileNeedsReloading( > > FileManager.java:60) > > > > > > com.opensymphony.xwork2.config.providers.XmlConfigurationProvider. > > needsReload(XmlConfigurationProvider.java:325) > > > > > > org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload( > > StrutsXmlConfigurationProvider.java:168) > > > > > > com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload( > > ConfigurationManager.java:220) > > > > > > com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration( > > ConfigurationManager.java:61) > > > org.apache.struts2.dispatcher.Dispatcher.getContainer( > > Dispatcher.java:774) > > > > > > > org.apache.struts2.dispatcher.ng.InitOperations.initStaticContentLoader( > > InitOperations.java:77) > > > > > > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter. > > init(StrutsPrepareAndExecuteFilter.java:49) > > > > > > io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed( > > LifecyleInterceptorInvocation.java:111) > > > > > > org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init( > > RunAsLifecycleInterceptor.java:84) > > > > > > io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed( > > LifecyleInterceptorInvocation.java:97) > > > io.undertow.servlet.core.ManagedFilter.createFilter( > > ManagedFilter.java:80) > > > io.undertow.servlet.core.ManagedFilter.getFilter(ManagedFilter.java:66) > > > io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) > > > > > > io.undertow.servlet.handlers.FilterHandler$FilterChainImpl. > > doFilter(FilterHandler.java:131) > > > > > > io.undertow.servlet.handlers.FilterHandler.handleRequest( > > FilterHandler.java:84) > > > > > > io.undertow.servlet.handlers.security.ServletSecurityRoleHandler. > > handleRequest(ServletSecurityRoleHandler.java:62) > > > > > > io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest( > > ServletDispatchingHandler.java:36) > > > > > > org.wildfly.extension.undertow.security.SecurityContextAssociationHand > > ler.handleRequest(SecurityContextAssociationHandler.java:78) > > > > > > io.undertow.server.handlers.PredicateHandler.handleRequest( > > PredicateHandler.java:43) > > > > > > io.undertow.servlet.handlers.security.SSLInformationAssociationHandl > > er.handleRequest(SSLInformationAssociationHandler.java:131) > > > > > > io.undertow.servlet.handlers.security.ServletAuthenticationCallHandl > > er.handleRequest(ServletAuthenticationCallHandler.java:57) > > > > > > io.undertow.server.handlers.PredicateHandler.handleRequest( > > PredicateHandler.java:43) > > > > > > io.undertow.s
Re: NullPointerException - com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209) of "Apache Struts 2 Web Application Development" book
struts2 version: 2.1.6 On Sat, Nov 11, 2017 at 9:47 PM, Dave Newton wrote: > What version of Struts 2 are you attempting to use? > > On Sat, Nov 11, 2017 at 5:58 PM albert kao wrote: > > > I downloaded the source code of the book "Apache Struts 2 Web Application > > Development" by Dave Newton from the > > https://www.packtpub.com/books/content/support. > > > > Chapter 2 had compile error with Apache Maven 3.5.0. > > $ mvn -version > > Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; > > 2017-04-03T15:39:06-04:00) > > Maven home: /home/alkao/maven/apache-maven-3.5.0 > > Java version: 1.8.0_144, vendor: Oracle Corporation > > Java home: /home/alkao/jdk/jdk1.8.0_144/jre > > Default locale: en_CA, platform encoding: UTF-8 > > OS name: "linux", version: "4.4.0-21-generic", arch: "i386", family: > "unix" > > > > To fix it, I removed just the tag in pom.xml. > > Then run mvn: > > $ cd > > /home/alkao/Struts2/Apache_Struts_2_Web_Application_ > Development/ch02/sanity > > $ mvn clean package > > > > Running wildfly-10.1.0.Final: > > $ JBOSS_HOME/bin/standalone.sh > > $ jboss-cli.sh --connect --command="deploy > > > > /home/alkao/Struts2/Apache_Struts_2_Web_Application_ > Development/ch02/sanity/target/ch02-sanity-1.0.war > > --force" > > > > Running these 3 http links resulted in the same error in the web browser > > below. > > Please help. Thanks. > > http://localhost:8080/ch02-sanity-1.0/index.html > > http://localhost:8080/ch02-sanity-1.0/sanity.jsp > > http://localhost:8080/ch02-sanity-1.0/sanity.action > > > > > > > > > > Error processing request > > Context Path: > > /ch02-convention-1.0 > > > > Servlet Path: > > /index.html > > > > Path Info: > > null > > > > Query String: > > null > > > > Stack Trace > > java.lang.NullPointerException > > > > com.opensymphony.xwork2.util.FileManager$FileRevision. > needsReloading(FileManager.java:209) > > > > com.opensymphony.xwork2.util.FileManager.fileNeedsReloading( > FileManager.java:60) > > > > com.opensymphony.xwork2.config.providers.XmlConfigurationProvider. > needsReload(XmlConfigurationProvider.java:325) > > > > org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload( > StrutsXmlConfigurationProvider.java:168) > > > > com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload( > ConfigurationManager.java:220) > > > > com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration( > ConfigurationManager.java:61) > > org.apache.struts2.dispatcher.Dispatcher.getContainer( > Dispatcher.java:774) > > > > org.apache.struts2.dispatcher.ng.InitOperations.initStaticContentLoader( > InitOperations.java:77) > > > > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter. > init(StrutsPrepareAndExecuteFilter.java:49) > > > > io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed( > LifecyleInterceptorInvocation.java:111) > > > > org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init( > RunAsLifecycleInterceptor.java:84) > > > > io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed( > LifecyleInterceptorInvocation.java:97) > > io.undertow.servlet.core.ManagedFilter.createFilter( > ManagedFilter.java:80) > > io.undertow.servlet.core.ManagedFilter.getFilter(ManagedFilter.java:66) > > io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) > > > > io.undertow.servlet.handlers.FilterHandler$FilterChainImpl. > doFilter(FilterHandler.java:131) > > > > io.undertow.servlet.handlers.FilterHandler.handleRequest( > FilterHandler.java:84) > > > > io.undertow.servlet.handlers.security.ServletSecurityRoleHandler. > handleRequest(ServletSecurityRoleHandler.java:62) > > > > io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest( > ServletDispatchingHandler.java:36) > > > > org.wildfly.extension.undertow.security.SecurityContextAssociationHand > ler.handleRequest(SecurityContextAssociationHandler.java:78) > > > > io.undertow.server.handlers.PredicateHandler.handleRequest( > PredicateHandler.java:43) > > > > io.undertow.servlet.handlers.security.SSLInformationAssociationHandl > er.handleRequest(SSLInformationAssociationHandler.java:131) > > > > io.undertow.servlet.handlers.security.ServletAuthenticationCallHandl > er.handleRequest(ServletAuthenticationCallHandler.java:57) > > > > io.undertow.server.handlers.PredicateHandler.handleRequest( > PredicateHandler.java:43) > > > > io.undertow.security.handlers.AbstractConfidentialityHandler > .handleRequest(AbstractConfidentialityHandler.java:46) > > > > io.undertow.servlet.handlers.security.ServletConfidentialityConstrai > ntHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) > > > > io.undertow.security.handlers.AuthenticationMechanismsHandle > r.handleRequest(AuthenticationMechanismsHandler.java:60) > > > > io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHand > ler.handleRequest(CachedAuthenticatedSessionHandler.java:77) > > > > io.undertow.security.handlers.NotificationReceiverHandler.handle
Re: NullPointerException - com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209) of "Apache Struts 2 Web Application Development" book
What version of Struts 2 are you attempting to use? On Sat, Nov 11, 2017 at 5:58 PM albert kao wrote: > I downloaded the source code of the book "Apache Struts 2 Web Application > Development" by Dave Newton from the > https://www.packtpub.com/books/content/support. > > Chapter 2 had compile error with Apache Maven 3.5.0. > $ mvn -version > Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; > 2017-04-03T15:39:06-04:00) > Maven home: /home/alkao/maven/apache-maven-3.5.0 > Java version: 1.8.0_144, vendor: Oracle Corporation > Java home: /home/alkao/jdk/jdk1.8.0_144/jre > Default locale: en_CA, platform encoding: UTF-8 > OS name: "linux", version: "4.4.0-21-generic", arch: "i386", family: "unix" > > To fix it, I removed just the tag in pom.xml. > Then run mvn: > $ cd > /home/alkao/Struts2/Apache_Struts_2_Web_Application_Development/ch02/sanity > $ mvn clean package > > Running wildfly-10.1.0.Final: > $ JBOSS_HOME/bin/standalone.sh > $ jboss-cli.sh --connect --command="deploy > > /home/alkao/Struts2/Apache_Struts_2_Web_Application_Development/ch02/sanity/target/ch02-sanity-1.0.war > --force" > > Running these 3 http links resulted in the same error in the web browser > below. > Please help. Thanks. > http://localhost:8080/ch02-sanity-1.0/index.html > http://localhost:8080/ch02-sanity-1.0/sanity.jsp > http://localhost:8080/ch02-sanity-1.0/sanity.action > > > > > Error processing request > Context Path: > /ch02-convention-1.0 > > Servlet Path: > /index.html > > Path Info: > null > > Query String: > null > > Stack Trace > java.lang.NullPointerException > > com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209) > > com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(FileManager.java:60) > > com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:325) > > org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:168) > > com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:220) > > com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:61) > org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:774) > > org.apache.struts2.dispatcher.ng.InitOperations.initStaticContentLoader(InitOperations.java:77) > > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:49) > > io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:111) > > org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:84) > > io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:97) > io.undertow.servlet.core.ManagedFilter.createFilter(ManagedFilter.java:80) > io.undertow.servlet.core.ManagedFilter.getFilter(ManagedFilter.java:66) > io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) > > io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) > > io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) > > io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) > > io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) > > org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) > > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) > > io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) > > io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) > > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) > > io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) > > io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) > > io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) > > io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) > > io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50) > > io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) > > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) > > org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.ja
NullPointerException - com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209) of "Apache Struts 2 Web Application Development" book
I downloaded the source code of the book "Apache Struts 2 Web Application Development" by Dave Newton from the https://www.packtpub.com/books/content/support. Chapter 2 had compile error with Apache Maven 3.5.0. $ mvn -version Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T15:39:06-04:00) Maven home: /home/alkao/maven/apache-maven-3.5.0 Java version: 1.8.0_144, vendor: Oracle Corporation Java home: /home/alkao/jdk/jdk1.8.0_144/jre Default locale: en_CA, platform encoding: UTF-8 OS name: "linux", version: "4.4.0-21-generic", arch: "i386", family: "unix" To fix it, I removed just the tag in pom.xml. Then run mvn: $ cd /home/alkao/Struts2/Apache_Struts_2_Web_Application_Development/ch02/sanity $ mvn clean package Running wildfly-10.1.0.Final: $ JBOSS_HOME/bin/standalone.sh $ jboss-cli.sh --connect --command="deploy /home/alkao/Struts2/Apache_Struts_2_Web_Application_Development/ch02/sanity/target/ch02-sanity-1.0.war --force" Running these 3 http links resulted in the same error in the web browser below. Please help. Thanks. http://localhost:8080/ch02-sanity-1.0/index.html http://localhost:8080/ch02-sanity-1.0/sanity.jsp http://localhost:8080/ch02-sanity-1.0/sanity.action Error processing request Context Path: /ch02-convention-1.0 Servlet Path: /index.html Path Info: null Query String: null Stack Trace java.lang.NullPointerException com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209) com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(FileManager.java:60) com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:325) org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:168) com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:220) com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:61) org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:774) org.apache.struts2.dispatcher.ng.InitOperations.initStaticContentLoader(InitOperations.java:77) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:49) io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:111) org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:84) io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:97) io.undertow.servlet.core.ManagedFilter.createFilter(ManagedFilter.java:80) io.undertow.servlet.core.ManagedFilter.getFilter(ManagedFilter.java:66) io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50) io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) io.undertow.servlet.handlers.ServletIn