Re: ClassCastException while use jpa annotation in resin-pro-3.0.19
Scott Ferguson <[email protected]> Wed, 24 May 2006 10:26:03 -0700
| Newsgroups | gmane.text.xml.resin.user |
|---|---|
| Message-ID | <[email protected]> |
On May 24, 2006, at 9:30 AM, zhu wrote:
>
> the app was works in 3.0.18, but failed in 3.0.19,
> because of the javax.persistence package in {resin-home}/lib/ejb30.jar
3.0.19 changed javax.ejb to javax.persistence. So you would need to
make some changes.
>
> i get a ClassCastException while obtain EntityManagerFactory from
> javax.persistence.Persistence.createEntityManagerFactory(...), it was
> because difference ClassLoader cause that exception
>
> what's the sequence of Class Resolve in a webapp, i think it should be
> jdk-rt -> WEB-INF/classes -> WEB-INF/lib -> ResinServerLibs
{jdk, $RESIN_HOME/lib} -> {WEB-INF/classes, WEB-INF/lib}
In other words, the global classpath has priority, and only if the
class is missing will Resin look in WEB-INF.
> uppon the ClassCastException, i think resin-pro's sequence was
> jdk-rt -> WEB-INF/classes -> ResinServerLibs -> WEB-INF/lib
>
> how can i resolve this problem, or report a bug?
bugs reports are at bugs.caucho.com. It would help if you can
provide a larger section of the failing code, too.
-- Scott
>
>
>