Re: Using Cayenne withTomcat gives ClassCastException

From: John (mmmmmmmmm5..eb.de)
Date: Wed Nov 01 2006 - 16:35:07 EST

  • Next message: Cris Daniluk: "Re: Using Cayenne withTomcat gives ClassCastException"

    ----- Original Message -----
    From: "Andrus Adamchik" <andru..bjectstyle.org>
    To: <cayenne-use..ncubator.apache.org>
    Sent: Wednesday, November 01, 2006 9:01 PM
    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.

    > http://objectstyle.org/cayenne/lists/cayenne-user/2006/10/0063.html
    >
    > (also is there a WO framework involved here?? If so I can't give
    > specific advice, other than debugging ClassLoader hierarchy)
    No No WO frameworks at all.

    >
    > Andrus
    >
    >
    > On Nov 1, 2006, at 2:54 PM, Michael Gentry wrote:
    >
    >> I never got that when I used Tomcat with Tapestry. How are you
    >> starting Tomcat up? I always used the Tomcat plugin for Eclipse and
    >> it worked pretty well. Another option for development is to use
    >> Jetty/Jetty Launcher/Eclipse. Jetty starts up much faster. As for
    >> hot code replacement, it works pretty well as long as I edit inside a
    >> method. It fails if I add class instance variables or modify the
    >> method's signature.
    >>
    >> /dev/mrg
    >>
    >>
    >> On 11/1/06, John <mmmmmmmmm5..eb.de> wrote:
    >>> Hello,
    >>> I use Cayenne with Tapestry and tomcat.
    >>>
    >>> I fetch data from the DB using Cayenne The application runs well
    >>> until I make change on the Java file like Home.java I have to
    >>> restart TOMCAT new. Restarting the Application doesnot solve the
    >>> problem.
    >>> Changing the Home.page or Home.html does not create the error.
    >>> The error i get is:
    >>> ---------------------------------------------------------------------
    >>> ---
    >>> java.lang.ClassCastException
    >>> de.model.MenuObject cannot be cast to de.model.MenuObject
    >>>
    >>> ---------------------------------------------------------------------
    >>> ---
    >>>
    >>> Anybody knows why or how can i solve this?
    >>>
    >>> I face this problem only with Cayenne, cos using a sample List
    >>> does not creates this effect.
    >>>
    >>> Thx in advance.
    >>>
    >>>
    >>
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Nov 01 2006 - 16:35:31 EST