Struts 2
  1. Struts 2
  2. WW-3810

Struts 2.3.3 fails to deploy on JBoss 5.1

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.3
    • Fix Version/s: 2.3.4
    • Component/s: Example Applications
    • Labels:
    • Environment:

      JBoss 5.1 Application Server

      Description

      To duplicate:

      1. Install JBoss 5.1.
      2. Copy struts2-blank.war to the "deploy" directory

      Observe that the example application does not deploy, and that the JBoss log file says:

      ERROR [org.apache.struts2.dispatcher.Dispatcher] (HDScanner) Dispatcher initialization failed
      ...
      Unable to load configuration. - Class: java.io.File
      File: File.java
      Method: <init>
      Line: 366 - java/io/File.java:366:-1
      at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
      at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)
      at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:436)
      at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
      at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
      at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:234)
      ...
      Caused by: Caught exception while loading file struts-default.xml - Class: java.io.File
      ...
      Caused by: java.lang.IllegalArgumentException: URI scheme is not "file"
      at java.io.File.<init>(File.java:366)
      at com.opensymphony.xwork2.util.FileManager$JBossFileRevision.build(FileManager.java:240)
      at com.opensymphony.xwork2.util.FileManager.loadFile(FileManager.java:143)
      at com.opensymphony.xwork2.util.FileManager.loadFile(FileManager.java:105)
      at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:935)

        Activity

        Hide
        nick added a comment -

        Hi Luk,
        This vfs seems like never ending problem . As we have discussed in our previous issues and all, i guess this is the right time to do a Resource Abstraction. I think the permanent solution would be either move struts2 to vfs based or by creating an Resource abstraction just like the one in spring framework.

        Show
        nick added a comment - Hi Luk, This vfs seems like never ending problem . As we have discussed in our previous issues and all, i guess this is the right time to do a Resource Abstraction. I think the permanent solution would be either move struts2 to vfs based or by creating an Resource abstraction just like the one in spring framework.
        Hide
        Lukasz Lenart added a comment -

        Right now I've added back support for JBoss 5 as it was in 2.3.1, see normalizeToFileProtocol() in URLUtil [1]

        [1] https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java

        And prepared FileManager to be an abstraction layer with many different implementations depending on AppServer used.

        Show
        Lukasz Lenart added a comment - Right now I've added back support for JBoss 5 as it was in 2.3.1, see normalizeToFileProtocol() in URLUtil [1] [1] https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java And prepared FileManager to be an abstraction layer with many different implementations depending on AppServer used.
        Hide
        Lukasz Lenart added a comment -

        Added missing part to support JBoss 5, please check with the latest snapshot (Hudson will comment on the issue when ready)

        Show
        Lukasz Lenart added a comment - Added missing part to support JBoss 5, please check with the latest snapshot (Hudson will comment on the issue when ready)
        Hide
        Hudson added a comment -

        Integrated in Struts2 #468 (See https://builds.apache.org/job/Struts2/468/)
        WW-3810 reverts support for JBoss 5.1 (Revision 1335463)

        Result = SUCCESS
        lukaszlenart :
        Files :

        • /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java
        Show
        Hudson added a comment - Integrated in Struts2 #468 (See https://builds.apache.org/job/Struts2/468/ ) WW-3810 reverts support for JBoss 5.1 (Revision 1335463) Result = SUCCESS lukaszlenart : Files : /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java
        Hide
        Roland McIntosh added a comment -

        Verified that https://builds.apache.org/job/Struts2/lastStableBuild/org.apache.struts$struts2-assembly/artifact/org.apache.struts/struts2-assembly/2.3.4-SNAPSHOT/struts2-assembly-2.3.4-SNAPSHOT-all.zip built May 8th, 2012 12:30:47 PM fixes this issue. Test was to extract struts2-blank.war and copy to JBoss 5.1 deploy directory, then verify "Struts is up and running" in web browser.

        md5sums of files checked:
        cb571b3a2ccb72670160d13b51bf686d struts2-blank.war
        2e9148cfbe2cdb90ff3ae3aac012f64b struts2-assembly-2.3.4-SNAPSHOT-all.zip

        Show
        Roland McIntosh added a comment - Verified that https://builds.apache.org/job/Struts2/lastStableBuild/org.apache.struts$struts2-assembly/artifact/org.apache.struts/struts2-assembly/2.3.4-SNAPSHOT/struts2-assembly-2.3.4-SNAPSHOT-all.zip built May 8th, 2012 12:30:47 PM fixes this issue. Test was to extract struts2-blank.war and copy to JBoss 5.1 deploy directory, then verify "Struts is up and running" in web browser. md5sums of files checked: cb571b3a2ccb72670160d13b51bf686d struts2-blank.war 2e9148cfbe2cdb90ff3ae3aac012f64b struts2-assembly-2.3.4-SNAPSHOT-all.zip
        Hide
        Lukasz Lenart added a comment -

        Thanks a lot, I'm waiting for one more thing and will start preparing release of 2.3.4

        Show
        Lukasz Lenart added a comment - Thanks a lot, I'm waiting for one more thing and will start preparing release of 2.3.4

          People

          • Assignee:
            Lukasz Lenart
            Reporter:
            Roland McIntosh
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development