cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ari Maniatis (JIRA)" <j...@apache.org>
Subject [jira] Closed: (CAY-1172) in ROP inheritance fails on select query
Date Sat, 09 Jan 2010 01:28:54 GMT

     [ https://issues.apache.org/jira/browse/CAY-1172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ari Maniatis closed CAY-1172.
-----------------------------

    Resolution: Not A Problem

> in ROP inheritance fails on select query
> ----------------------------------------
>
>                 Key: CAY-1172
>                 URL: https://issues.apache.org/jira/browse/CAY-1172
>             Project: Cayenne
>          Issue Type: Bug
>          Components: ROP
>    Affects Versions: 3.0M5
>         Environment: cayenne build from svn on 20th Jan'08, ROP, derby, os x
>            Reporter: Marcin Skladaniec
>
> When performing a query for "ArticleProduct" class on remote client the following exception
is thrown:
>   [java] 21 Jan 2009 17:45:40,643 [btpool0-2       ] INFO  org.apache.cayenne.access.QueryLogger
:473 - --- will run 1 query.
>      [java] 21 Jan 2009 17:45:40,643 [btpool0-2       ] INFO  org.apache.cayenne.access.QueryLogger
:427 - --- transaction started.
>      [java] 21 Jan 2009 17:45:40,644 [btpool0-2       ] INFO  org.apache.cayenne.access.QueryLogger
:357 - SELECT t0.id FROM Product t0 WHERE (t0.isDeleted IS NULL) OR (t0.isDeleted = ?) OR
(t0.type = ?) OR (t0.type = ?) OR (t0.type = ?) ORDER BY t0.name [bind: 1->isDeleted:0,
2->type:1, 3->type:2, 4->type:3]
>      [java] 21 Jan 2009 17:45:40,654 [btpool0-2       ] INFO  org.apache.cayenne.access.QueryLogger
:401 - === returned 3 rows. - took 14 ms.
>      [java] 21 Jan 2009 17:45:40,654 [btpool0-2       ] INFO  org.apache.cayenne.access.QueryLogger
:434 - +++ transaction committed.
>      [java] 21 Jan 2009 17:45:40,655 [btpool0-2       ] INFO  org.apache.cayenne.access.QueryLogger
:473 - --- will run 1 query.
>      [java] 21 Jan 2009 17:45:40,657 [btpool0-2       ] INFO  org.apache.cayenne.access.QueryLogger
:427 - --- transaction started.
>      [java] 21 Jan 2009 17:45:40,666 [btpool0-2       ] INFO  org.apache.cayenne.access.QueryLogger
:357 - SELECT t0.id, t0.modifiedOn, t0.type, t0.notes, t0.isDeleted, t0.isWebVisible, t0.willowId,
t0.incomeAccountId, t0.description, t0.taxId, t0.isOnSale, t0.priceExTax, t0.createdOn, t0.name,
t0.SKU, t0.weight, t0.expiryDays, t0.expiryType, t0.value, t0.liabilityAccountId FROM Product
t0 WHERE ((t0.id = ?) OR (t0.id = ?) OR (t0.id = ?)) AND ((t0.isDeleted IS NULL) OR (t0.isDeleted
= ?) OR (t0.type = ?) OR (t0.type = ?) OR (t0.type = ?)) [bind: 1->id:240, 2->id:220,
3->id:200, 4->isDeleted:0, 5->type:1, 6->type:2, 7->type:3] - prepared in 9
ms.
>      [java] 21 Jan 2009 17:45:40,703 [btpool0-2       ] INFO  org.apache.cayenne.access.QueryLogger
:453 - *** error.
>      [java] java.lang.NullPointerException
>      [java] 	at org.apache.cayenne.exp.parser.SimpleNode.evaluateChild(SimpleNode.java:315)
>      [java] 	at org.apache.cayenne.exp.parser.ASTEqual.evaluateNode(ASTEqual.java:61)
>      [java] 	at org.apache.cayenne.exp.parser.SimpleNode.evaluate(SimpleNode.java:327)
>      [java] 	at org.apache.cayenne.exp.parser.SimpleNode.evaluateChild(SimpleNode.java:315)
>      [java] 	at org.apache.cayenne.exp.parser.ASTOr.evaluateNode(ASTOr.java:69)
>      [java] 	at org.apache.cayenne.exp.parser.SimpleNode.evaluate(SimpleNode.java:327)
>      [java] 	at org.apache.cayenne.exp.Expression.match(Expression.java:367)
>      [java] 	at org.apache.cayenne.map.EntityInheritanceTree.entityMatchingRow(EntityInheritanceTree.java:92)
>      [java] 	at org.apache.cayenne.access.jdbc.DataRowPostProcessor.getOverrides(DataRowPostProcessor.java:147)
>      [java] 	at org.apache.cayenne.access.jdbc.DataRowPostProcessor.postprocessRow(DataRowPostProcessor.java:128)
>      [java] 	at org.apache.cayenne.access.jdbc.InheritanceAwareRowReader.postprocessRow(InheritanceAwareRowReader.java:45)
>      [java] 	at org.apache.cayenne.access.jdbc.FullRowReader.readRow(FullRowReader.java:54)
>      [java] 	at org.apache.cayenne.access.jdbc.FullRowReader.readRow(FullRowReader.java:31)
>      [java] 	at org.apache.cayenne.access.jdbc.JDBCResultIterator.nextRow(JDBCResultIterator.java:194)
>      [java] 	at org.apache.cayenne.access.jdbc.JDBCResultIterator.allRows(JDBCResultIterator.java:171)
>      [java] 	at org.apache.cayenne.access.jdbc.SelectAction.performAction(SelectAction.java:155)
>      [java] 	at org.apache.cayenne.access.DataNodeQueryAction.runQuery(DataNodeQueryAction.java:87)
>      [java] 	at org.apache.cayenne.access.DataNode.performQueries(DataNode.java:236)
>      [java] 	at org.apache.cayenne.access.DataDomainQueryAction.runQuery(DataDomainQueryAction.java:422)
>      [java] 	at org.apache.cayenne.access.DataDomainQueryAction.access$000(DataDomainQueryAction.java:66)
>      [java] 	at org.apache.cayenne.access.DataDomainQueryAction$2.transform(DataDomainQueryAction.java:395)
>      [java] 	at org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:846)
>      [java] 	at org.apache.cayenne.access.DataDomainQueryAction.runQueryInTransaction(DataDomainQueryAction.java:392)
>      [java] 	at org.apache.cayenne.access.DataDomainQueryAction.execute(DataDomainQueryAction.java:118)
>      [java] 	at org.apache.cayenne.access.DataDomain.onQuery(DataDomain.java:739)
>      [java] 	at org.apache.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:316)
>      [java] 	at org.apache.cayenne.util.ObjectContextQueryAction.execute(ObjectContextQueryAction.java:95)
>      [java] 	at org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1267)
>      [java] 	at org.apache.cayenne.access.DataContext.performQuery(DataContext.java:1256)
>      [java] 21/01/2009 17:45:40 com.caucho.hessian.server.HessianSkeleton invoke
>      [java] WARNING: org.apache.cayenne.CayenneRuntimeException: [v.3.0-SNAPSHOT ${project.build.date}
${project.build.time}] Exception processing message org.apache.cayenne.remote.QueryMessage
of type Query
>      [java] 	at org.apache.cayenne.access.IncrementalFaultList.resolveInterval(IncrementalFaultList.java:295)
>      [java] 	at org.apache.cayenne.access.IncrementalFaultList.get(IncrementalFaultList.java:550)
>      [java] 	at org.apache.cayenne.access.IncrementalFaultList$1.next(IncrementalFaultList.java:467)
>      [java] 	at org.apache.cayenne.access.ClientServerChannelQueryAction.toClientObjects(ClientServerChannelQueryAction.java:187)
>      [java] 	at org.apache.cayenne.access.ClientServerChannelQueryAction.interceptObjectConversion(ClientServerChannelQueryAction.java:162)
>      [java] 	at org.apache.cayenne.access.ClientServerChannelQueryAction.execute(ClientServerChannelQueryAction.java:69)
>      [java] 	at org.apache.cayenne.access.ClientServerChannel.onQuery(ClientServerChannel.java:81)
>      [java] 	at org.apache.cayenne.remote.service.DispatchHelper.dispatch(DispatchHelper.java:39)
>      [java] 	at org.apache.cayenne.remote.service.BaseRemoteService.processMessage(BaseRemoteService.java:152)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:585)
>      [java] 	at com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:180)
>      [java] 	at com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:109)
>      [java] 	at com.caucho.hessian.server.HessianServlet.service(HessianServlet.java:396)
>      [java] 	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>      [java] 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097)
>      [java] 	at ish.oncourse.server.SecurityFilter.doFilter(SecurityFilter.java:103)
>      [java] 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
>      [java] 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
>      [java] 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>      [java] 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>      [java] 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
>      [java] 	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
>      [java] 	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>      [java] 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>      [java] 	at org.mortbay.jetty.Server.handle(Server.java:324)
>      [java] 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>      [java] 	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
>      [java] 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:729)
>      [java] 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
>      [java] 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>      [java] 	at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
>      [java] 	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
> the model is defined as follows:
> <obj-entity name="ArticleProduct" superEntityName="Product" className="ish.oncourse.server.cayenne.ArticleProduct"
clientClassName="ish.oncourse.cayenne.ArticleProduct">
> 		<qualifier><![CDATA[type = 1]]></qualifier>
> 		<obj-attribute name="weight" type="java.lang.Double" db-attribute-path="weight"/>
> </obj-entity>
> <obj-entity name="Product" abstract="true" className="ish.oncourse.server.cayenne.Product"
clientClassName="ish.oncourse.cayenne.Product" dbEntityName="Product" superClassName="ish.oncourse.server.cayenne.glue.CayenneDataObject"
clientSuperClassName="ish.oncourse.cayenne.glue.PersistentObject">
> 		<qualifier><![CDATA[(isDeleted = null) or (isDeleted = 0)]]></qualifier>
> 		<obj-attribute name="createdOn" type="java.util.Date" db-attribute-path="createdOn"/>
> 		<obj-attribute name="description" type="java.lang.String" db-attribute-path="description"/>
> 		<obj-attribute name="isDeleted" type="java.lang.Boolean" db-attribute-path="isDeleted"/>
> 		<obj-attribute name="isOnSale" type="java.lang.Boolean" db-attribute-path="isOnSale"/>
> 		<obj-attribute name="isWebVisible" type="java.lang.Boolean" db-attribute-path="isWebVisible"/>
> 		<obj-attribute name="modifiedOn" type="java.util.Date" db-attribute-path="modifiedOn"/>
> 		<obj-attribute name="name" type="java.lang.String" db-attribute-path="name"/>
> 		<obj-attribute name="notes" type="java.lang.String" db-attribute-path="notes"/>
> 		<obj-attribute name="priceExTax" type="ish.math.Money" db-attribute-path="priceExTax"/>
> 		<obj-attribute name="sku" type="java.lang.String" db-attribute-path="SKU"/>
> 		<obj-attribute name="type" type="ish.oncourse.cayenne.ProductType" db-attribute-path="type"/>
> 		<obj-attribute name="willowId" type="java.lang.Long" db-attribute-path="willowId"/>
> 	</obj-entity>

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


Mime
View raw message