[ 
https://issues.apache.org/jira/browse/WW-3984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rafal Szczepankiewicz resolved WW-3984.
---------------------------------------

    Resolution: Fixed

Finally, I've managed to convert my project to use struts without any errors.
Problem was with keeping struts libs in the web application.
When I've moved them into EAR everything runs smoothly.

One thing that I'm afraid is that in order to run struts 2 you have to change 
jboss variable which is never a good thing.
Hopefully it won't be an issue, keeping my fingers crossed.

Thanks for your help and support Lukasz !

PS: If you are ever in Cracow, Poland let me know I will buy you a huge beer :)
                
> Struts 2.3.8 convention plugin doesn't work with EAR on JBoss 5.1
> -----------------------------------------------------------------
>
>                 Key: WW-3984
>                 URL: https://issues.apache.org/jira/browse/WW-3984
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.3.8
>         Environment: JBoss 5.0 and 5.1, java 1.6 update 34
>            Reporter: Rafal Szczepankiewicz
>            Assignee: Lukasz Lenart
>            Priority: Critical
>              Labels: EAR, annotation, convention, jboss, struts
>             Fix For: 2.3.11
>
>         Attachments: config-browser screenshot.jpg, libs.JPG, serverLog.zip, 
> struts_2.3.11_libs.zip, struts2-ear.ear, struts2-jboss-ear.png, TestEAR.ear
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to