Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4842

Struts 2 Fails to Initialize with JRebel

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not A Bug
    • Affects Version/s: 2.5.12
    • Fix Version/s: 2.5.13
    • Component/s: Dispatch Filter
    • Labels:
      None

      Description

      • JRebel 7.0.13
      • Tomcat 8.5.15
      • Java 1.8.0_131
        ERROR Dispatcher Dispatcher initialization failed
         com.opensymphony.xwork2.inject.DependencyException: Dependency mapping for [type=java.lang.String, name='struts.devMode'] already exists.
        	at com.opensymphony.xwork2.inject.ContainerBuilder.checkKey(ContainerBuilder.java:108)
        	at com.opensymphony.xwork2.inject.ContainerBuilder.factory(ContainerBuilder.java:83)
        	at com.opensymphony.xwork2.inject.ContainerBuilder.constant(ContainerBuilder.java:517)
        	at com.opensymphony.xwork2.inject.ContainerBuilder.constant(ContainerBuilder.java:398)
        	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:284)
        	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:159)
        	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:63)
        	at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:960)
        	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:466)
        	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:499)
        	at org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:75)
        	at org.apache.struts2.dispatcher.listener.StrutsListener.contextInitialized(StrutsListener.java:46)
        	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4745)
        	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
        	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
        	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
        	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        	at java.lang.Thread.run(Thread.java:748)
        

        Activity

        Hide
        yasser.zamani Yasser Zamani added a comment - - edited

        It seems you wrongly have defined devMode as bean: <bean name="struts.devMode" type="java.lang.String" class="java.lang.String"/>.

        devMode should be defined as constant : <constant name="struts.devMode" value="true"/>

        Show
        yasser.zamani Yasser Zamani added a comment - - edited It seems you wrongly have defined devMode as bean: <bean name="struts.devMode" type="java.lang.String" class="java.lang.String"/> . devMode should be defined as constant : <constant name="struts.devMode" value="true"/>
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        This is a bug in JRebel which uses some internal hacks to reload the Convention configuration, please for now use this option:

        -Drebel.struts2_plugin=false
        
        Show
        lukaszlenart Lukasz Lenart added a comment - This is a bug in JRebel which uses some internal hacks to reload the Convention configuration, please for now use this option: -Drebel.struts2_plugin=false
        Hide
        cgrobmeier Christian Grobmeier added a comment -

        For the record: this is fixed with JRebel 7.0.15 (at least)

        Show
        cgrobmeier Christian Grobmeier added a comment - For the record: this is fixed with JRebel 7.0.15 (at least)

          People

          • Assignee:
            Unassigned
            Reporter:
            swiftelan Aaron Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development