Re: Strange NullPointerException

From: Jürgen Saar (jsaa..eb.de)
Date: Sun Mar 13 2005 - 06:46:10 EST

  • Next message: Bryan Lewis: "Re: getting a List of Comparables, feature request?"

    @alex: It happens in eclipse within a trivial Test-Application

    @andrus:

    Specially strange is that I have 2 developement-Computers
    1: at the company
    2: at homeoffice

    both should be equal installed,
    both are running with linux
    at the company with SuSE 8.2
    at homeoffice with Mandrake 10.1
    the rest should be the same.

    but at the company it's OK
    at homeoffice the NullPointer ...

    I suggest it is a configuration problem,
    but I have no Idea where to start searching

    It's a new project, with an intial database (postgres)
    No special classes in use.

    I will have a try with cayenne 1.2

    cayenne-use..bjectstyle.org schrieb am 12.03.05 06:13:49:
    >
    > Hmm... now after re-reading this again I realized that this popped up
    > before. A search from Cayenne web site for
    > "validateForSave+NullPointerException" showed this:
    >
    > http://www.objectstyle.org/cayenne/lists/cayenne-user/2005/01/0078.html
    >
    > I think Jürgen's problem is the same. BTW, in Cayenne 1.2 we added
    > better diagnostics, so that the error message is more meaningful.
    >
    > Andrus
    >
    > On Mar 11, 2005, at 11:51 PM, Alex Gunawan Wibowo wrote:
    >
    > > Could be wrong... but have you tried
    > > BasicServletConfiguration.getDefaultContext(request.getSession())??
    > > Have you bind the DataContext in web.xml??
    > >
    > > Again.. I could be wrong...
    > >
    > > --- Jürgen Saar <jsaa..eb.de> wrote:
    > >> I actually set up a new project ...
    > >> the first with postgres and PK from cayenne
    > >>
    > >> The following source:
    > >> ...
    > >> DataContext context =
    > >> DataContext.createDataContext();
    > >>
    > >> TrAddress addr = (TrAddress)
    > >> context.createAndRegisterNewObject(TrAddress.class);
    > >> addr.setCity("AnyWhere");
    > >>
    > >> context.commitChanges();
    > >> ...
    > >>
    > >> The Reaktion:
    > >>
    > >> Exception in thread "main"
    > >> java.lang.NullPointerException
    > >> at
    > >>
    > > org.objectstyle.cayenne.CayenneDataObject.validateForSave(CayenneDataOb
    > > ject.java:575)
    > >> at
    > >>
    > > org.objectstyle.cayenne.CayenneDataObject.validateForInsert(CayenneData
    > > Object.java:700)
    > >> at
    > >>
    > > org.objectstyle.cayenne.access.ObjectStore.validateUncommittedObjects(O
    > > bjectStore.java:937)
    > >> at
    > >>
    > > org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.ja
    > > va:1260)
    > >> at
    > >>
    > > org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.ja
    > > va:1236)
    > >> at
    > >> org.jsaar.test.JustForTry.main(JustForTry.java:31)
    > >>
    > >>
    > >> any idea?
    > >> ---Juergen---
    >

    ______________________________________________________________
    Verschicken Sie romantische, coole und witzige Bilder per SMS!
    Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193



    This archive was generated by hypermail 2.0.0 : Sun Mar 13 2005 - 06:46:14 EST