[jira] Commented: (CAY-1059) (Remote)IncrementalFaultList resolveAll() fails

From: Andrus Adamchik (JIRA) ("Andrus)
Date: Wed May 28 2008 - 07:20:52 EDT

  • Next message: Kevin Menard: "Re: 3.0 M4 Release Vote"

        [ https://issues.apache.org/cayenne/browse/CAY-1059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870#action_12870 ]

    Andrus Adamchik commented on CAY-1059:
    --------------------------------------

    Actually IncrementalFaultList (server-side one) has a property "maxFetchSize" which is by default set to 10000. This was done to address a similar problem for PostgreSQL. There's currently no way to change this parameter via ROP (or via a SelectQuery)... As a quick fix you may try some lower default values, and see which threshold works for Derby. If it is not too low, we can change that in Cayenne. For the future I guess that should become one of the query hints...

    > (Remote)IncrementalFaultList resolveAll() fails
    > ------------------------------------------------
    >
    > Key: CAY-1059
    > URL: https://issues.apache.org/cayenne/browse/CAY-1059
    > Project: Cayenne
    > Issue Type: Bug
    > Components: Cayenne Core Library
    > Environment: OS X 10.5 , derby, remote cayenne
    > Reporter: Marcin Skladaniec
    > Assignee: Andrus Adamchik
    >
    > Iterating trough all select query results is best done using non-paged query, but sometimes though it happens that the paged list has to be iterated also.
    > There is a method in the API resolveAll() which seems to be suited for this case, but unfortunately it does not work on big lists (in our case 50000+ records). I'm not sure if this is a derby thing only, but it seems like the generated expression (set of ObjectIdQueries) is too long.
    > Exception :
    > [java] java.sql.SQLException: Java exception: ': java.lang.StackOverflowError'.
    > [java] at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
    > [java] at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
    > [java] at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source)
    > [java] at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
    > [java] at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
    > [java] at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
    > [java] at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
    > [java] at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
    > [java] at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
    > [java] at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
    > [java] at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unknown Source)
    > [java] at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
    > [java] at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
    > [java] at org.apache.cayenne.conn.ConnectionWrapper.prepareStatement(ConnectionWrapper.java:274)
    > [java] at org.apache.cayenne.conn.ConnectionWrapper.prepareStatement(ConnectionWrapper.java:280)
    > [java] at org.apache.cayenne.access.TransactionConnectionDecorator.prepareStatement(TransactionConnectionDecorator.java:179)
    > [java] at org.apache.cayenne.access.trans.QueryAssembler.createStatement(QueryAssembler.java:118)
    > [java] at org.apache.cayenne.access.jdbc.SelectAction.performAction(SelectAction.java:72)
    > [java] at org.apache.cayenne.access.DataNodeQueryAction.runQuery(DataNodeQueryAction.java:58)
    > [java] at org.apache.cayenne.access.DataNode.performQueries(DataNode.java:230)
    > [java] at org.apache.cayenne.access.DataDomainQueryAction.runQuery(DataDomainQueryAction.java:424)
    > [java] at org.apache.cayenne.access.DataDomainQueryAction.access$000(DataDomainQueryAction.java:68)
    > [java] at org.apache.cayenne.access.DataDomainQueryAction$2.transform(DataDomainQueryAction.java:397)
    > [java] at org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:847)
    > [java] at org.apache.cayenne.access.DataDomainQueryAction.runQueryInTransaction(DataDomainQueryAction.java:394)
    > [java] at org.apache.cayenne.access.DataDomainQueryAction.execute(DataDomainQueryAction.java:120)
    > [java] at org.apache.cayenne.access.DataDomain.onQuery(DataDomain.java:740)
    > [java] at org.apache.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:317)
    > [java] at org.apache.cayenne.util.ObjectContextQueryAction.execute(ObjectContextQueryAction.java:96)
    > [java] at org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1336)
    > [java] at org.apache.cayenne.access.DataContext.performQuery(DataContext.java:1325)
    > [java] at org.apache.cayenne.access.IncrementalFaultList.resolveInterval(IncrementalFaultList.java:353)
    > [java] at org.apache.cayenne.access.IncrementalFaultList.subList(IncrementalFaultList.java:687)
    > [java] at org.apache.cayenne.access.ClientServerChannelQueryAction.interceptSinglePageQuery(ClientServerChannelQueryAction.java:109)
    > [java] at org.apache.cayenne.access.ClientServerChannelQueryAction.execute(ClientServerChannelQueryAction.java:65)
    > [java] at org.apache.cayenne.access.ClientServerChannel.onQuery(ClientServerChannel.java:82)
    > [java] at org.apache.cayenne.remote.service.DispatchHelper.dispatch(DispatchHelper.java:40)
    > [java] at org.apache.cayenne.remote.service.BaseRemoteService.processMessage(BaseRemoteService.java:153)
    > [java] at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
    > [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:393)
    > [java] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    > [java] at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
    > [java] at ish.oncourse.server.SecurityFilter.doFilter(SecurityFilter.java:112)
    > [java] at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
    > [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:726)
    > [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:842)
    > [java] at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:730)
    > [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.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
    > [java] Caused by: java.lang.StackOverflowError
    > [java] at org.apache.derby.impl.sql.compile.BinaryOperatorNode.bindExpression(Unknown Source)
    > [java] at org.apache.derby.impl.sql.compile.BinaryLogicalOperatorNode.bindExpression(Unknown Source)
    > [java] at org.apache.derby.impl.sql.compile.OrNode.bindExpression(Unknown Source)
    > [java] at org.apache.derby.impl.sql.compile.BinaryOperatorNode.bindExpression(Unknown Source)
    > [java] at org.apache.derby.impl.sql.compile.BinaryLogicalOperatorNode.bindExpression(Unknown Source)
    > [java] at org.apache.derby.impl.sql.compile.OrNode.bindExpression(Unknown Source)
    > [java] at org.apache.derby.impl.sql.compile.BinaryOperatorNode.bindExpression(Unknown Source)
    > [java] at org.apache.derby.impl.sql.compile.BinaryLogicalOperatorNode.bindExpression(Unknown Source)
    > [java] at org.apache.derby.impl.sql.compile.OrNode.bindExpression(Unknown Source)
    > [java] at org.apache.derby.impl.sql.compile.BinaryOperatorNode.bindExpression(Unknown Source)
    > [java] at org.apache.derby.impl.sql.compile.BinaryLogicalOperatorNode.bindExpression(Unknown Source)
    > [java] at org.apache.derby.impl.sql.compile.OrNode.bindExpression(Unknown Source)
    > [java] at org.apache.derby.impl.sql.compile.BinaryOperatorNode.bindExpression(Unknown Source)
    > [java] at org.apache.derby.impl.sql.compile.BinaryLogicalOperatorNode.bindExpression(Unknown Source)

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



    This archive was generated by hypermail 2.0.0 : Wed May 28 2008 - 07:21:20 EDT