cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Lendholt" <>
Subject Re: To severe things
Date Fri, 14 Sep 2007 11:59:05 GMT
Hi Kevin,

To (1):

two snippets I can give you. Unfortunately we do not have a fitting test 

The "faulty" object is stored in a list and the delete via 

//Thios expression fetches all persons that should be deleted from a note
Expression delExp = 


						SelectQuery selQ = new SelectQuery(Mappingnotizperson.class,delExp);

//perform the query
List<Mappingnotizperson> m = this.context.performQuery(selQ);
//Delete the object

Now the corresponding object is marked as transient and is deleted.

//This refetches all persons that are assigned to one note.
List<Mappingnotizperson> mapList = this.notiz.getMappingnotizpersonArray();
			System.err.println("notizid:"+ notizShow.getObjectId());
			for (Mappingnotizperson mappingnotizperson : mapList) {
				System.err.println("mapp: pers-state:" + 
mappingnotizperson.getPersistenceState()); // + " --- persid:" + 
				this.persList.add(mappingnotizperson.getToPersonen()); //**

** Here we get the NullPointerException that tells us, that the person of 
this mapping is null.

Hope you can start with what we've got.

To (2):

We're using cayenne 2.0.3 with a customized db adapter to be used with max 

To me, the method prepareForAccess makes no sense.
At first it's checked againstz being hollow and afterwards it's checked 
against being commited - but how should it be commited when it's already 

Thanks in advance guys.


>From: Kevin Menard <>
>To: <>
>Subject: Re: To severe things
>Date: Thu, 13 Sep 2007 15:21:52 -0400
>Hi Jan,
>I'm snipping out a lot of just to get to a few basic questions I have.
>On 9/13/07 1:25 PM, "Jan Lendholt" <> wrote:
> > Well, this exception comes on an object with the PersistenceState =
> > Transient. The exception is thrown when in doResolveFault cayenne tries 
> > access the object's context.
> > But why? This object shouldn't even be there! In my opinion this is a 
> > It doesn't matter, if we delete the object with deletObject or with a 
> > query. How can it be? It's pretty severe though.
>If possible, could you please post the code that seems to trigger the 
>A small test case would be perfect, but showing anything would be helpful.
> > (2)
> > I try to access a mapping table again, this time we manage resources 
> > rooms, beamers etc.
> >
> > I get all mappings and try to access via 
> > the resource's name.
> >
> > We get:
> >
> > 19:22:49.168 WARN!! Exception for /ams?serviceId=Echo.Synchronize
> > org.apache.cayenne.FaultFailureException: [v.@CAYENNE_VERSION@
> > @CAYENNE_BUILD_DATE@] Error resolving fault for ObjectId:
> > <ObjectId:Resource, IDRESOURCE=1> and state (hollow). Possible cause -
> > matching row is missing from the database.
>What version of Cayenne are you actually using?

Haben Spinnen Ohren? Finden Sie es heraus – mit dem MSN Suche Superquiz via  Jetzt mitmachen und gewinnen!

View raw message