2 Replies Latest reply on Oct 28, 2012 11:22 AM by Bill Rosenberg

    AS7 Class Cast Exceptions from common jar

    Bill Rosenberg Newbie

      My app is structured pretty simply:

       

      App.Ear

           -AppEJB.jar

           -AppWeb.war

           -/lib

                -AppCommon.jar

       

       

      Both the ejb and web share the AppCommon classes by default since it is int he /lib directory under the EAR. I do not reference  the AppCommon.jar in any manifest or in jboss-deployment-structure.xml files. In the application i am seeing exceptions like the following, where they seem to be the same class type, but jboss is throwing a ClassCastException. The 'com.lightspeed.dao.availability.Rate' class is inside the AppCommon.jar which

      is shared.

          

       

      16:22:46,331 ERROR [stderr] (http-localhost/127.0.0.1:8443-1) java.lang.ClassCastException: com.lightspeed.dao.availability.Rate cannot be cast to com.lightspeed.dao.availability.Rate

       

      Any ideas?

       

      Thanks,

       

      Bill