Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    fetchData on Datasource error with Advanced criteria

    Isomorphic,

    I get the following error when trying to call a fetchData with AdvancedCriteria on a DataSource.

    Code:
    queueStatus: -1}
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    	at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
    	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292)
    	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
    	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
    	at java.lang.Thread.run(Thread.java:662)
    whereas it works fine when I use Criteria object instead.

    Code:
    DSRequest graphDSRequest = new DSRequest();
            graphDSRequest.setOperationId("summaryDirectionalAggregateGraph");
            DataSource dataSource = DataSource.get("graphsodmidt");
            dataSource.setWillHandleAdvancedCriteria(true);
            dataSource.fetchData(new AdvancedCriteria(), new DSCallback() {
                @Override
                public void execute(DSResponse dsResponse, Object o, DSRequest dsRequest) {
                }
            }, graphDSRequest);
    the line setWillHandleAdvancedCriteria has no difference on the outcome.

    version: SC_SNAPSHOT-2012-01-17_v8.2p/Enterprise Deployment 2012-01-17

    Thanks.

    #2
    It looks like you tried to copy and paste the error but it was cut off. This also looks like it's happening only once results are returned, so include the response as shown in the RPC tab. And, it suggests a server error, if so, include the server logs for the request.

    Comment


      #3
      Isomorphic,

      server logs:

      Code:
      === 2012-02-09 01:53:06,180 [l0-9] DEBUG RPCManager - Request #1 (DSRequest) payload: {
          criteria:{
              _constructor:"AdvancedCriteria"
          },
          operationConfig:{
              dataSource:"graphsodmidt",
              operationType:"fetch"
          },
          appID:"builtinApplication",
          operation:"summaryDirectionalAggregateGraph",
          oldValues:{
              _constructor:"AdvancedCriteria"
          }
      }
      === 2012-02-09 01:53:06,180 [l0-9] INFO  IDACall - Performing 1 operation(s)
      === 2012-02-09 01:53:06,188 [l0-9] DEBUG AppBase - [builtinApplication.summaryDirectionalAggregateGraph] No userTypes defined, allowing anyone access to all operations for this application
      === 2012-02-09 01:53:06,189 [l0-9] DEBUG AppBase - [builtinApplication.summaryDirectionalAggregateGraph] No public zero-argument method named '_summaryDirectionalAggregateGraph' found, performing generic datasource operation
      === 2012-02-09 01:53:06,189 [l0-9] INFO  SQLDataSource - [builtinApplication.summaryDirectionalAggregateGraph] Performing fetch operation with
      	criteria: {_constructor:"AdvancedCriteria"}	values: {_constructor:"AdvancedCriteria"}
      === 2012-02-09 01:53:06,222 [l0-9] WARN  RequestContext - dsRequest.execute() failed: 
      java.lang.NullPointerException
      	at com.isomorphic.datasource.IncludeFromDefinition.isDynamicInclusion(IncludeFromDefinition.java:31)
      	at com.isomorphic.sql.SQLWhereClause.buildAdvancedExpression(SQLWhereClause.java:850)
      	at com.isomorphic.sql.SQLWhereClause.getOutput(SQLWhereClause.java:398)
      	at com.isomorphic.sql.SQLWhereClause.toString(SQLWhereClause.java:307)
      	at com.isomorphic.sql.SQLWhereClause.getSQLString(SQLWhereClause.java:313)
      	at com.isomorphic.sql.SQLDataSource.getClausesContext(SQLDataSource.java:2109)
      	at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1212)
      	at com.isomorphic.sql.SQLDataSource.processRequest(SQLDataSource.java:293)
      	at com.isomorphic.sql.SQLDataSource.executeFetch(SQLDataSource.java:237)
      	at com.isomorphic.datasource.DataSource.execute(DataSource.java:1287)
      	at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:721)
      	at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658)
      	at com.isomorphic.application.AppBase.execute(AppBase.java:491)
      	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1948)
      	at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:199)
      	at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:156)
      	at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:121)
      	at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
      	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
      	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
      	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
      	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
      	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      	at org.mortbay.jetty.Server.handle(Server.java:324)
      	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
      	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
      	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
      	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
      	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
      	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
      	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
      === 2012-02-09 01:53:06,237 [l0-9] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
      === 2012-02-09 01:53:06,239 [l0-9] DEBUG RPCManager - non-DMI response, dropExtraFields: false
      and the rpc output:

      Code:
      [
          {
              invalidateCache:false, 
              isDSResponse:true, 
              queueStatus:-1, 
              status:-1, 
              data:null
          }
      ]
      Thanks.

      Comment


        #4
        Are you using the ListGridField.includeFrom or DataSourceField.includeFrom feature? If so, it appears you set includeFrom="" or something else invalid (as in - does not conform to the expected identifier.identifier format).

        Comment


          #5
          Isomorphic,

          I'm not using a includeFrom feature here.

          Thanks.

          Comment


            #6
            The AdvancedCriteria you're passing is invalid because it's empty. 3.1d builds reject it with a clearer error message and we'll add this to 3.0p, but regardless, you should fix your code to not send empty criteria like this - if you want to send blank criteria, send "new Criteria()" instead.

            Comment


              #7
              Isomorphic,

              I observed this issue with a non-empty AdvancedCriteria. I just made it empty to make the test case simpler. I will try to create a sample testcase with a non-empty AdvancedCriteria.

              Thanks.

              Comment

              Working...
              X