[jboss-jira] [JBoss JIRA] (AS7-5877) ClassCastException with ResteasyProviderFactory when including RESTEasy in two WARs
Stuart Douglas (JIRA)
jira-events at lists.jboss.org
Mon Feb 11 20:48:56 EST 2013
[ https://issues.jboss.org/browse/AS7-5877?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stuart Douglas resolved AS7-5877.
---------------------------------
Resolution: Rejected
If you want to package resteasy you have two option.
You can use the <exclude-subsystem> element in jboss-deployment-structure.xml that is documented here: https://docs.jboss.org/author/display/AS72/Class+Loading+in+AS7 (this was added in 7.1.2).
Alternatively you can just remove the JAX-RS subsystem from the standalone.xml config.
Just removing the dependency is not enough, as the JAX-RS deployers will still operate on your deployment.
> ClassCastException with ResteasyProviderFactory when including RESTEasy in two WARs
> -----------------------------------------------------------------------------------
>
> Key: AS7-5877
> URL: https://issues.jboss.org/browse/AS7-5877
> Project: Application Server 7
> Issue Type: Bug
> Components: Class Loading, REST
> Affects Versions: 7.1.1.Final
> Reporter: Eric Wittmann
> Assignee: David Lloyd
>
> Found what I think may be a classloading issue while working on the S-RAMP project.
> We include RESTEasy in our WARs because we want a single WAR that runs in multiple containers *and* because we need a newer version of RESTEasy. If you deploy two WARs that both package RESTEasy, then you will get a ClassCastException. See the linked RESTEasy Jira issue I entered for this problem (I'm not sure if it's a bug in resteasy or jboss).
> Ultimately it seems that a class is loaded from the RESTEasy module included in JBoss AS, despite that module being excluded via the jboss-deployment-structure.xml file.
> A sample maven project showing this problem is included on the linked RESTEasy issue.
--
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
More information about the jboss-jira
mailing list