Struts 2
  1. Struts 2
  2. WW-1970

Error Message: Filter [struts2]: could not be initialized

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Not A Problem
    • Affects Version/s: 2.0.6
    • Fix Version/s: None
    • Component/s: Dispatch Filter
    • Labels:
      None
    • Environment:

      java 1.4. - websphere 6.0 server. spring framework used. linux os. struts J4 distribution used. struts-spring plugin compiled with 1.4 from 'all' distribution.

    • Flags:
      Important

      Description

      I got this error when I try to access the deployed application:

      Error Message: Filter [struts2]: could not be initialized
      Error Code: 500
      Target Servlet: null
      Error Stack:
      com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='struts.devMode'] in public static void org.apache.struts2.dispatcher.Dispatcher.setDevMode(java.lang.String).
      at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:157)
      at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMethods(ContainerImpl.java:126)
      at com.opensymphony.xwork2.inject.ContainerImpl.injectStatics(ContainerImpl.java:111)
      at com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:494)
      at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:145)
      at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
      at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:398)
      at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:455)
      at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
      at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init(FilterInstanceWrapper.java:109)
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:328)
      ..............................
      Caused by: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='struts.devMode'] in public static void org.apache.struts2.dispatcher.Dispatcher.setDevMode(java.lang.String).
      at com.opensymphony.xwork2.inject.ContainerImpl.createParameterInjector(ContainerImpl.java:239)
      at com.opensymphony.xwork2.inject.ContainerImpl.getParametersInjectors(ContainerImpl.java:229)
      at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.<init>(ContainerImpl.java:282)
      ..............................

      I saw some other related issues on the internet but I did not found the resolvation. Thank you for your help.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        39d 14h 32m 1 Don Brown 16/Jul/07 05:45
        Resolved Resolved Closed Closed
        1931d 17h 23m 1 Lukasz Lenart 28/Oct/12 22:08
        Lukasz Lenart made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Jeff Turner made changes -
        Project Import Mon Feb 01 01:17:42 UTC 2010 [ 1264987062082 ]
        Antonio Petrelli made changes -
        Workflow Struts - editable closed status (temporary) [ 46871 ] Struts - editable closed status [ 50126 ]
        Antonio Petrelli made changes -
        Workflow Struts - editable closed status [ 41986 ] Struts - editable closed status (temporary) [ 46871 ]
        Hide
        johana pin added a comment -

        Sorry for not answering to this question. But after I waited for some time I quit on using that version of struts and following this issue. The xwork package that I used at that time was the one that came with the J4 distribution (don't know exactly wich one). I noticed that in the next version of struts the problem was solved and now I'm doing some test on Struts 2.0.9 to see how it works.

        Thank you for the response.

        Show
        johana pin added a comment - Sorry for not answering to this question. But after I waited for some time I quit on using that version of struts and following this issue. The xwork package that I used at that time was the one that came with the J4 distribution (don't know exactly wich one). I noticed that in the next version of struts the problem was solved and now I'm doing some test on Struts 2.0.9 to see how it works. Thank you for the response.
        Jeff Turner made changes -
        Workflow Struts [ 41433 ] Struts - editable closed status [ 41986 ]
        Don Brown made changes -
        Assignee Rainer Hermanns [ rainerh ] Don Brown [ mrdon ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Not A Problem [ 7 ]
        Fix Version/s 2.1.0 [ 21794 ]
        Hide
        Don Brown added a comment -

        Please ask these types of questions on the Struts user mailing list.

        Show
        Don Brown added a comment - Please ask these types of questions on the Struts user mailing list.
        Hide
        James Holmes added a comment -

        Is this still an issue? Did placing the xwork JAR file in WEB-INF/lib fix the issue?

        Show
        James Holmes added a comment - Is this still an issue? Did placing the xwork JAR file in WEB-INF/lib fix the issue?
        Hide
        Sanjay Rakholiya added a comment -

        Hi,

        Plz put xwork-2.0.1.jar (2.x.x) proper place in lib folder of ur WEB-INF.

        Thanks & Regards

        Show
        Sanjay Rakholiya added a comment - Hi, Plz put xwork-2.0.1.jar (2.x.x) proper place in lib folder of ur WEB-INF. Thanks & Regards
        Rainer Hermanns made changes -
        Field Original Value New Value
        Assignee Rainer Hermanns [ rainerh ]
        Fix Version/s 2.1.0 [ 21794 ]
        Hide
        johana pin added a comment - - edited

        Any idea about this ?

        I tried to run only 'blank' application on java 1.4. - websphere 6.0 server, winxp os, struts J4 distribution. After deploy, I got almost the same error (for another constant) when calling the action:

        E SRVE0026E: [Servlet Error]-[Filter [struts2]: could not be initialized]: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='struts.i18n.encoding'] in public static void org.apache.struts2.dispatcher.Dispatcher.setDefaultEncoding(java.lang.String).
        at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:157)
        at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMethods(ContainerImpl.java:126)
        at com.opensymphony.xwork2.inject.ContainerImpl.injectStatics(ContainerImpl.java:111)
        at com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:494)
        at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:145)
        at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
        at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:398)
        at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:455)
        at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init(FilterInstanceWrapper.java:109)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:328)
        .................................
        Caused by: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='struts.i18n.encoding'] in public static void org.apache.struts2.dispatcher.Dispatcher.setDefaultEncoding(java.lang.String).
        at com.opensymphony.xwork2.inject.ContainerImpl.createParameterInjector(ContainerImpl.java:239)
        at com.opensymphony.xwork2.inject.ContainerImpl.getParametersInjectors(ContainerImpl.java:229)
        at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.<init>(ContainerImpl.java:282)
        at com.opensymphony.xwork2.inject.ContainerImpl$3.create(ContainerImpl.java:130)
        at com.opensymphony.xwork2.inject.ContainerImpl$3.create(ContainerImpl.java:128)
        at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:154)
        at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMethods(ContainerImpl.java:126)
        at com.opensymphony.xwork2.inject.ContainerImpl.injectStatics(ContainerImpl.java:111)
        ..........................................

        Thank you very much.

        Show
        johana pin added a comment - - edited Any idea about this ? I tried to run only 'blank' application on java 1.4. - websphere 6.0 server, winxp os, struts J4 distribution. After deploy, I got almost the same error (for another constant) when calling the action: E SRVE0026E: [Servlet Error] -[Filter [struts2] : could not be initialized]: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='struts.i18n.encoding'] in public static void org.apache.struts2.dispatcher.Dispatcher.setDefaultEncoding(java.lang.String). at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:157) at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMethods(ContainerImpl.java:126) at com.opensymphony.xwork2.inject.ContainerImpl.injectStatics(ContainerImpl.java:111) at com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:494) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:145) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:398) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:455) at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init(FilterInstanceWrapper.java:109) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:328) ................................. Caused by: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=java.lang.String, name='struts.i18n.encoding'] in public static void org.apache.struts2.dispatcher.Dispatcher.setDefaultEncoding(java.lang.String). at com.opensymphony.xwork2.inject.ContainerImpl.createParameterInjector(ContainerImpl.java:239) at com.opensymphony.xwork2.inject.ContainerImpl.getParametersInjectors(ContainerImpl.java:229) at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.<init>(ContainerImpl.java:282) at com.opensymphony.xwork2.inject.ContainerImpl$3.create(ContainerImpl.java:130) at com.opensymphony.xwork2.inject.ContainerImpl$3.create(ContainerImpl.java:128) at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:154) at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMethods(ContainerImpl.java:126) at com.opensymphony.xwork2.inject.ContainerImpl.injectStatics(ContainerImpl.java:111) .......................................... Thank you very much.
        johana pin created issue -

          People

          • Assignee:
            Don Brown
            Reporter:
            johana pin
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development