I am developing a system based in two web apps. First app is deployed as a WAR, and second (a Seam WebApp with ejb) as an EAR.
I need to share one custom class between both. The first I did was to test sharing a simple Long and this worked fine. But now I am trying to share my customClass and I am getting cast exceptions. I think I'm having classloading problems.
For share my object I have one simple JAR (with just one customClass) inside server/default/lib jboss folder, and I put it into two projects to compile them. The customClass is used from WAR and from EJB-PROJECT.
I know that the class is being loaded from different classloaders and this is the problem, but I don't know how to solve this.
I had a packaging error and I had put the class inside one of the app content, so this was the reason way It didnt work.
So the jar inside server/default/lib was in the right location.
Sorry for the inconvenience