Announcement

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

  • Download File sample in EE Showcase not complete?

    Hi Isomorphic,

    I get this exception when I use your sample as template in my application. Upload works fine, download gives this exception (serverside):
    Code:
    === 2015-09-07 20:32:34,381 [c-56] DEBUG RPCManager - Request #1 (DSRequest) payload: {
        criteria:{
            ID:4,
            download_fieldname:"DATA",
            download_filename:"abc.jpg"
        },
        operationConfig:{
            dataSource:"T_ATTACHMENT",
            repo:null,
            operationType:"downloadFile",
            textMatchStyle:"exact"
        },
        appID:"builtinApplication",
        operation:"T_ATTACHMENT_downloadFile",
        oldValues:{
            ID:4,
            download_fieldname:"DATA",
            download_filename:"abc.jpg"
        }
    }
    === 2015-09-07 20:32:34,381 [c-56] INFO  LMSIDACall - Performing 1 operation(s)
    === 2015-09-07 20:32:34,382 [c-56] WARN  RequestContext - dsRequest.execute() failed:
    java.lang.Exception: Attempt to call unknown operationType: downloadFile
        at com.isomorphic.datasource.DataSourceDMI.validateOperationBinding(DataSourceDMI.java:534)
        at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:149)
        at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:64)
        at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2544)
        at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:220)
        at com.lmscompany.lms.server.LMSIDACall.handleDSRequest(LMSIDACall.java:75)
        at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:185)
        at com.lmscompany.lms.server.LMSIDACall.processRequest(LMSIDACall.java:40)
        at com.isomorphic.servlet.IDACall._processRequest(IDACall.java:117)
        at com.isomorphic.servlet.IDACall.doPost(IDACall.java:76)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
        at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:156)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at com.isomorphic.servlet.CompressionFilter._doFilter(CompressionFilter.java:247)
        at com.isomorphic.servlet.BaseFilter.doFilter(BaseFilter.java:83)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:611)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:409)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1044)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
    === 2015-09-07 20:32:34,392 [c-56] WARN  RPCManager - dsResponse.getData().get("DATA") returned null when we were expecting an InputStream, Byte[] or byte[]. Can't continue.
    It goes away when I add this to my .ds.xml:
    Code:
        <operationBindings>
            <operationBinding operationType="viewFile" />
            <operationBinding operationType="downloadFile" />
        </operationBindings>
    You mention these operationsBindings in the docs, but do not show them in the sample's source code. I strongly assume they are just missing there, but I am not perfectly sure.
    I'm using v10.0p_2015-08-24/PowerEdition Deployment.

    Best regards
    Blama

  • #2
    We'll take a look and get back to you shortly.

    Comment


    • #3
      Also, the FormItem contains the hint "Maximum file-size is 50k", but the .ds.xml does not contain anything regarding this.

      Best regards
      Blama

      Comment


      • #4
        We aren't reproducing any problems with the sample on our end. I guess we'll need to see a minimal test case to comment on what's going wrong in your actual usage.

        You can use DataSourceField.maxFileSize and DataSource.maxFileSizeExceededMessage to handle the max file-size validation

        Regards
        Isomorphic Software

        Comment

        Working...
        X