struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rafal Szczepankiewicz (JIRA)" <>
Subject [jira] [Commented] (WW-3984) Struts 2.3.8 convention plugin doesn't work with EAR on JBoss 5.1
Date Thu, 21 Feb 2013 12:28:12 GMT


Rafal Szczepankiewicz commented on WW-3984:

nope not working, I'm adding EAR that reproduces the issue, the only difference is that I've
added a new jar astruts2-ear-jar-1.0-SNAPSHOT into WEB-INF dir.
If I remove the jar actions are found again.
Problem in code is in this line (readUrls method of class PackageBasedActionConfigBuilder):
ArrayList<URL> classesList = Collections.list(getClassLoaderInterface().getResources(""));
which returns only first jar from the war file.
includeJars is applied later and doesn't matter if readUrls doesn't include jar with actions.

> Struts 2.3.8 convention plugin doesn't work with EAR on JBoss 5.1
> -----------------------------------------------------------------
>                 Key: WW-3984
>                 URL:
>             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,,,
struts2-ear.ear, 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/]
> 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
> 	at
> 	at Source)
> 	at com.opensymphony.xwork2.util.finder.ClassFinder.jar(
> 	at com.opensymphony.xwork2.util.finder.ClassFinder.<init>(
> 	at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(
> 	at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(
> 	at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(
> 	...
> 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:

View raw message