Announcement

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

    Issue with Upload Item - IOException on download/view uploaded files.

    I uploaded files using .ds.xml with file type as binary. UploadItem generates nice view/download icons but when i click on those i get the IOException exception. Can you please advise?

    Here are server logs:
    === 2010-12-20 12:05:35,742 [l0-9] INFO DSResponse - [builtinApplication.attachments_downloadFile, builtinApplication.null] DSResponse: List with 1 items
    === 2010-12-20 12:05:35,742 [l0-9] INFO DSResponse - [builtinApplication.attachments_downloadFile] DSResponse: Map with 11 keys
    === 2010-12-20 12:05:35,742 [l0-9] INFO ProxyHttpServletResponse - content-disposition set to: attachment; fileName=readme.txt - unwrapping response output stream (CompressionFilter)
    === 2010-12-20 12:05:35,742 [l0-9] ERROR IDACall - Error executing operation: attachments_downloadFile
    java.io.IOException: The stream is closed.
    at com.microsoft.sqlserver.jdbc.BaseInputStream.checkClosed(SimpleInputStream.java:93)
    at com.microsoft.sqlserver.jdbc.PLPInputStream.read(PLPInputStream.java:262)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
    at java.io.FilterInputStream.read(FilterInputStream.java:90)
    at com.isomorphic.util.IOUtil.copyStreams(IOUtil.java:108)
    at com.isomorphic.util.IOUtil.copyStreams(IOUtil.java:52)
    at com.isomorphic.rpc.RPCManager.completeResponse(RPCManager.java:778)
    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: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)

    #2
    Please post the complete log for the request (please never post only part of the log for the request).

    Comment


      #3
      Here is the complete log for the operation.

      ------------------------------------------------------------------------
      === 2010-12-20 19:46:35,758 [ec-9] DEBUG Timing - [builtinApplication.attachment
      s_viewFile, builtinApplication.null] SQLTransform (1 rows): 0ms
      === 2010-12-20 19:46:35,758 [ec-9] INFO DSResponse - [builtinApplication.attach
      ments_viewFile, builtinApplication.null] DSResponse: List with 1 items
      === 2010-12-20 19:46:35,758 [ec-9] INFO DSResponse - [builtinApplication.attach
      ments_viewFile] DSResponse: Map with 11 keys
      === 2010-12-20 19:46:35,758 [ec-9] DEBUG DataSource - In DS.forName() for 'seque
      nce' with DSRequest: null
      === 2010-12-20 19:46:35,758 [ec-9] DEBUG DataStructCache - getInstanceFile (fail
      ure): 'sequence' instance of datasources: 0ms
      === 2010-12-20 19:46:35,758 [ec-9] DEBUG DataSource - In DS.forName() for 'text'
      with DSRequest: null
      === 2010-12-20 19:46:35,758 [ec-9] DEBUG DataStructCache - getInstanceFile (fail
      ure): 'text' instance of datasources: 0ms
      === 2010-12-20 19:46:35,758 [ec-9] DEBUG DataSource - In DS.forName() for 'text'
      with DSRequest: null
      === 2010-12-20 19:46:35,758 [ec-9] DEBUG DataStructCache - getInstanceFile (fail
      ure): 'text' instance of datasources: 0ms
      === 2010-12-20 19:46:35,758 [ec-9] DEBUG DataSource - In DS.forName() for 'numbe
      r' with DSRequest: null
      === 2010-12-20 19:46:35,773 [ec-9] DEBUG DataStructCache - getInstanceFile (fail
      ure): 'number' instance of datasources: 0ms
      === 2010-12-20 19:46:35,773 [ec-9] DEBUG DataSource - In DS.forName() for 'date'
      with DSRequest: null
      === 2010-12-20 19:46:35,773 [ec-9] DEBUG DataStructCache - getInstanceFile (fail
      ure): 'date' instance of datasources: 0ms
      === 2010-12-20 19:46:35,789 [ec-9] DEBUG DataSource - In DS.forName() for 'text'
      with DSRequest: null
      === 2010-12-20 19:46:35,789 [ec-9] DEBUG DataStructCache - getInstanceFile (fail
      ure): 'text' instance of datasources: 0ms
      === 2010-12-20 19:46:35,789 [ec-9] DEBUG DataSource - In DS.forName() for 'integ
      er' with DSRequest: null
      === 2010-12-20 19:46:35,804 [ec-9] DEBUG DataStructCache - getInstanceFile (fail
      ure): 'integer' instance of datasources: 0ms
      === 2010-12-20 19:46:35,804 [ec-9] DEBUG DataSource - In DS.forName() for 'date'
      with DSRequest: null
      === 2010-12-20 19:46:35,804 [ec-9] DEBUG DataStructCache - getInstanceFile (fail
      ure): 'date' instance of datasources: 0ms
      === 2010-12-20 19:46:35,804 [ec-9] DEBUG DataSource - In DS.forName() for 'binar
      y' with DSRequest: null
      === 2010-12-20 19:46:35,820 [ec-9] DEBUG DataStructCache - getInstanceFile (fail
      ure): 'binary' instance of datasources: 0ms
      === 2010-12-20 19:46:35,820 [ec-9] DEBUG DataSource - In DS.forName() for 'date'
      with DSRequest: null
      === 2010-12-20 19:46:35,820 [ec-9] DEBUG DataStructCache - getInstanceFile (fail
      ure): 'date' instance of datasources: 0ms
      === 2010-12-20 19:46:35,836 [ec-9] DEBUG DataSource - In DS.forName() for 'integ
      er' with DSRequest: null
      === 2010-12-20 19:46:35,836 [ec-9] DEBUG DataStructCache - getInstanceFile (fail
      ure): 'integer' instance of datasources: 0ms
      === 2010-12-20 19:46:35,836 [ec-9] INFO ProxyHttpServletResponse - content-disp
      osition set to: inline; fileName=readme.txt - unwrapping response output stream
      (CompressionFilter)
      === 2010-12-20 19:46:35,851 [ec-9] ERROR IDACall - Error executing operation: at
      tachments_viewFile
      java.io.IOException: The stream is closed.
      at com.microsoft.sqlserver.jdbc.BaseInputStream.checkClosed(SimpleInputS
      tream.java:93)
      at com.microsoft.sqlserver.jdbc.PLPInputStream.read(PLPInputStream.java:
      262)
      at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
      at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
      at java.io.FilterInputStream.read(FilterInputStream.java:90)
      at com.isomorphic.util.IOUtil.copyStreams(IOUtil.java:108)
      at com.isomorphic.util.IOUtil.copyStreams(IOUtil.java:52)
      at com.isomorphic.rpc.RPCManager.completeResponse(RPCManager.java:778)
      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:641)
      at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:303)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:208)
      at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.j
      ava:259)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:242)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:208)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:243)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:201)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:163)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:108)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
      556)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      a:402)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :249)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      ss(Http11Protocol.java:267)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      ss(Http11Protocol.java:245)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoin
      t.java:260)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
      utor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
      .java:907)
      at java.lang.Thread.run(Thread.java:619)
      === 2010-12-20 19:46:35,992 [ec-9] DEBUG DataSource - In DS.forName() for 'attac
      hments' with DSRequest: com.isomorphic.datasource.DSRequest@775121
      === 2010-12-20 19:46:35,992 [ec-9] DEBUG DataStructCache - getInstanceFile (succ
      ess): 'attachments' instance of datasources: 0ms
      === 2010-12-20 19:46:35,992 [ec-9] DEBUG InterfaceProvider - Instantiating com.i
      somorphic.sql.SQLDataSource to satisfy request for an SQLDataSource
      === 2010-12-20 19:46:36,007 [ec-9] DEBUG DataSource - Creating instance of DataS
      ource 'attachments'
      === 2010-12-20 19:46:36,007 [ec-9] ERROR IDACall - Top-level servlet error:
      java.lang.NullPointerException
      at com.isomorphic.rpc.RPCManager.completeResponse(RPCManager.java:757)
      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:641)
      at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:303)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:208)
      at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.j
      ava:259)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:242)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:208)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:243)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:201)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:163)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:108)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
      556)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      a:402)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :249)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      ss(Http11Protocol.java:267)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      ss(Http11Protocol.java:245)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoin
      t.java:260)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
      utor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
      .java:907)
      at java.lang.Thread.run(Thread.java:619)
      === 2010-12-20 19:46:36,117 [ec-9] ERROR ProxyHttpServletResponse - Error - getW
      riter() called on request that has already returned an OutputStream - stack trac
      e for previous getOutputStream() call:
      java.lang.Exception
      at com.isomorphic.servlet.ProxyHttpServletResponse.getOutputStream(Proxy
      HttpServletResponse.java:154)
      at com.isomorphic.rpc.RPCManager.completeResponse(RPCManager.java:777)
      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:641)
      at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:303)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:208)
      at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.j
      ava:259)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:242)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:208)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:243)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:201)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:163)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:108)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
      556)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      a:402)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :249)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      ss(Http11Protocol.java:267)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      ss(Http11Protocol.java:245)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoin
      t.java:260)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
      utor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
      .java:907)
      at java.lang.Thread.run(Thread.java:619)
      === 2010-12-20 19:46:36,242 [ec-9] ERROR ProxyHttpServletResponse - Error - getW
      riter() called on request that has already returned an OutputStream - stack trac
      e for this getWriter() call:
      java.lang.Exception
      at com.isomorphic.servlet.ProxyHttpServletResponse.getWriter(ProxyHttpSe
      rvletResponse.java:168)
      at com.isomorphic.servlet.ServletTools.handleServletError(ServletTools.j
      ava:1728)
      at com.isomorphic.servlet.BaseServlet.handleError(BaseServlet.java:176)
      at com.isomorphic.servlet.BaseServlet.handleError(BaseServlet.java:169)
      at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:98)
      at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
      at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:303)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:208)
      at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.j
      ava:259)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:242)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:208)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:243)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:201)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:163)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:108)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
      556)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      a:402)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :249)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      ss(Http11Protocol.java:267)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      ss(Http11Protocol.java:245)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoin
      t.java:260)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
      utor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
      .java:907)
      at java.lang.Thread.run(Thread.java:619)

      Comment


        #4
        OK, this may seem cumbersome, but what we need to see (and always need to see) is the complete log for the operation, starting from when the server receives the HTTP request (several RequestContext logs make this obvious) with the log level settings included by default in the SDK (in log4j.config.xml).
        This will show the SQL query and other critical logs that help clarify what's going on.

        This log appears to start somewhere in the middle, and you've turned off several important log categories.

        Comment


          #5
          Solved. This is due to the fact that i was using jdbc4 driver from Microsoft. I replaced it with net.sourceforge.jtds.jdbcx.JtdsDataSource and all worked out well.

          Thanks,

          Comment


            #6
            Hi Isomorphic,

            First of all, I must say that the new features from Version 2.4 are just great!!!

            But now I have the same problem as learn_smartgwt, but can not change the sql driver. :-)

            ServerLOG:
            Code:
            === 2011-01-13 21:54:33,076 [l0-3] INFO  RequestContext - URL: '/payapplXMLCreator/payapplxmlcreator/sc/IDACall/report.pdf', User-Agent: 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; de-de) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4': Safari with Accept-Encoding header
            === 2011-01-13 21:54:33,078 [l0-3] DEBUG XML - Parsed XML from (in memory stream): 1ms
            === 2011-01-13 21:54:33,080 [l0-3] DEBUG RPCManager - Processing 1 requests.
            === 2011-01-13 21:54:33,080 [l0-3] DEBUG RPCManager - Request #1 (DSRequest) payload: {
                criteria:{
                    pk:114,
                    download_fieldname:"XMLORREPORTFILE",
                    download_filename:"report.pdf"
                },
                operationConfig:{
                    dataSource:"DSXmlUpload",
                    operationType:"viewFile"
                },
                appID:"builtinApplication",
                operation:"DSXmlUpload_viewFile",
                oldValues:{
                    pk:114,
                    download_fieldname:"XMLORREPORTFILE",
                    download_filename:"report.pdf"
                }
            }
            === 2011-01-13 21:54:33,080 [l0-3] INFO  IDACall - Performing 1 operation(s)
            === 2011-01-13 21:54:33,081 [l0-3] DEBUG AppBase - [builtinApplication.DSXmlUpload_viewFile] No userTypes defined, allowing anyone access to all operations for this application
            === 2011-01-13 21:54:33,081 [l0-3] DEBUG AppBase - [builtinApplication.DSXmlUpload_viewFile] No public zero-argument method named '_DSXmlUpload_viewFile' found, performing generic datasource operation
            === 2011-01-13 21:54:33,081 [l0-3] DEBUG AppBase - [builtinApplication.DSXmlUpload_viewFile, builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
            === 2011-01-13 21:54:33,081 [l0-3] DEBUG AppBase - [builtinApplication.DSXmlUpload_viewFile, builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
            === 2011-01-13 21:54:33,081 [l0-3] INFO  SQLDataSource - [builtinApplication.DSXmlUpload_viewFile, builtinApplication.null] Performing fetch operation with
            	criteria: {pk:114,download_fieldname:"XMLORREPORTFILE",download_filename:"report.pdf"}	values: {pk:114,download_fieldname:"XMLORREPORTFILE",download_filename:"report.pdf"}
            === 2011-01-13 21:54:33,082 [l0-3] INFO  SQLDataSource - [builtinApplication.DSXmlUpload_viewFile, builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause ORDER BY XMLORREPORTFILE_date_created DESC
            === 2011-01-13 21:54:33,082 [l0-3] DEBUG PoolableSQLConnectionFactory - [builtinApplication.DSXmlUpload_viewFile, builtinApplication.null] DriverManager fetching connection for mainDataBase via jdbc url jdbc:sqlserver://WINXPSQLSERVER:1430;databaseName=payappl;User=payappl;Password=payappl
            === 2011-01-13 21:54:33,082 [l0-3] DEBUG PoolableSQLConnectionFactory - [builtinApplication.DSXmlUpload_viewFile, builtinApplication.null] Passing JDBC URL only to getConnection
            === 2011-01-13 21:54:33,435 [l0-3] DEBUG PoolableSQLConnectionFactory - [builtinApplication.DSXmlUpload_viewFile, builtinApplication.null] Returning pooled Connection
            === 2011-01-13 21:54:33,435 [l0-3] INFO  SQLDriver - [builtinApplication.DSXmlUpload_viewFile, builtinApplication.null] Executing SQL query on 'mainDataBase': SELECT XMLUPLOAD.USERDEFINEDFIELDS1, XMLUPLOAD.XMLORREPORTFILE, XMLUPLOAD.XMLORREPORTFILE_filesize, XMLUPLOAD.XMLORREPORTFILE_filename, XMLUPLOAD.CONTAINERTYP, XMLUPLOAD.CLEARINGTYPSELECTITEM, XMLUPLOAD.XMLORREPORTFILE_date_created, XMLUPLOAD.pk, XMLUPLOAD.SESSIONID, XMLUPLOAD.USERID FROM payappl.XMLUPLOAD WHERE (XMLUPLOAD.pk='114') ORDER BY XMLORREPORTFILE_date_created DESC
            === 2011-01-13 21:54:33,436 [l0-3] INFO  DSResponse - [builtinApplication.DSXmlUpload_viewFile, builtinApplication.null] DSResponse: List with 1 items
            === 2011-01-13 21:54:33,436 [l0-3] INFO  DSResponse - [builtinApplication.DSXmlUpload_viewFile] DSResponse: Map with 9 keys
            === 2011-01-13 21:54:33,438 [l0-3] ERROR IDACall - Error executing operation: DSXmlUpload_viewFile
            java.io.IOException: The stream is closed.
            	at com.microsoft.sqlserver.jdbc.BaseInputStream.checkClosed(SimpleInputStream.java:93)
            	at com.microsoft.sqlserver.jdbc.PLPInputStream.read(PLPInputStream.java:262)
            	at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
            	at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
            	at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
            	at java.io.FilterInputStream.read(FilterInputStream.java:90)
            	at com.isomorphic.util.IOUtil.copyStreams(IOUtil.java:108)
            	at com.isomorphic.util.IOUtil.copyStreams(IOUtil.java:52)
            	at com.isomorphic.rpc.RPCManager.completeResponse(RPCManager.java:783)
            	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: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:246)
            	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
            	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
            	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at com.payappl.server.authentication.payapplConcurrentSessionFilter.doFilter(payapplConcurrentSessionFilter.java:80)
            	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
            	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)
            	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
            	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
            	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-01-13 21:54:33,439 [l0-3] WARN  RPCManager - dsResponse.getData().get("XMLORREPORTFILE") returned null  when we were expecting an InputStream. Can't continue.
            Datasource:
            Code:
            <DataSource 
            	schema="payappl"
            	dbName="mainDataBase"
            	tableName="XMLUPLOAD"
            	ID="DSXmlUpload"
            	dataSourceVersion="1"
            	serverType="sql">
            
                <fields>  
                    <field name="pk" type="sequence" hidden="true" primaryKey="true"/>  
                    <field title="Scheme" name="CLEARINGTYPSELECTITEM"  length="3" type="text"/>  
                    <field title="FileType" name="CONTAINERTYP"  length="14" type="text"/>  
                    <field title="Internal FileName" name="USERDEFINEDFIELDS1"  length="35" type="text"/>  
                    <field name="XMLORREPORTFILE" type="binary"/>  
                    <field name="SESSIONID" length="128" type="text"/>  
                    <field name="USERID" length="10" type="text"/>  
                    <field name="XMLORREPORTFILE_date_created" type="datetime"/>  
                </fields>  
            
                <operationBindings>
                    <operationBinding requiresAuthentication="true" operationType="add" serverMethod="xmlUpload" >  
            			<serverObject className="com.payappl.server.ds.XMLUpload" lookupStyle="new"/>
                	</operationBinding>  
            
            	    <operationBinding requiresAuthentication="true" operationType="fetch">  
            			<orderClause>XMLORREPORTFILE_date_created DESC</orderClause>
            	    </operationBinding>  
                </operationBindings>
                
                
            </DataSource>
            DDL:
            Code:
            CREATE TABLE [payappl].[XMLUPLOAD](
            	[pk] [int] IDENTITY(111,1) NOT NULL,
            	[XMLORREPORTFILE] [varbinary](max) NULL,
            	[CLEARINGTYPSELECTITEM] [nvarchar](3) NULL,
            	[CONTAINERTYP] [nvarchar](14) NULL,
            	[USERDEFINEDFIELDS1] [nvarchar](35) NULL,
            	[XMLORREPORTFILE_date_created] [datetime] NULL,
            	[XMLORREPORTFILE_filesize] [decimal](10, 0) NULL,
            	[XMLORREPORTFILE_filename] [nvarchar](255) NULL,
            	[SESSIONID] [nvarchar](128) NOT NULL,
            	[USERID] [nvarchar](10) NOT NULL,
             CONSTRAINT [PK_XMLUPLOAD_pk] PRIMARY KEY CLUSTERED 
            (
            	[pk] ASC
            )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
            ) ON [PRIMARY]
            Below, a screenshot from the Developer Console: DevConsole.png

            >>> In mysql this code works as desired <<<

            If you need more info, just let me know.

            I used:
            SC_SNAPSHOT-2011-01-05/PowerEdition Deployment (built 2011-01-05)
            Microsoft SQL Server 2005
            Microsoft SQL Server JDBC Driver sqljdbc4.jar

            thanks in advance,
            Timo
            Attached Files

            Comment


              #7
              This issue has been recently resolved - it was reported by another user as happening with Oracle.

              Comment


                #8
                Unfortunately, this is not correct, the problem still exists (at least under the SQL Server)

                Version: SC_SNAPSHOT-2011-01-14/PowerEdition Deployment (built 2011-01-14)

                Comment


                  #9
                  Sorry - same symptoms, totally different underlying problem. The problem here is that the SQL Server JDBC driver (just the latest MS one) has a bug that is causing it to read and close the InputStream it returns from ResultSet.getBinaryStream() before the framework code has a chance to do so (in fact, it does it almost immediately).

                  We have implemented a workaround - please check tomorrow's nightly build and confirm whether that fixes the issue for you.

                  Comment


                    #10
                    Hi Isomorphic,
                    thanks a lot, now it works!

                    But have a look at: http://forums.smartclient.com/showthread.php?p=58350

                    Regards,
                    Timo

                    Comment

                    Working...
                    X