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

Struts 2.3.8 convention plugin doesn't work with EAR on JBoss 5.1

    Details

    • Flags:
      Important

      Description

      Convention plugin is not able to read classes found in jar files when they are deployed inside a EAR file under JBoss 5.0 and 5.1 version.

      Error = file not found exception.

      I've debugged the issue (classes PackageBasedActionConfigBuilder and ClassFinder) and there is no possibility to fix this using any of the configuration parameters.

      This is only happening when EAR is not exploded.
      I've check/read the forum and asked google about this and could not find any information if and when this will be fixed. Are there any plans to add a fix that will allow to use annotations with EAR files on JBoss ?

      This issue is serious since my project contains dozens of actions that are defined via annotation (I would really want to avoid defining them in xml). When deployed in EAR to JBoss they don't work.

      Any help/workable workaround is appreciated.

      EAR that reproduces the error in attachements.
      Structure:

      TestEAR -> TestWeb.war -> TestJava.jar

      TestJava.jar contains class TestAction that uses annotation.
      When deplying the EAR in Jboss I get following exception:

      19:22:53,195 ERROR [ClassFinder] Unable to read URL [vfszip:/E:/Downloads/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/deploy/TestEAR.ear/TestWeb.war/WEB-INF/lib/commons-lang-2.4.jar/]
      java.io.FileNotFoundException: E:\Downloads\jboss-5.1.0.GA-jdk6\jboss-5.1.0.GA\server\default\deploy\TestEAR.ear\TestWeb.war\WEB-INF\lib\commons-lang-2.4.jar
      at org.jboss.net.protocol.file.FileURLConnection.connect(FileURLConnection.java:105)
      at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:112)
      at java.net.URL.openStream(Unknown Source)
      at com.opensymphony.xwork2.util.finder.ClassFinder.jar(ClassFinder.java:417)
      at com.opensymphony.xwork2.util.finder.ClassFinder.<init>(ClassFinder.java:91)
      at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:390)
      at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:347)
      at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53)
      ...

      Log with errors from startup can be found in attachement.

      libraries used by TestWeb.war added as attachements.

        Attachments

        1. TestEAR.ear
          6.21 MB
          Rafal Szczepankiewicz
        2. serverLog.zip
          21 kB
          Rafal Szczepankiewicz
        3. libs.JPG
          96 kB
          Rafal Szczepankiewicz
        4. struts_2.3.11_libs.zip
          1.43 MB
          Rafal Szczepankiewicz
        5. config-browser screenshot.jpg
          40 kB
          Rafal Szczepankiewicz
        6. struts2-ear.ear
          3.46 MB
          Rafal Szczepankiewicz
        7. struts2-jboss-ear.png
          126 kB
          Lukasz Lenart

          Issue Links

            Activity

              People

              • Assignee:
                lukaszlenart Lukasz Lenart
                Reporter:
                hopeisnear Rafal Szczepankiewicz
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: