0 Replies Latest reply on Mar 14, 2014 4:37 PM by 003f9ff9-fa3e-4b9f-b738-08d412def274

    Apex 4.2 Uploadfile

    003f9ff9-fa3e-4b9f-b738-08d412def274

      Hi folk !!

      After searching a lot in this forum, I could not find a solution to my problem

       

      I'm going to explain my issue:

       

      I'm trying upload a file from web app build in PL/SQL (you know htp.p('<html> .... </html>') ) for this I've intalled the next tools:

       

      1. SQLDeveloper versión 4.0.0.13

      2. Application Express Listener version 2.0.5.287.04.27 (Oct. 2013)

      3. Tomcat (standalone)

      4. Nginx

      5. Oracle Application Express 4.2 (Oct. 2013)

       

      This is my Apex Listener configuration

      <entry key="cache.duration">days</entry>
      <entry key="db.sid"/>
      <entry key="jdbc.InitialLimit">3</entry>
      <entry key="debug.printDebugToScreen">true</entry>
      <entry key="cache.procedureNameList"/>
      <entry key="db.tnsDirectory">/u01/app/oracle/instantclient/network/admin</entry>
      <entry key="cache.maxEntries">500</entry>
      <entry key="apex.excel2collection.name"/>
      <entry key="log.maxEntries">50</entry>
      <entry key="apex.excel2collection">false</entry>
      <entry key="log.logging">false</entry>
      <entry key="security.verifySSL">false</entry>
      <entry key="db.password">@05A69CE5504EBF220973FA5CFB6CE8870F</entry>
      <entry key="procedure.postProcess"/>
      <entry key="error.maxEntries">100</entry>
      <entry key="db.username">APEX_PUBLIC_USER</entry>
      <entry key="apex.docTable">FLOWS_FILES.WWV_FLOW_FILE_OBJECTS$</entry>
      <entry key="jdbc.MaxStatementsLimit">10</entry>
      <entry key="sqldev.name">Configuración de Administración</entry>
      <entry key="security.inclusionList"/>
      <entry key="apex.excel2collection.onecollection">true</entry>
      <entry key="jdbc.MinLimit">3</entry>
      <entry key="cache.type">lru</entry>
      <entry key="db.servicename"/>
      <entry key="apex.extensions"/>
      <entry key="error.keepErrorMessages">false</entry>
      <entry key="db.tnsAliasName">expqa</entry>
      <entry key="apex.excel2collection.useSheetName">false</entry>
      <entry key="jdbc.MaxLimit">30</entry>
      <entry key="procedure.preProcess">TEST_APEX1</entry>
      <entry key="security.validationFunctionType">plsql</entry>
      <entry key="security.disableDefaultExclusionList">false</entry>
      <entry key="cache.expiration">7</entry>
      <entry key="jdbc.statementTimeout">900</entry>
      <entry key="log.procedure">false</entry>
      <entry key="db.customURL"/>
      <entry key="sqldev.version">4.0.0.13.80</entry>
      <entry key="cache.directory">/u01/app/oracle/apex_listener/ebpm/cache</entry>
      <entry key="sqldev.description"/>
      <entry key="cache.caching">false</entry>
      <entry key="debug.output">console</entry>
      <entry key="jdbc.DriverType">oci8</entry>
      <entry key="misc.defaultPage">apex</entry>
      <entry key="security.requestValidationFunction"/>
      <entry key="db.port"/>
      <entry key="db.hostname"/>
      <entry key="jdbc.InactivityTimeout">1800</entry>
      <entry key="status.statistics">false</entry>
      <entry key="security.exclusionList"/>
      <entry key="security.maxEntries">2000</entry>
      <entry key="db.connectionType">tns</entry>
      

       

      ... and this is the error:

      500 - Internal Server Error

       

      
      Request Path passes syntax validation
      Mapping request to database pool: PoolMap [_failed=false, _lastUpdate=-1, _pattern=null, _poolName=apex, _regex=null, _type=REGEX, _workspaceIdentifier=null, _serviceName=null]
      Applied database connection info
      Attempting to process with PL/SQL Gateway
      ==== Processing Request: ====
      POST /ebpm/PK_APEX_UTIL.UPLOAD_FILE
      ==== Headers in Request ====
      x-real-ip: 1.33.33.253
      x-forwarded-for: 1.33.33.253
      host: 1.33.33.123
      connection: close
      content-length: 821393
      accept: text/html, application/xhtml+xml, */*
      referer: http://1.33.33.123/ebpm/PK_FILES_INTERFAZ.FICH_SUBIDA_FICHEROS?P_EMPRESA=1&P_DIR_ID=5&P_CARGA_MULTIPLE=N&P_FORM=P_DESCRIPCION[0]&P_COD_MSG=&P_APLICACION=
      accept-language: es-ES
      user-agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
      content-type: multipart/form-data; boundary=---------------------------7de3663b91ede
      ua-cpu: AMD64
      accept-encoding: gzip, deflate
      pragma: no-cache
      cookie: AckjDLlkdl_GDATADEC=ID_SESS|896223139890|
      via: 1.1 srv-endian2.5.1-test.datadec.es:8080 (squid/2.6.STABLE22)
      cache-control: max-age=259200
      ==== Cookies in Request ====
      AckjDLlkdl_GDATADEC =  ID_SESS|896223139890|
      SID: 857
      Form field: P_DIR_ID with value: 5 detected.
      request parameter: p_dir_id=5
      Form field: P_PROGRAMA_POST with value: PK_FILES.NFILE_COMPRUEBA_REPLACES detected.
      request parameter: p_programa_post=PK_FILES.NFILE_COMPRUEBA_REPLACES
      Form field: P_NOMBRE_CAMPO_FILE with value: P_FILE detected.
      request parameter: p_nombre_campo_file=P_FILE
      Form field: P_PARAMETRO with value: P_COD_MSG detected.
      request parameter: p_parametro=P_COD_MSG
      Form field: P_VALOR with value:  detected.
      request parameter: p_valor=
      Form field: P_PARAMETRO with value: P_DIR_ID detected.
      request parameter: p_parametro=P_DIR_ID
      Form field: P_VALOR with value: 5 detected.
      request parameter: p_valor=5
      Form field: P_PARAMETRO with value: P_CARGA_MULTIPLE detected.
      request parameter: p_parametro=P_CARGA_MULTIPLE
      Form field: P_VALOR with value: N detected.
      request parameter: p_valor=N
      Form field: P_PARAMETRO with value: P_FORM detected.
      request parameter: p_parametro=P_FORM
      Form field: P_VALOR with value: P_DESCRIPCION[0] detected.
      request parameter: p_valor=P_DESCRIPCION[0]
      Form field: P_PARAMETRO with value: P_DESTINO detected.
      request parameter: p_parametro=P_DESTINO
      Form field: P_VALOR with value: UPLOAD detected.
      request parameter: p_valor=UPLOAD
      File field: P_FILE with file name: C:\Users\aperez\Downloads\Image1.jpg detected.
      {p_valor=[, 5, N, P_DESCRIPCION[0], UPLOAD], p_programa_post=PK_FILES.NFILE_COMPRUEBA_REPLACES, p_nombre_campo_file=P_FILE, p_parametro=[P_COD_MSG, P_DIR_ID, P_CARGA_MULTIPLE, P_FORM, P_DESTINO], p_dir_id=5}
      p_request=null
      ==== Request Processed ====
      Processed PL/SQL Gateway request
      
      
      
      
      
      
      WebException [statusCode=500]
        at oracle.dbtools.rt.web.WebException.webException(WebException.java:343)
        at oracle.dbtools.rt.web.WebException.internalError(WebException.java:262)
        at oracle.dbtools.rt.web.WebErrorResponse.internalError(WebErrorResponse.java:101)
        at oracle.dbtools.rt.web.WebErrorResponse.error(WebErrorResponse.java:75)
        at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:134)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.doFilter(ServletAdapter.java:1059)
        at com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.invokeFilterChain(ServletAdapter.java:999)
        at com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:434)
        at oracle.dbtools.standalone.SecureServletAdapter.doService(SecureServletAdapter.java:91)
        at com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:379)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapterChain.service(GrizzlyAdapterChain.java:196)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
        at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.NullPointerException
        at oracle.dbtools.apex.hooks.fileUpload.ApexFileLoader.processApexFileUtil(ApexFileLoader.java:194)
        at oracle.dbtools.apex.hooks.fileUpload.ApexFileLoader.processFile(ApexFileLoader.java:77)
        at oracle.dbtools.apex.hooks.ProcessorRegistry.fileUploadPreProcess(ProcessorRegistry.java:95)
        at oracle.dbtools.apex.FileUpload.loadFiles(FileUpload.java:63)
        at oracle.dbtools.apex.ModApex.doPost(ModApex.java:142)
      
      

        at oracle.dbtools.apex.ModApex.service(ModApex.java:302)

        at oracle.dbtools.rt.web.HttpEndpointBase.modApex(HttpEndpointBase.java:350)
        at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:132)
        ... 23 more
      

       

      The question is that I don't know as continue to review the problem so the error is "java.lang.NullPointerException" and I don't have the *.java files.

      As you can see in the Apex Listener configuration, when you upload a file, this should be in a FLOWS_FILES.WWV_FLOW_FILE_OBJECTS$ table ... but the file is not there.


      Could anyone help me with the problem? ... Any help would be welcome.


      Thanks in advance.

      Toni.