Cayenne in a Cluster environment ends up in NullPointerException

From: Eric BIANCHI (eric.bianch..odanotech.ch)
Date: Sun Jul 01 2007 - 08:56:35 EDT

  • Next message: Jack O'Connor: "Tutorial Mapping Query"

    Hello cayenne users,

    I'm using cayenne 2.0.3 along with Tapestry 4.1.2. On login, I create
    a datacontext and put it in a property of a custom Tapestry Visit
    Class. Everything works just fine.

    Now I'm looking for deploying my application in a cluster
    environment, and cayenne throws me a NullPointerException.

    I've tried both Tomcat 6 cluster and Wadi along with Jetty 6.1, they
    both give the same error messages

    Basically, I work on the node A, when I switch to Node B, all my
    DataObjects in Session have their PersistentState as HOLLOW. When I
    access them, Cayenne tries to refetch my hollow objects and fails
    with this message :

    java.lang.NullPointerException
    Stack Trace:
    org.apache.cayenne.access.ObjectStore.resolveHollow(ObjectStore.java:
    909)
    org.apache.cayenne.access.DataContext.prepareForAccess
    (DataContext.java:1807)
    org.apache.cayenne.CayenneDataObject.readProperty
    (CayenneDataObject.java:202)
    ch.rodano.role.model.cayenne._Person.getLogin(_Person.java:73)

    If I test their status and try to refetch them myself, cayenne gives
    me another NullPointerException with this StackTrace :
    Stack Trace:
    org.apache.cayenne.util.ObjectContextQueryAction.runQuery
    (ObjectContextQueryAction.java:217)
    org.apache.cayenne.access.DataContextQueryAction.execute
    (DataContextQueryAction.java:54)
    org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1387)
    org.apache.cayenne.access.DataContext.performQuery(DataContext.java:
    1376)
    org.apache.cayenne.DataObjectUtils.objectForQuery
    (DataObjectUtils.java:254)
    org.apache.cayenne.access.DataContext.refetchObject(DataContext.java:
    1040)

    DataContext is not null.

    The weird thing is : Some objects, sometimes, are correctly
    refetched, I can see that in the SQL but it always ends up in a
    NullPointerException.

    Anyone here is experienced with Clustering cayenne ?

    Thanks and regards,

    Eric

    --
    Eric BIANCHI
    ---------------------------------------
    eric.bianch..odanotech.ch
    http://www.rodanotech.ch           Skype: erbianchi
    



    This archive was generated by hypermail 2.0.0 : Sun Jul 01 2007 - 08:57:04 EDT