Announcement

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

    Problem with file upload

    I'm using SmartClient_70rc2_Pro and having trouble uploading a file to the server. The file is sent to the server as you can see in the fiddler log but at server-side i get an exception while DSRequest.parseUploadedFiles.

    fiddler.log:
    Code:
    POST http://localhost:8080/intrasys/isomorphic/IDACall?isc_rpc=1&isc_v=7.0rc2&isc_tnum=2&singleUpload=true HTTP/1.1
    Host: localhost:8080
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11 ( .NET CLR 3.5.30729)
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 115
    Connection: keep-alive
    Referer: http://localhost:8080/intrasys/
    Cookie: IntraSysIILogin=%7B%0D%20%20%20%20%22username%22%3A%22mroth%22%2C%20%0D%20%20%20%20%22password%22%3A%22redly2010%22%2C%20%0D%20%20%20%20%22rememberCredentials%22%3Atrue%0D%7D; JSESSIONID=e25a5569aab8a03dbace6c2f45ee; GLog=%7B%0D%20%20%20%20left%3A0%2C%20%0D%20%20%20%20top%3A0%2C%20%0D%20%20%20%20width%3A1392%2C%20%0D%20%20%20%20height%3A940%2C%20%0D%20%20%20%20priorityDefaults%3A%7B%0D%20%20%20%20%20%20%20%20Log%3A4%0D%20%20%20%20%7D%2C%20%0D%20%20%20%20defaultPriority%3A3%2C%20%0D%20%20%20%20trackRPC%3Atrue%0D%7D
    Content-Type: multipart/form-data; boundary=---------------------------1496212324596
    Content-Length: 1126
    
    -----------------------------1496212324596
    Content-Disposition: form-data; name="fuelingEntriesFile"; filename="testUpload.txt"
    Content-Type: text/plain
    
    1.This is a test...
    2.This is a test...
    3.This is a test...
    4.This is a test...
    5.This is a test...
    
    -----------------------------1496212324596
    Content-Disposition: form-data; name="_transaction"
    
    <transaction xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:type="xsd:Object"><transactionNum xsi:type="xsd:long">2</transactionNum><operations xsi:type="xsd:List"><elem xsi:type="xsd:Object"><values xsi:type="xsd:Object"><fuelingEntriesFile>testUpload.txt</fuelingEntriesFile></values><operationConfig xsi:type="xsd:Object"><dataSource>FuelingUploadDataSource</dataSource><operationType>add</operationType></operationConfig><componentId>isc_DynamicForm_61</componentId><appID>builtinApplication</appID><operation>FuelingUploadDataSource_add</operation><oldValues xsi:type="xsd:Object"></oldValues></elem></operations><jscallback>parent.isc.Comm.hiddenFrameReply(2,results)</jscallback></transaction>
    -----------------------------1496212324596--

    server.log:
    Code:
    INFO: === 2010-10-21 11:41:28,638 [-(6)] DEBUG RequestContext - Paths for request:
    Servlet path: '/isomorphic/IDACall'
    Request URI: '/intrasys/isomorphic/IDACall'
    Path Info: 'null'
    Path Translated: 'null'
    Real FileSystem Path: 'C:\soa\src\Intrasys\Intrasys-war\build\web\intrasys\isomorphic\IDACall'
    
    INFO: === 2010-10-21 11:41:28,732 [-(6)] DEBUG DataSource - Creating instance of DataSource 'Object'
    
    INFO: === 2010-10-21 11:41:28,732 [-(6)] DEBUG BasicDataSource - Validating a 'Object' at path ''
    
    INFO: === 2010-10-21 11:41:28,732 [-(6)] DEBUG DataSource - Creating instance of DataSource 'Object'
    
    INFO: === 2010-10-21 11:41:28,732 [-(6)] DEBUG BasicDataSource - Using class com.isomorphic.datasource.ListType as implementer for DataSource List
    
    INFO: === 2010-10-21 11:41:28,732 [-(6)] DEBUG DataSource - Creating instance of DataSource 'List'
    
    INFO: === 2010-10-21 11:41:28,732 [-(6)] DEBUG DataSource - Creating instance of DataSource 'Object'
    
    INFO: === 2010-10-21 11:41:28,732 [-(6)] DEBUG BasicDataSource - Validating a 'Object' at path '/transaction/operations'
    
    INFO: === 2010-10-21 11:41:28,732 [-(6)] DEBUG DataSource - Creating instance of DataSource 'Object'
    
    INFO: === 2010-10-21 11:41:28,732 [-(6)] DEBUG DataSource - Creating instance of DataSource 'Object'
    
    INFO: === 2010-10-21 11:41:28,732 [-(6)] DEBUG BasicDataSource - Validating a 'Object' at path '/transaction/operations/elem/values'
    
    INFO: === 2010-10-21 11:41:28,732 [-(6)] DEBUG DataSource - Creating instance of DataSource 'Object'
    
    INFO: === 2010-10-21 11:41:28,748 [-(6)] DEBUG BasicDataSource - Done validating a 'Object' at path '/transaction/operations/elem/values': 16ms
    
    INFO: === 2010-10-21 11:41:28,748 [-(6)] DEBUG DataSource - Creating instance of DataSource 'Object'
    
    INFO: === 2010-10-21 11:41:28,748 [-(6)] DEBUG BasicDataSource - Validating a 'Object' at path '/transaction/operations/elem/operationConfig'
    
    INFO: === 2010-10-21 11:41:28,748 [-(6)] DEBUG DataSource - Creating instance of DataSource 'Object'
    
    INFO: === 2010-10-21 11:41:28,748 [-(6)] DEBUG BasicDataSource - Done validating a 'Object' at path '/transaction/operations/elem/operationConfig': 0ms
    
    INFO: === 2010-10-21 11:41:28,748 [-(6)] DEBUG DataSource - Creating instance of DataSource 'Object'
    
    INFO: === 2010-10-21 11:41:28,748 [-(6)] DEBUG BasicDataSource - Validating a 'Object' at path '/transaction/operations/elem/oldValues'
    
    INFO: === 2010-10-21 11:41:28,748 [-(6)] DEBUG DataSource - Creating instance of DataSource 'Object'
    
    INFO: === 2010-10-21 11:41:28,748 [-(6)] DEBUG BasicDataSource - Done validating a 'Object' at path '/transaction/operations/elem/oldValues': 0ms
    
    INFO: === 2010-10-21 11:41:28,748 [-(6)] DEBUG BasicDataSource - Done validating a 'Object' at path '/transaction/operations': 16ms
    
    INFO: === 2010-10-21 11:41:28,748 [-(6)] DEBUG BasicDataSource - Done validating a 'List' at path '/transaction/operations': 16ms
    
    INFO: === 2010-10-21 11:41:28,748 [-(6)] DEBUG BasicDataSource - Done validating a 'Object' at path '': 16ms
    
    INFO: === 2010-10-21 11:41:28,748 [-(6)] DEBUG DataSource - Creating instance of DataSource 'FuelingUploadDataSource'
    
    INFO: === 2010-10-21 11:41:28,748 [-(6)] ERROR IDACall - Top-level servlet error: 
    java.lang.NullPointerException
            at com.isomorphic.datasource.DSRequest.parseUploadedFiles(DSRequest.java:336)
            at com.isomorphic.datasource.DSRequest.<init>(DSRequest.java:319)
            at com.isomorphic.rpc.RPCManager.parseRequest(RPCManager.java:1235)
            at com.isomorphic.rpc.RPCManager.<init>(RPCManager.java:234)
            at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:90)
            at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
            at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
            at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
            at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
            at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
            at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:239)
            at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
            at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
            at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
            at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
            at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
            at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
            at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
            at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
            at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
            at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
            at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
            at java.lang.Thread.run(Thread.java:662)
    datasource.config:
    Code:
    <DataSource
        ID="FuelingUploadDataSource"
        serverType="generic"
        >
        <fields>
            <field name="fuelingEntriesFile" type="binary" />
        </fields>
        <serverObject lookupStyle="new" className="de.russmann.sc.fleet.dmi.FuelingEntriesDMI"/>
    </DataSource>
    Can anybody help me?

    #2
    Hi Isomorphic

    i'm still having that problem - could you please tell me what's going on in source
    line DSRequest.java:336? Maybe i can get a hint in the right direction to fix my
    problem.

    Many thanks in advanced.

    Comment


      #3
      Hi Rothmich,

      We don't know whether you might have found an old bug or not, but we'd recommend trying this against the 8.0 beta.

      Comment


        #4
        Hi Isomorphic,

        after changing to 8.0beta it worked instantly.
        Many thanks for that hint.

        Regards, Rothmich

        Comment

        Working...
        X