cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aristedes Maniatis <...@ish.com.au>
Subject Re: Strange Exception
Date Sat, 12 Jan 2008 01:22:49 GMT

On 12/01/2008, at 11:42 AM, Gary Jarrel wrote:

> Caused by: java.lang.NullPointerException
>        at org.apache.cayenne.access.DataContext$1.visitToOne(
> DataContext.java:599)

Hmm... the line in question is:

Map idParts = target.getObjectId().getIdSnapshot();

I can't imagine why the objectId for the target (toOne) record is  
null. (target can't be null in that bit of code.) Perhaps you can  
examine the contents of your context at that point a bit further to  
glean more information.

As for your question about handling the exception, it sounds like the  
easiest approach is to throw out the context and create a new one. Are  
you using one context per logged in web session?

Interesting site by the way: I've done a bit of work for real estate  
agents and it was unusual to find technology literate agents.

Cheers
Ari Maniatis


-------------------------->
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001   fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A



Mime
View raw message