Strange NullPointerException

From: Jürgen Saar (jsaa..eb.de)
Date: Thu Mar 10 2005 - 10:54:41 EST

  • Next message: Kevin Menard: "Re: Cayenne modeler - need to generate setters and getters for primary key"

    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(CayenneDataObject.java:575)
            at org.objectstyle.cayenne.CayenneDataObject.validateForInsert(CayenneDataObject.java:700)
            at org.objectstyle.cayenne.access.ObjectStore.validateUncommittedObjects(ObjectStore.java:937)
            at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1260)
            at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java: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 : Thu Mar 10 2005 - 10:54:45 EST