[JIRA] Created: (CAY-830) DataChannelCallbackInterceptor.onQuery NPE

2007-07-12 Thread Ari Maniatis (JIRA)
DataChannelCallbackInterceptor.onQuery NPE
--

 Key: CAY-830
 URL: https://issues.apache.org/cayenne/browse/CAY-830
 Project: Cayenne
  Issue Type: Bug
  Components: Cayenne Core Library
Affects Versions: 3.0
Reporter: Ari Maniatis
Assignee: Andrus Adamchik
Priority: Blocker
 Fix For: 3.0


org.apache.cayenne.map.AshwoodEntitySorter line 309 has the line of code:
 QueryResponse response = context.getChannel().onQuery(null, query);

However, 
org.apache.cayenne.intercept.DataChannelCallbackInterceptor.onQuery(ObjectContext
 originatingContext, Query query) assumes that originatingContext is not null. 
This causes an exception in our production code which looks like this:

[java] at 
org.apache.cayenne.intercept.DataChannelCallbackInterceptor.onQuery(DataChannelCallbackInterceptor.java:82)
[java] at 
org.apache.cayenne.map.AshwoodEntitySorter.findReflexiveMaster(AshwoodEntitySorter.java:309)
[java] at 
org.apache.cayenne.map.AshwoodEntitySorter.sortObjectsForEntity(AshwoodEntitySorter.java:201)
[java] at 
org.apache.cayenne.access.DataDomainDeleteBucket.appendQueriesInternal(DataDomainDeleteBucket.java:94)
[java] at 
org.apache.cayenne.access.DataDomainSyncBucket.appendQueries(DataDomainSyncBucket.java:75)
[java] at 
org.apache.cayenne.access.DataDomainFlushAction.preprocess(DataDomainFlushAction.java:185)
[java] at 
org.apache.cayenne.access.DataDomainFlushAction.flush(DataDomainFlushAction.java:133)
[java] at org.apache.cayenne.access.DataDomain.onSyncFlush(DataDomain.java:786)
[java] at org.apache.cayenne.access.DataDomain$2.transform(DataDomain.java:757)
[java] at 
org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:802)
[java] at org.apache.cayenne.access.DataDomain.onSync(DataDomain.java:754)
[java] at 
org.apache.cayenne.intercept.DataChannelCallbackInterceptor.onSync(DataChannelCallbackInterceptor.java:106)
[java] at 
org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:1157)
[java] at 
org.apache.cayenne.access.DataContext.onContextFlush(DataContext.java:1113)
[java] at org.apache.cayenne.access.DataContext.onSync(DataContext.java:1091)
[java] at 
org.apache.cayenne.access.ClientServerChannel.onSync(ClientServerChannel.java:103)
[java] at 
org.apache.cayenne.intercept.DataChannelDecorator.onSync(DataChannelDecorator.java:64)
[java] at 
ish.oncourse.server.cayenne.ChannelTransactionDecorator.onSync(ChannelTransactionDecorator.java:48)
[java] at 
org.apache.cayenne.remote.service.DispatchHelper.dispatch(DispatchHelper.java:44)
[java] at 
org.apache.cayenne.remote.service.BaseRemoteService.processMessage(BaseRemoteService.java:151)

originatingContext needs to be wrapped to protect against nulls, but I can't 
see what is required.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: [JIRA] Created: (CAY-830) DataChannelCallbackInterceptor.onQuery NPE

2007-07-12 Thread Andrus Adamchik

Hi Ari,

let me check it out.

AFAIK you are using your own trunk builds, so it is not critical to  
add the fix to the M1 tag (that would require another round of  
regression testing)?


Andrus


On Jul 12, 2007, at 11:51 AM, Ari Maniatis (JIRA) wrote:


DataChannelCallbackInterceptor.onQuery NPE
--

 Key: CAY-830
 URL: https://issues.apache.org/cayenne/browse/CAY-830
 Project: Cayenne
  Issue Type: Bug
  Components: Cayenne Core Library
Affects Versions: 3.0
Reporter: Ari Maniatis
Assignee: Andrus Adamchik
Priority: Blocker
 Fix For: 3.0


org.apache.cayenne.map.AshwoodEntitySorter line 309 has the line of  
code:

 QueryResponse response = context.getChannel().onQuery(null, query);

However,  
org.apache.cayenne.intercept.DataChannelCallbackInterceptor.onQuery 
(ObjectContext originatingContext, Query query) assumes that  
originatingContext is not null. This causes an exception in our  
production code which looks like this:


[java] at  
org.apache.cayenne.intercept.DataChannelCallbackInterceptor.onQuery 
(DataChannelCallbackInterceptor.java:82)
[java] at  
org.apache.cayenne.map.AshwoodEntitySorter.findReflexiveMaster 
(AshwoodEntitySorter.java:309)
[java] at  
org.apache.cayenne.map.AshwoodEntitySorter.sortObjectsForEntity 
(AshwoodEntitySorter.java:201)
[java] at  
org.apache.cayenne.access.DataDomainDeleteBucket.appendQueriesInternal 
(DataDomainDeleteBucket.java:94)
[java] at  
org.apache.cayenne.access.DataDomainSyncBucket.appendQueries 
(DataDomainSyncBucket.java:75)
[java] at org.apache.cayenne.access.DataDomainFlushAction.preprocess 
(DataDomainFlushAction.java:185)
[java] at org.apache.cayenne.access.DataDomainFlushAction.flush 
(DataDomainFlushAction.java:133)
[java] at org.apache.cayenne.access.DataDomain.onSyncFlush 
(DataDomain.java:786)
[java] at org.apache.cayenne.access.DataDomain$2.transform 
(DataDomain.java:757)
[java] at org.apache.cayenne.access.DataDomain.runInTransaction 
(DataDomain.java:802)
[java] at org.apache.cayenne.access.DataDomain.onSync 
(DataDomain.java:754)
[java] at  
org.apache.cayenne.intercept.DataChannelCallbackInterceptor.onSync 
(DataChannelCallbackInterceptor.java:106)
[java] at org.apache.cayenne.access.DataContext.flushToParent 
(DataContext.java:1157)
[java] at org.apache.cayenne.access.DataContext.onContextFlush 
(DataContext.java:1113)
[java] at org.apache.cayenne.access.DataContext.onSync 
(DataContext.java:1091)
[java] at org.apache.cayenne.access.ClientServerChannel.onSync 
(ClientServerChannel.java:103)
[java] at org.apache.cayenne.intercept.DataChannelDecorator.onSync 
(DataChannelDecorator.java:64)
[java] at  
ish.oncourse.server.cayenne.ChannelTransactionDecorator.onSync 
(ChannelTransactionDecorator.java:48)
[java] at org.apache.cayenne.remote.service.DispatchHelper.dispatch 
(DispatchHelper.java:44)
[java] at  
org.apache.cayenne.remote.service.BaseRemoteService.processMessage 
(BaseRemoteService.java:151)


originatingContext needs to be wrapped to protect against nulls,  
but I can't see what is required.


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.






Re: [JIRA] Created: (CAY-830) DataChannelCallbackInterceptor.onQuery NPE

2007-07-12 Thread Aristedes Maniatis


On 12/07/2007, at 7:23 PM, Andrus Adamchik wrote:

AFAIK you are using your own trunk builds, so it is not critical to  
add the fix to the M1 tag (that would require another round of  
regression testing)?


Yep, we are pretty cutting edge here. We've just moved to trunk of  
Cayenne for our own onCourse product, but we are finding the new  
features and fixes there invaluable and the stability is perfect. We  
are going through an extensive testing phase now for the next release  
of onCourse and this is the only Cayenne bug which has arisen so far.  
This is pretty good timing since it coincides nicely with the testing  
of 3.0M1 so we hope to give it a good workout.


At least 2-3 times a day we have been creating 300Mb databases  
through Cayenne (with real data from a client) and all is working  
really well against Cayenne trunk.


However, if this bug is serious then maybe a fix should be included  
in M1. I don't know since we haven't pinpointed the code which  
triggers it, just the problem inside Cayenne. I guess you'll know  
more when you look at it. I have an uncommitted change to Cayenne  
which helped us find this bug in the first place so I might commit  
that now.


Ari



-->
Aristedes Maniatis
phone +61 2 9660 9700
PGP fingerprint 08 57 20 4B 80 69 59 E2  A9 BF 2D 48 C2 20 0C C8




PGP.sig
Description: This is a digitally signed message part


Re: [JIRA] Created: (CAY-830) DataChannelCallbackInterceptor.onQuery NPE

2007-07-14 Thread Andrus Adamchik

Hi Ari,

I just committed a fix to trunk. If you could verify that it is  
indeed fixed, I'll patch the M1 tag (isn't SVN nice - you can patch a  
tag :-)).


Andrus


On Jul 12, 2007, at 12:33 PM, Aristedes Maniatis wrote:



On 12/07/2007, at 7:23 PM, Andrus Adamchik wrote:

AFAIK you are using your own trunk builds, so it is not critical  
to add the fix to the M1 tag (that would require another round of  
regression testing)?


Yep, we are pretty cutting edge here. We've just moved to trunk of  
Cayenne for our own onCourse product, but we are finding the new  
features and fixes there invaluable and the stability is perfect.  
We are going through an extensive testing phase now for the next  
release of onCourse and this is the only Cayenne bug which has  
arisen so far. This is pretty good timing since it coincides nicely  
with the testing of 3.0M1 so we hope to give it a good workout.


At least 2-3 times a day we have been creating 300Mb databases  
through Cayenne (with real data from a client) and all is working  
really well against Cayenne trunk.


However, if this bug is serious then maybe a fix should be included  
in M1. I don't know since we haven't pinpointed the code which  
triggers it, just the problem inside Cayenne. I guess you'll know  
more when you look at it. I have an uncommitted change to Cayenne  
which helped us find this bug in the first place so I might commit  
that now.


Ari



-->
Aristedes Maniatis
phone +61 2 9660 9700
PGP fingerprint 08 57 20 4B 80 69 59 E2  A9 BF 2D 48 C2 20 0C C8






Re: [JIRA] Created: (CAY-830) DataChannelCallbackInterceptor.onQuery NPE

2007-07-14 Thread Marcin Skladaniec

Hi Andrus
I have tested the patch briefly, could not reproduce the problem we  
were seeing anymore, so everything seems good. We will do some more  
testing during next week.


Thank you for the quick patch !
Marcin


On 15/07/2007, at 7:22 AM, Andrus Adamchik wrote:


Hi Ari,

I just committed a fix to trunk. If you could verify that it is  
indeed fixed, I'll patch the M1 tag (isn't SVN nice - you can patch  
a tag :-)).


Andrus


On Jul 12, 2007, at 12:33 PM, Aristedes Maniatis wrote:



On 12/07/2007, at 7:23 PM, Andrus Adamchik wrote:

AFAIK you are using your own trunk builds, so it is not critical  
to add the fix to the M1 tag (that would require another round of  
regression testing)?


Yep, we are pretty cutting edge here. We've just moved to trunk of  
Cayenne for our own onCourse product, but we are finding the new  
features and fixes there invaluable and the stability is perfect.  
We are going through an extensive testing phase now for the next  
release of onCourse and this is the only Cayenne bug which has  
arisen so far. This is pretty good timing since it coincides  
nicely with the testing of 3.0M1 so we hope to give it a good  
workout.


At least 2-3 times a day we have been creating 300Mb databases  
through Cayenne (with real data from a client) and all is working  
really well against Cayenne trunk.


However, if this bug is serious then maybe a fix should be  
included in M1. I don't know since we haven't pinpointed the code  
which triggers it, just the problem inside Cayenne. I guess you'll  
know more when you look at it. I have an uncommitted change to  
Cayenne which helped us find this bug in the first place so I  
might commit that now.


Ari



-->
Aristedes Maniatis
phone +61 2 9660 9700
PGP fingerprint 08 57 20 4B 80 69 59 E2  A9 BF 2D 48 C2 20 0C C8






Marcin