Announcement

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

    Server returned FAILURE with no error message performing operation 'summary'

    Currently running gwt 2.3 and smartgwtpower 2.5 nightly. I am replicating the Dynamic Reporting example on the smart client ee showcase. The only difference I have is that the time filtering I have using a DateTimeItem instead of a DateItem in the DynamicForm. I'm also using advancedCriteria instead of criteria
    Code:
    <whereClause><![CDATA[ 
                    dynRepOrderItem.itemID = supplyItem.itemID 
                AND orderDate >= $advancedCriteria.startDate 
                AND orderDate <= $advancedCriteria.endDate 
               AND $defaultWhereClause
                ]]>  
            </whereClause>  
            <groupClause>  
                dynRepOrderItem.itemID, itemName,SKU, unitCost  
            </groupClause>  
            <groupWhereClause>($defaultWhereClause)</groupWhereClause>
    When the web app loads initially I get the error: Server returned FAILURE with no error message performing operation 'summary'
    Code:
    === 2011-11-30 18:17:16,514 [l0-5] DEBUG RPCManager - Request #1 (DSRequest) payload: {
        criteria:{
            operator:"and",
            criteria:[
                {
                    fieldName:null,
                    operator:"greaterOrEqual",
                    value:new Date(1322590636000)
                },
                {
                    fieldName:null,
                    operator:"lessOrEqual",
                    value:new Date(1322677036000)
                }
            ],
            _constructor:"AdvancedCriteria"
        },
        operationConfig:{
            dataSource:"MyProjectDataSource",
            operationType:"fetch",
            textMatchStyle:"substring"
        },
        startRow:0,
        endRow:75,
        componentId:"My_Project_Listgrid_1",
        appID:"builtinApplication",
        operation:"summary",
        oldValues:{
            operator:"and",
            criteria:[
                {
                    fieldName:null,
                    operator:"greaterOrEqual",
                    value:new Date(1322590636000)
                },
                {
                    fieldName:null,
                    operator:"lessOrEqual",
                    value:new Date(1322677036000)
                }
            ],
            _constructor:"AdvancedCriteria"
        }
    }
    === 2011-11-30 18:17:16,514 [l0-5] INFO  IDACall - Performing 1 operation(s)
    === 2011-11-30 18:17:16,514 [l0-5] WARN  RequestContext - dsRequest.execute() failed: 
    java.lang.NullPointerException
    	at com.isomorphic.datasource.IncludeFromDefinition.isDynamicInclusion(IncludeFromDefinition.java:31)
    	at com.isomorphic.datasource.DSRequest.buildIncludeFromDefinitions(DSRequest.java:3268)
    	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1610)
    	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$CachedChain.doFilter(ServletHandler.java:1097)
    	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
    	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
    	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
    	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)
    === 2011-11-30 18:17:16,515 [l0-5] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
    === 2011-11-30 18:17:16,516 [l0-5] DEBUG RPCManager - non-DMI response, dropExtraFields: false
    *******************************************************************************************************************
    18:17:16.665 [ERROR] [myproject] 18:17:16.664:XRP8:WARN:RPCManager:Server returned FAILURE with no error message performing operation 'summary'., response: {operationId: "summary", clientContext: Obj, context: Obj, transactionNum: 11, httpResponseCode: 200, httpResponseText: "//isc_RPCResponseStart-->[{queueStatus:-..."[123], xmlHttpRequest: [object XMLHttpRequest], transport: "xmlHttpRequest", status: -1, clientOnly: undef, httpHeaders: Obj, isStructured: true, callbackArgs: null, results: Obj, queueStatus: -1, isDSResponse: true, invalidateCache: false, data: null, startRow: 0, endRow: 0, totalRows: 0}
    com.smartgwt.client.core.JsObject$SGWT_WARN: 18:17:16.664:XRP8:WARN:RPCManager:Server returned FAILURE with no error message performing operation 'summary'., response: {operationId: "summary", clientContext: Obj, context: Obj, transactionNum: 11, httpResponseCode: 200, httpResponseText: "//isc_RPCResponseStart-->[{queueStatus:-..."[123], xmlHttpRequest: [object XMLHttpRequest], transport: "xmlHttpRequest", status: -1, clientOnly: undef, httpHeaders: Obj, isStructured: true, callbackArgs: null, results: Obj, queueStatus: -1, isDSResponse: true, invalidateCache: false, data: null, startRow: 0, endRow: 0, totalRows: 0}
        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:167)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
        at java.lang.Thread.run(Thread.java:662)
    If I try to change the date and hit the filter button, I get the same error thrown and no results. But I have a toolstrip with a refresh button that if I press it, it refreshes the table and I can then change the date in the dynamic form and I will stop getting the error and be able to filter and get results. Here is the refresh method.
    Code:
     Date aDate2 = new Date();
          theEndDateTimeItem.setValue(aDate2);
          CalendarUtil.addDaysToDate(aDate2, -1);
          theStartDateTimeItem.setValue(aDate2);
          theLastFilteredCriteria = theDateFilterForm.getValuesAsAdvancedCriteria();
    
          // filter the list grid
          theListGrid.invalidateCache();
          theListGrid.filterData(theLastFilteredCriteria);
    However, I do notice that when I select an item from a selectitem and click the filtereditor filter button, i don't get the correct results. For example if I have a column named Id and I click on an Id from the selectitem that appears in the table and click the filter editor filter button, i get no results.

    #2
    Be sure to mention which specific nightly (the string from the Developer Console lower-left-hand corner is the best indicator). Can you show the rest of your DataSource file? It looks like there's some confusion going on regarding the list of output fields.

    Comment


      #3
      Originally posted by Isomorphic
      Be sure to mention which specific nightly (the string from the Developer Console lower-left-hand corner is the best indicator). Can you show the rest of your DataSource file? It looks like there's some confusion going on regarding the list of output fields.
      SC_SNAPSHOT-2011-08-02/PowerEdition Deployment (built 2011-08-02)

      I had to edit the ds.xml file since it is proprietary but here it is
      Code:
       <fields>
              <field name="NAME" type="text" length="80">
                  <tableName>p_t</tableName>
              </field>            
              <field name="c_type" type="text" length="5">
                  <tableName>p_t</tableName>
              </field>
              <field name="b_number" type="integer">
                  <tableName>i_b</tableName>
              </field>
              <field name="i_name" type="text" length="10">
                  <tableName>i_b</tableName>
              </field>
              <field name="avg_a" type="float" customSQL="true"/>
              <field name="min_a" type="float" customSQL="true"/>
              <field name="max_a" type="float" customSQL="true"/>
          </fields>
      
      <operationBindings>
              <OperationBinding>
              	<operationId>summary</operationId>
                  <operationType>fetch</operationType>
                  <customFields>avg_a, min_a, max_a"</customFields>
                  <selectClause>p_t.NAME, p_t.c_type, 
                 		i_b.i_name, i_b.b_number,
      				avg(p_a.value) AS avg_a, 
      				min(p_a.value) AS min_a, 
      				max(p_a.value) AS max_a
                  </selectClause>
                  <tableClause>p, p_a_t, 
          			p_a, p_t, i_b</tableClause>
                  <whereClause><![CDATA[
                  	p.p_id = p_a.p_id 
                  	AND	p_a.p_a_t_ID = 
          			p_a_t.p_a_t_ID AND
          			p_t.p_t_ID = p.p_t_ID AND
          			p_t.i_b_ID = 
          			i_b.i_b_ID AND
          			(p_a_t.NAME = 'apple' OR 
          			p_a_t.NAME = 'orange') AND
          			p.START_TIMESTAMP between $advancedCriteria.startDateTime AND
          			$advancedCriteria.endDateTime AND
          			$defaultWhereClause]]>
          		</whereClause>
          	<groupClause>
          		p_t.NAME, p_t.c_type, 
          		i_b.i_name, i_b.b_number
          	</groupClause>
          	<groupWhereclause>($defaultWhereClause)</groupWhereclause>
              </OperationBinding>
          </operationBindings>
      Last edited by azuniga; 30 Nov 2011, 12:22.

      Comment


        #4
        I get another error also and I don't know if it can be related but here it is
        Code:
        20:38:06.989 [ERROR] [myproject] 20:38:06.988:TMR2[E]:WARN:VLayout:page4:members array: [ToolStrip ID:isc_ToolStrip_6],,[TabSet ID:isc_TabSet_5] includes null entry at position 1. Removing
        com.smartgwt.client.core.JsObject$SGWT_WARN: 20:38:06.988:TMR2[E]:WARN:VLayout:page4t:members array: [ToolStrip ID:isc_ToolStrip_6],,[TabSet ID:isc_TabSet_5] includes null entry at position 1. Removing
            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:167)
            at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
            at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
            at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
            at java.lang.Thread.run(Thread.java:662)

        Comment


          #5
          That doesn't look related - that would result from an addMembers() call in which nulls were passed in an Array.

          Comment


            #6
            The server-side NPE is happening because the server is being passed explicit null in field names in the criteria - note the
            Code:
            fieldName:null,
            lines in the criteria reported in the log.

            Comment


              #7
              The error was that I was adding bad criteria to the initial criteria of the listgrid. So I managed to get rid of the error. Now I am still faced with the filtering issue. When I click on the filtereditor filter button, it doesn't display the correct results. It isn't matching anything. When I click my filter button under the dynamic form, then i pass the dynamic form criteria along with the listgrid criteria and it displays the correct results. What could be the problem?

              Comment


                #8
                This probably indicates that server-side filtering does not match client-side filtering. For example, you are providing filter criteria for a given DataSource field and via your customized SQL this will return results. However if the same criteria were applied to the records you actually deliver to the client there would be no match.

                If it's impossible or just inconvenient to reconcile server and client-side filtering, you can disable client-side filtering for the grid by setting resultSet.useClientFiltering to false using ListGrid.dataProperties.

                Comment

                Working...
                X