Struts 2
  1. Struts 2
  2. WW-2956

setting devMode value to "true" causes NullPointerException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.1.6
    • Fix Version/s: 2.1.8
    • Component/s: None
    • Labels:
      None
    • Environment:

      Windows 2003 Server SP2, JRE 1.6.0_07, Tomcat 6.0.18

      Description

      I enabled devMode in struts2-blank-2.1.6 application and it's caused such deployment exception:

      org.apache.catalina.core.StandardContext filterStart
      SEVERE: Exception starting filter struts2
      java.lang.NullPointerException
      at com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209)
      at com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(FileManager.java:60)
      at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:325)
      at org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:168)
      at com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:220)
      at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:61)
      at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:774)
      at org.apache.struts2.dispatcher.ng.InitOperations.initStaticContentLoader(InitOperations.java:77)
      at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:49)
      at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
      at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
      at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
      at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
      at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
      at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      at org.apache.catalina.core.StandardService.start(StandardService.java:516)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

      Also struts2-showcase-2.1.6 (where devMode is default) throws same exception:
      org.apache.catalina.core.StandardWrapperValve invoke
      SEVERE: Servlet.service() for servlet jsp threw exception
      java.lang.NullPointerException
      at com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209)
      at com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(FileManager.java:60)
      at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:325)
      at org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:168)
      at com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:220)
      at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:61)
      at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:774)
      at org.apache.struts2.dispatcher.ng.PrepareOperations.createActionContext(PrepareOperations.java:74)
      at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter.doFilter(StrutsPrepareFilter.java:59)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857)
      at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)
      at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
      at java.lang.Thread.run(Unknown Source)

      1. WW-2956.patch
        7 kB
        Lukasz Lenart
      2. WW-2956-1.patch
        7 kB
        Lukasz Lenart

        Activity

        Lukasz Lenart made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Jeff Turner made changes -
        Project Import Mon Feb 01 01:17:42 UTC 2010 [ 1264987062082 ]
        Wes Wannemacher made changes -
        Fix Version/s 2.1.8 [ 21920 ]
        Fix Version/s 2.1.7 [ 21907 ]
        Lukasz Lenart made changes -
        Attachment WW-2956-1.patch [ 13948 ]
        Lukasz Lenart made changes -
        Attachment WW-2956.patch [ 13947 ]
        musachy made changes -
        Field Original Value New Value
        Resolution Fixed [ 1 ]
        Fix Version/s 2.1.7 [ 21907 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Semion Oshchepkov created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Semion Oshchepkov
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development