Skip to main content

Struts 2 Error - Help

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
diegores
Offline
Joined: 2011-09-29

Good morning staff

I'm new here in the forum and would like to have your help.



I am conducting a project with strtus2 and every time I run the system it returns the following error:

java.lang.NullPointerException

at com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(

at com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(

at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(

at org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(

at com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(

at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(

at org.apache.struts2.dispatcher.Dispatcher.getContainer(

at org.apache.struts2.dispatcher.ng.InitOperations.initStaticContentLoader(

at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(

at org.apache.catalina.core.ApplicationFilterConfig.getFilter(

at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(

at org.apache.catalina.core.ApplicationFilterConfig.<init>(

at org.apache.catalina.core.StandardContext.filterStart(

at org.apache.catalina.core.StandardContext.start(

at org.apache.catalina.core.ContainerBase.addChildInternal(

at org.apache.catalina.core.ContainerBase.addChild(

at org.apache.catalina.core.StandardHost.addChild(

at org.apache.catalina.startup.HostConfig.deployDirectory(

at org.apache.catalina.startup.HostConfig.deployDirectories(

at org.apache.catalina.startup.HostConfig.deployApps(

at org.apache.catalina.startup.HostConfig.start(

at org.apache.catalina.startup.HostConfig.lifecycleEvent(

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(

at org.apache.catalina.core.ContainerBase.start(

at org.apache.catalina.core.StandardHost.start(

at org.apache.catalina.core.ContainerBase.start(

at org.apache.catalina.core.StandardEngine.start(

at org.apache.catalina.core.StandardService.start(

at org.apache.catalina.core.StandardServer.start(

at org.apache.catalina.startup.Catalina.start(

at sun.reflect.NativeMethodAccessorImpl.invoke0(

at sun.reflect.NativeMethodAccessorImpl.invoke(

at sun.reflect.DelegatingMethodAccessorImpl.invoke(

at java.lang.reflect.Method.invoke(

at org.apache.catalina.startup.Bootstrap.start(

at org.apache.catalina.startup.Bootstrap.main(

2011-09-29 08:37:48,685 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/scg2]] - <Exception starting filter Struts2DispatcherFilter>

FileManager.java:209)FileManager.java:60)XmlConfigurationProvider.java:325)StrutsXmlConfigurationProvider.java:168)ConfigurationManager.java:220)ConfigurationManager.java:61)Dispatcher.java:774)InitOperations.java:77)StrutsPrepareAndExecuteFilter.java:49)ApplicationFilterConfig.java:221)ApplicationFilterConfig.java:302)ApplicationFilterConfig.java:78)StandardContext.java:3635)StandardContext.java:4222)ContainerBase.java:760)ContainerBase.java:740)StandardHost.java:544)HostConfig.java:920)HostConfig.java:883)HostConfig.java:492)HostConfig.java:1138)HostConfig.java:311)LifecycleSupport.java:120)ContainerBase.java:1022)StandardHost.java:736)ContainerBase.java:1014)StandardEngine.java:443)StandardService.java:448)StandardServer.java:700)Catalina.java:552)Native Method)NativeMethodAccessorImpl.java:39)DelegatingMethodAccessorImpl.java:25)Method.java:597)Bootstrap.java:295)Bootstrap.java:433)

java.lang.NullPointerException

at com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(

at com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(

at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(

at org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(

at com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(

at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(

at org.apache.struts2.dispatcher.Dispatcher.getContainer(

at org.apache.struts2.dispatcher.ng.InitOperations.initStaticContentLoader(

at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(

at org.apache.catalina.core.ApplicationFilterConfig.getFilter(

at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(

at org.apache.catalina.core.ApplicationFilterConfig.<init>(

at org.apache.catalina.core.StandardContext.filterStart(

at org.apache.catalina.core.StandardContext.start(

at org.apache.catalina.core.ContainerBase.addChildInternal(

at org.apache.catalina.core.ContainerBase.addChild(

at org.apache.catalina.core.StandardHost.addChild(

at org.apache.catalina.startup.HostConfig.deployDirectory(

at org.apache.catalina.startup.HostConfig.deployDirectories(

at org.apache.catalina.startup.HostConfig.deployApps(

at org.apache.catalina.startup.HostConfig.start(

at org.apache.catalina.startup.HostConfig.lifecycleEvent(

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(

at org.apache.catalina.core.ContainerBase.start(

at org.apache.catalina.core.StandardHost.start(

at org.apache.catalina.core.ContainerBase.start(

at org.apache.catalina.core.StandardEngine.start(

at org.apache.catalina.core.StandardService.start(

at org.apache.catalina.core.StandardServer.start(

at org.apache.catalina.startup.Catalina.start(

at sun.reflect.NativeMethodAccessorImpl.invoke0(

at sun.reflect.NativeMethodAccessorImpl.invoke(

at sun.reflect.DelegatingMethodAccessorImpl.invoke(

at java.lang.reflect.Method.invoke(

at org.apache.catalina.startup.Bootstrap.start(

at org.apache.catalina.startup.Bootstrap.main(

Here is my web.xml:

<?

<

xml version="1.0" encoding="UTF-8"?>web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee >

<display-name>SCG - Sistema de Controle e Gestão v2.0</display-name>

<context-param>

<param-name>log4jConfigLocation</param-name>

<param-value>

/WEB-INF/classes/log/log4j.properties

</param-value>

</context-param>

<listener>

<listener-class>

org.springframework.web.util.IntrospectorCleanupListener

</listener-class>

</listener>

<listener>

<listener-class>org</listener-class>

</listener>

<listener>

<listener-class>org</listener-class>

</listener>

<listener>

<listener-class>

org.springframework.web.context.request.RequestContextListener

</listener-class>

</listener>

<listener>

<listener-class>

org.springframework.security.ui.session.HttpSessionEventPublisher

</listener-class>

</listener>

Arquivos de Configuracao de Contexto do Spring e tambem da Seguranca

-->

<!--

<context-param>

<param-name>contextConfigLocation</param-name>

<param-value>

/WEB-INF/classes/spring/applicationContext.xml

</param-value>

</context-param>

<filter> <filter-name>struts-cleanup</filter-name> <filter-class>org</filter-class> </filter> <filter-mapping>

<filter-name>struts-cleanup</filter-name>

<url-pattern>/*</url-pattern>

</filter-mapping>

<filter>

<filter-name>Struts2DispatcherFilter</filter-name>

<filter-class>org</filter-class>

<init-param>

<param-name>config</param-name>

<param-value>struts-default.xml,struts-plugin.xml,struts/struts.xml</param-value>

</init-param>

</filter>

<filter-mapping>

<filter-name>Struts2DispatcherFilter</filter-name>

<url-pattern>/*</url-pattern>

</filter-mapping>

<!-- Inicializador -->

<servlet>

<servlet-name>Inicializador</servlet-name>

<servlet-class>br</servlet-class>

<load-on-startup>1</load-on-startup>

</servlet>

<servlet>

<servlet-name>Report</servlet-name>

<servlet-class>br</servlet-class>

<load-on-startup>1</load-on-startup>

</servlet>

<servlet>

<servlet-name>dwr</servlet-name>

<description>Direct Web Remoter Servlet</description>

<servlet-class>org</servlet-class>

<init-param>

<param-name>debug</param-name>

<param-value>true</param-value>

</init-param>

<init-param>

<param-name>activeReverseAjaxEnabled</param-name>

<param-value>true</param-value>

</init-param>

<init-param>

<param-name>initApplicationScopeCreatorsAtStartup</param-name>

<param-value>true</param-value>

</init-param>

<init-param>

<param-name>maxWaitAfterWrite</param-name>

<param-value>100</param-value>

</init-param>

<load-on-startup>1</load-on-startup>

</servlet>

<servlet-mapping>

<servlet-name>dwr</servlet-name>

<url-pattern>/dwr/*</url-pattern>

</servlet-mapping>

<servlet-mapping>

<servlet-name>Report</servlet-name>

<url-pattern>/report</url-pattern>

</servlet-mapping>

<session-config>

<session-timeout>30</session-timeout>

</session-config>

<error-page>

<error-code>403</error-code>

<location>/geral/erros/Erro403-SemPermissaoAcesso.jsp</location>

</error-page>

<error-page>

<error-code>404</error-code>

<location>/geral/erros/Erro404-PaginaInexistente.jsp</location>

</error-page>

<error-page>

<error-code>500</error-code>

<location>/geral/erros/visualizadorPadraoErros.jsp</location>

</error-page>

<taglib>

<taglib-uri>/scg2-tags</taglib-uri>

<taglib-location>/WEB-INF/scg2-app.tld</taglib-location>

</taglib>

<welcome-file-list>

<welcome-file>index.jsp</welcome-file>

</welcome-file-list>

<persistence-unit-ref>

<persistence-unit-ref-name>persistence.xml</persistence-unit-ref-name>

<persistence-unit-name>JPA_SCG2</persistence-unit-name>

</persistence-unit-ref>

 

 

 

 

 

</

I think this is the error, the more I can not say for sure!

Please help me, I do not know what to do!

29/09/2011 08:37:48 org.apache.catalina.core.StandardContext start

SEVERE: Error filterStart

web-app>-invoker.directwebremoting.servlet.DwrServlet-invoker.com.cosmo.scg2.servlet.RelatoriosServlet.com.cosmo.scg2.servlet.ScgInitServlet.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter .apache.struts2.dispatcher.ActionContextCleanUp.springframework.web.context.ContextLoaderListener.springframework.web.util.Log4jConfigListenerFileManager.java:209)FileManager.java:60)XmlConfigurationProvider.java:325)StrutsXmlConfigurationProvider.java:168)ConfigurationManager.java:220)ConfigurationManager.java:61)Dispatcher.java:774)InitOperations.java:77)StrutsPrepareAndExecuteFilter.java:49)ApplicationFilterConfig.java:221)ApplicationFilterConfig.java:302)ApplicationFilterConfig.java:78)StandardContext.java:3635)StandardContext.java:4222)ContainerBase.java:760)ContainerBase.java:740)StandardHost.java:544)HostConfig.java:920)HostConfig.java:883)HostConfig.java:492)HostConfig.java:1138)HostConfig.java:311)LifecycleSupport.java:120)ContainerBase.java:1022)StandardHost.java:736)ContainerBase.java:1014)StandardEngine.java:443)StandardService.java:448)StandardServer.java:700)Catalina.java:552)Native Method)NativeMethodAccessorImpl.java:39)DelegatingMethodAccessorImpl.java:25)Method.java:597)Bootstrap.java:295)Bootstrap.java:433

2011-09-29 08:37:48,685 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/scg2]] - <Exception starting filter Struts2DispatcherFilter>