Re: Using Cayenne withTomcat gives ClassCastException

From: John (mmmmmmmmm5..eb.de)
Date: Thu Nov 02 2006 - 04:43:10 EST

  • Next message: Marko: "Re: Shared cache"

    Hello Cris,
    No you misunderstood me.
    I develop with Eclipse and I have or (HAD) a Cayenne.jar under my
    "ThierdpartyJars". And another Cayenne.jar for "./tomcat/shared/lib/" and
    when i start the application using Tomcat and Tomcat uses the shared jars.

    however, NOW: i use the same Jars under "./tomcat/shared/lib/" and I still
    have the same problem.
    as soon as I change any part from Home.jave I have to restart TomCat
    completely.

    Thanks for your answers in advance. I still need help :)

    John.
    Regards.

    ----- Original Message -----
    From: "Cris Daniluk" <cris.danilu..mail.com>
    To: <cayenne-use..ncubator.apache.org>
    Sent: Thursday, November 02, 2006 1:18 AM
    Subject: Re: Using Cayenne withTomcat gives ClassCastException

    >> > This seems like some kind of classloader issue. John need to make
    >> > sure that cayenne.jar is loaded by the same classloader as the app
    >> > code. In most simple case this means putting it in the war. But there
    >> > are more weird cases such as this one:
    >> >
    >>
    >> Hi thanks for answering,
    >> You are right, i use diffrent Cayenne.jarS.
    >>
    >
    > You mean, you have more than one cayenne.jar on the classpath? That
    > would be your problem... because Tomcat uses nested classloaders, you
    > can run into problems like this:
    >
    > java.lang.ClassCastException
    > de.model.MenuObject cannot be cast to de.model.MenuObject
    >
    > .. very easily.
    >
    > Cris
    >



    This archive was generated by hypermail 2.0.0 : Thu Nov 02 2006 - 04:43:41 EST