Thank you for the quick reply!
On Jan 12, 2008 12:22 PM, Aristedes Maniatis <ar..sh.com.au> wrote:
>
> 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.
I have looked at that line as well and it didn't make sense to me on how it
could throw a NPE especially given that it tends to work most of the time!
I'll investigate in the debugger in a minute and will report.
>
>
> 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?
I tend to use the WebApplicationContextFilter to handle thread binding of
the data context. Is there another strattegy for disposing of the data
context for every request? As I do not thinl that the
WebApplicationContextFilter actually disposes of the context!
>
>
> 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.
>
Thank you! :) I will second that about real estate agents. I do both real
estate and IT (yes I know it sounds strange) and the contrast in how people
respond to you when you tell them that you are a real estate agent vs an IT
consultant is astonishing! My advice is to stick to IT :)
>
> Cheers
> Ari Maniatis
>
Thank you for the reply!
Gary
This archive was generated by hypermail 2.0.0 : Fri Jan 11 2008 - 20:44:55 EST