Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-5877

ClassCastException with ResteasyProviderFactory when including RESTEasy in two WARs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 7.1.1.Final
    • Class Loading, REST
    • None

      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.

              dlloyd@redhat.com David Lloyd
              ewittman@redhat.com Eric Wittmann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: