Announcement

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

    #16
    The serverObject isn't sent to the client, since the client doesn't use it, thats why its not shown when dumping to JS.

    But since you've shown the XML now, we can tell you that the problem is that with this style of DataSource creation you are bypassing DMI (since you are directly calling DataSource.execute()). You should reorganize your code into a Custom DataSource instead (which is straightforward).

    Comment


      #17
      I don’t quite understand what you mean by:"with this style of DataSource creation you are bypassing DMI ". Is there a better way to define the datasource that do not by passing DMI? What do you recommend? The code doesn't have to be the way that I wrote,

      What do you mean by: "since you are directly calling DataSource.execute()). You should reorganize your code into a Custom DataSource instead (which is straightforward).", I don't know any other way besides DataSource.execute?
      What is the recommended way? What is that to do with Custom DataSource?

      Could you write a few line of psudo code to outline what I should do? If there is any example, please point me to it.

      Thanks!

      Comment


        #18
        So again, reorganize your code into a Custom DataSource rather than a DMI. There's a QuickStart Guide discussion of Custom DataSources as well as samples in the EE Showcase.

        Comment


          #19
          Thanks.
          I did as you have suggested, inherit the serverobject from BasicDataSource. It works fine with regular fetch. But the fetch initiated from
          fsDisplayDataGrid.exportData({exportAs:'xls',exportDisplay:'download'}) throw this exception:
          java.lang.NullPointerException
          at com.isomorphic.rpc.RPCManager.completeResponse(RPCManager.java:860)
          at com.isomorphic.rpc.RPCManager.send(RPCManager.java:582)
          at com.isomorphic.rpc.RPCManager.sendFailure(RPCManager.java:665)
          at com.isomorphic.rpc.RPCManager.sendFailure(RPCManager.java:686)
          at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:136)
          at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:95)
          at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
          at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
          at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
          at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
          at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
          at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
          at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
          at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
          at java.lang.Thread.run(Thread.java:595)


          The exception happend in the RPCManager.send. My IDACall subclass returned a valid dsResponse.

          Could you help me to take a look at the RPCManager.java and see what the null pointer is or send me the RPCManager.java? I have deCompiled the RPCManager.class but somehow, the line doesn't match the exception description.

          Comment


            #20
            By the way, we are using this SmartClient build:

            Manifest-Version: 1.0^M
            Implementation-Vendor: Isomorphic Software, Inc.^M
            Isomorphic-SmartClient-Version: 8.0Pro^M
            Created-By: 1.6.0_02 (Sun Microsystems Inc.)^M
            Isomorphic-SmartClient-Package-Date: 2011-01-21^M
            ^M

            Comment


              #21
              This looks like setDataSource() hasn't been called on either the DSResponse or DSRequest (either would fix this issue).

              Comment


                #22
                Thanks for the response. I get over that exception, but get another exception. Could you send me the file for ExcelDataExport.java or tell me what is missing?


                === 2011-06-28 08:59:52,263 [sor2] INFO InsIDACall - Performing 1 operation(s)
                === 2011-06-28 09:36:21,658 [sor2] ERROR InsIDACall - Error executing operation: CTReportDS_fetch
                java.lang.ClassCastException: [Ljava.lang.Object;
                at com.isomorphic.rpc.ExcelDataExport.export(ExcelDataExport.java:159)
                at com.isomorphic.rpc.ExcelDataExport.exportResultSet(ExcelDataExport.java:81)
                at com.isomorphic.rpc.DataExport.exportResultSet(DataExport.java:421)
                at com.isomorphic.rpc.RPCManager.completeResponse(RPCManager.java:887)
                at com.isomorphic.rpc.RPCManager.send(RPCManager.java:582)
                at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:130)
                at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:95)
                at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
                at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
                at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
                at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
                at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
                at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
                at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
                at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
                at java.lang.Thread.run(Thread.java:595)

                Comment


                  #23
                  I figured this one out. SmartClient export requires the response data in a List, if the data is not in a List, it creates an ArrayList and insert the data into the list.

                  My data was an object array (Object[]), it is fine with regular display, but export puts into an ArrayList, which results in this exeption.

                  Comment


                    #24
                    Thanks, you beat us to it - we'll also make the API do the right thing with an Array.

                    Comment

                    Working...
                    X