Yes, it seems to have a problem with the 'awakeFromDeserialization' function. Not sure to understand what you mean by 'code called before cayenne is loaded' but for your information the code that crash is called by a jsf action method.
Moreover, the problem seems to come from 'relationship objects' (in my case: m_editableGroup.getGroupContentArray()). To summarize: 1) In a backing bean, I create a child data context and store it as a member variable. 2) I link entity objects to that child data context. 3) I modify those entity objects 4) I shut down the tomcat server 5) I restart the the tomcat server 6) I call a jsf action method (in my business, a save) and then the crash appear :| Thank you for your help. Marc -----Original Message----- From: Andrus Adamchik [mailto:[EMAIL PROTECTED] Sent: Sunday, April 01, 2007 3:25 PM To: [email protected] Subject: Re: Cayenne -- Apache automatic deploy problem This likely means that 'awakeFromDeserialization' [1] failed to attach DataContext to Cayenne stack. Is it possible that the code in question called before Cayenne stack is loaded? Where is it called anyways? Andrus [1] http://svn.apache.org/repos/asf/cayenne/main/branches/STABLE-2.0/ cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/access/ DataContext.java On Mar 30, 2007, at 10:55 AM, Marc Gabriel-Willem wrote: > Hello, > > I checked the entity resolver value. > Indeed, in this situation the value is 'null'. > > Marc > > -----Original Message----- > From: Andrus Adamchik [mailto:[EMAIL PROTECTED] > Sent: Friday, March 30, 2007 4:16 PM > To: [email protected] > Subject: Re: Cayenne -- Apache automatic deploy problem > > I can't reproduce this error in a test case. I am out of ideas what > might have caused it. Can you possibly debug this condition to figure > out why the 'metadata' field in DataContextQueryAction is null? First > thing to check: > > m_editableGroup.getObjectContext().getEntityResolver() != null > > > Andrus > > > On Mar 30, 2007, at 5:24 PM, Marc Gabriel-Willem wrote: > >> Hello, >> >> Sorry, it is the first time I'm using a list like this one. So, I'm >> doing some crazy error with it :) For example, I hope my "reply >> all" is >> a correct action to do in this case. >> >> I saw your first reply. >> >> I have exactly the same error when I stop and restart properly the >> Tomcat server. In fact, stoping and restarting the server simulate >> the >> serialization / deserialization operation that an application >> server can >> do at any time it wants (isn't it ?) >> >> Marc >> >> -----Original Message----- >> From: Andrus Adamchik [mailto:[EMAIL PROTECTED] >> Sent: Friday, March 30, 2007 3:09 PM >> To: [email protected] >> Cc: Marc Gabriel-Willem >> Subject: Re: Cayenne -- Apache automatic deploy problem >> >> Hi, See my original reply asking for more information here: >> >> http://objectstyle.org/cayenne/lists/cayenne-user/2007/03/0101.html >> >> BTW, it would be much easier to communicate if you subscribe to the >> list :-) >> >> Andrus >> >> >> On Mar 30, 2007, at 4:46 PM, Marc Gabriel-Willem wrote: >> >>> Hi, >>> >>> >>> >>> Sorry to repost that question, but I was not properly register to >>> the >>> mailing list, so I was unable to reply properly. >>> >>> >>> >>> I'm using Cayenne (2.0.2) with the apache web server (5.5.20) and >>> I'm >>> facing to the following problem. >>> >>> >>> >>> When apache does an automatic deploy, all objects are serialized / >>> deserialized without any error. >>> >>> But after that, when the code accesses a cayenne persistent object >>> (member variable of a jsf backing bean), the following problem >>> occurs: >>> >>> >>> >>> Caused by: java.lang.NullPointerException >>> >>> at >>> org.apache.cayenne.access.DataContextQueryAction.interceptPaginatedQ >>> u > >>> e >> >>> ry >>> (DataContextQueryAction.java:91) >>> >>> at >>> org.apache.cayenne.access.DataContextQueryAction.execute >>> (DataContextQuer >>> yAction.java:50) >>> >>> at >>> org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1387) >>> >>> at >>> org.apache.cayenne.access.DataContext.performQuery(DataContext.java: >>> 1376 >>> ) >>> >>> at >>> org.apache.cayenne.access.ToManyList.resolvedObjectList >>> (ToManyList.java: >>> 307) >>> >>> at >>> org.apache.cayenne.access.ToManyList.size(ToManyList.java:260) >>> >>> at >>> com.sideinternational.web.profiling.group.GroupEditor.save >>> (GroupEditor.j >>> ava:246) >>> >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>> Method) >>> >>> at >>> sun.reflect.NativeMethodAccessorImpl.invoke >>> (NativeMethodAccessorImpl.jav >>> a:39) >>> >>> at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke >>> (DelegatingMethodAccessor >>> Impl.java:25) >>> >>> at java.lang.reflect.Method.invoke(Method.java:585) >>> >>> at >>> org.apache.myfaces.el.MethodBindingImpl.invoke >>> (MethodBindingImpl.java:13 >>> 2) >>> >>> >>> >>> For information, the following code throws that exception (the >>> call to >>> the size() method) : >>> >>> List itemsToRemove = m_editableGroup.getGroupContentArray(); >>> >>> for (int i=0; i < itemsToRemove.size(); i) >>> >>> ... >>> >>> Note: Child data context and ObjectEntities are stored in a >>> serializable >>> jsf backing bean. >>> >>> >>> >>> Thank you for your help. >>> >>> >>> >>> Marc Gabriel >>> >>> >>> >>> >>> >> >> >> > > >
