3 Replies Latest reply on Aug 26, 2011 8:45 AM by Ales Justin

    JBoss 6.1:  Isolating ears from each other

    Greg Jewell Expert



      I have two ears deployed in the default server of JBoss 6.1.  One of the ears (call it service.ear) provides a service to retrieve data from an external source and to translate it to a different structure.  The other ear (call it client.ear) utilizes this service.  As a result, the client ear contains the class definition the service ear translates the data to.  Additionally, the jars that contains the translated data structure class is deployed as an EJB in both the client and service ears.


      Naturally, this is causing problems.  I am getting the dreaded "expected class Data but got class Data" exception.  I've tried many configurations of jboss-classloading.xml and jboss-classloading-domain.xml, but the only thing that I can get to work is the "sledgehammer" jboss-classloading configuration:


      <classloading xmlns="urn:jboss:classloading:1.0"







      As you can imagine, I really don't want this configuration.  Can someone provide to me sample files that I need to place in my various ear files that will prevent this error from occurring?  I've tried giving each ear their own domain, setting import-all to false, and parent-first to false, but none of those appear to resolve the issue.  I've also tried adding jboss-classloading-domain.xml, but I don't understand that well enough.