Hi

2014-11-11 21:46 GMT+01:00 benerridge <[email protected]>:
> I have an issue where I have 2 wars inside an EAR; both jars have a copy of a
> utility jar.
> when I do an em.find hibernate returns an instance of a class from the wrong
> war's lib folder jar.
>
> So
> In WarA
> em.find(classA, id) returns instance of classA from
> WarB/WEB-INF/lib/utility.jar
> I then immediately get class cast exception: cannot cast classA to classA.
>
> Is this normal?

No

> if so is there a way to resolve this without significantly modifying the ear
> packaging?
>
>

Can you share an app showing it? Also maybe check em is the on you
expect (debugging you should be able to see properties of the
persistence unit so adding foo=a and foo=b you should be able to
identify them).

>
>
>
> --
> View this message in context: 
> http://tomee-openejb.979440.n4.nabble.com/Ear-Classloading-issue-tp4672836.html
> Sent from the TomEE Users mailing list archive at Nabble.com.

Reply via email to