Re: Struts problem

From: Nanik Tolaram (nanikjav..otmail.com)
Date: Mon Mar 10 2003 - 20:56:01 EST

  • Next message: Andrus Adamchik: "Re: Struts problem"

    Hi,

    Thanks, I managed to fix the problem. I recreated the whole thing again and
    then copy the DataContext from cayenne-web-app/index.jsp to my index.jsp and
    it worked like a charm.

    Are there any other way to initialize the Cayenne stack besides using the
    one in index.jsp. Maybe I can integrate it into the web.xml ?

    Thanks
    Nanik

    ----- Original Message -----
    From: "Holger Hoffstätte" <holge..izards.de>
    To: <cayenne-use..bjectstyle.org>
    Sent: Monday, March 10, 2003 5:09 AM
    Subject: Re: Struts problem

    > Nanik Tolaram wrote:
    > > I have 1 table a users table and 1 action and 1 .jsp page, when it
    reached
    > > the line
    > >
    > > List users = ctxt.performQuery(query);
    > >
    > > it throws the following error,
    > > (snip)
    > > root cause
    > >
    > > java.lang.NullPointerException
    > > at
    > >
    org.web.application.modules.action.BrowseUsersAction.execute(BrowseUsersActi
    > > on.java:43)
    >
    > > I don't understand why this is happening. My DBObject is in the
    >
    > Your DataContext is most likely null; I guess that's because you didn't
    > put it into the session correctly. The query is probably correct,
    > otherwise the stack would include DataContext.
    >
    > Holger
    >



    This archive was generated by hypermail 2.0.0 : Mon Mar 10 2003 - 21:00:33 EST