1 Reply Latest reply on Sep 5, 2016 7:08 AM by tns42

    Migrating file uploads from DADs to ORDs deployed on Weblogic

    user12200471

      I have page which uploads a file using a DAD in my mod_plsql application. It works perfectly.

      I switched over to using ORDS and am receiving the errors shown below

       

      The procedure that the upload page post the values to is  defined as follows:

      PROCEDURE document_user_upload ( userid        IN   varchar2,  FNAME          IN   varchar2,  file_desc     in   varchar2,  maincatcode   in   varchar2,  subcatcode   in   varchar2,   b1 in varchar2 );

       

      userid,file_desc, maincatcode, subcatecode and b1 are all input items on the form, fname is the name of the html upload file item.

       

      The error from ORDs means that there is something wrong with the declaration. Which is one more time I have encounter an issue with something that works with DADs and does not work with ORDs and my main issue is the lack of proper documentation in ORDS similar to what mod_plsql has.

       

      Can someone form ORDS team help me with what the proper declaration of my procedure must be in order for this to work with ORDs.

       

      Thanks

       

      Here is the error I am getting:

       

       

      ORACLE REST DATA SERVICES

      500 Internal Server Error

       

      Debug Trace

       

      [TE] url-mapping start: 2016-07-30T18:48:02.051Z duration: 15ms

      [TE] POST /pls/appdocs/oracle8.portal_doc_handler.document_user_upload start: 2016-07-30T18:48:02.051Z duration: 452ms

       

      Stack Trace

       

      InternalServerException [statusCode=500, reasons=[]]

          at oracle.dbtools.apex.ModApexContext.handleError(ModApexContext.java:273)

          at oracle.dbtools.apex.OWA.execute(OWA.java:206)

          at oracle.dbtools.apex.ModApex.handleRequest(ModApex.java:267)

          at oracle.dbtools.apex.ModApex.doPost(ModApex.java:174)

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

          at oracle.dbtools.http.entrypoint.Dispatcher.dispatch(Dispatcher.java:124)

          at oracle.dbtools.http.entrypoint.EntryPoint$FilteredServlet.service(EntryPoint.java:236)

          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:73)

          at oracle.dbtools.http.forwarding.QueryFilteringRewrite.doFilter(QueryFilteringRewrite.java:89)

          at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:46)

          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)

          at oracle.dbtools.http.forwarding.ForwardingFilter.doFilter(ForwardingFilter.java:68)

          at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:46)

          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)

          at oracle.dbtools.http.cors.CORSPreflightFilter.doFilter(CORSPreflightFilter.java:67)

          at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:46)

          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)

          at oracle.dbtools.http.cookies.auth.CookieSessionCSRFFilter.doFilter(CookieSessionCSRFFilter.java:77)

          at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:46)

          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)

          at oracle.dbtools.http.auth.AuthenticationFilter.authenticate(AuthenticationFilter.java:89)

          at oracle.dbtools.http.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:62)

          at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:46)

          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)

          at oracle.dbtools.url.mapping.RequestMapperBase.doFilter(RequestMapperBase.java:55)

          at oracle.dbtools.url.mapping.CompositeMapper$RequestMapperFilterChain.doFilter(CompositeMapper.java:144)

          at oracle.dbtools.url.mapping.RequestMapperBase.doFilter(RequestMapperBase.java:55)

          at oracle.dbtools.url.mapping.CompositeMapper.doFilter(CompositeMapper.java:37)

          at oracle.dbtools.url.mapping.URLMappingBase.doFilter(URLMappingBase.java:89)

          at oracle.dbtools.url.mapping.filter.URLMappingFilter.doFilter(URLMappingFilter.java:88)

          at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:46)

          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)

          at oracle.dbtools.http.locale.LocaleFilter.doFilter(LocaleFilter.java:59)

          at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:46)

          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)

          at oracle.dbtools.http.cors.CORSResponseFilter.doFilter(CORSResponseFilter.java:83)

          at oracle.dbtools.http.filters.HttpResponseFilter.doFilter(HttpResponseFilter.java:45)

          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)

          at oracle.dbtools.http.errors.ErrorPageFilter.doFilter(ErrorPageFilter.java:81)

          at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:46)

          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)

          at oracle.dbtools.http.auth.ForceAuthFilter.doFilter(ForceAuthFilter.java:44)

          at oracle.dbtools.http.filters.HttpFilter.doFilter(HttpFilter.java:46)

          at oracle.dbtools.http.filters.FilterChainImpl.doFilter(FilterChainImpl.java:64)

          at oracle.dbtools.http.filters.Filters.filter(Filters.java:47)

          at oracle.dbtools.http.entrypoint.EntryPoint.service(EntryPoint.java:83)

          at oracle.dbtools.http.entrypoint.EntryPointServlet.service(EntryPointServlet.java:47)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

          at oracle.dbtools.rt.web.HttpEndpointBase.dispatchableServices(HttpEndpointBase.java:123)

          at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:85)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

          at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)

          at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)

          at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)

          at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)

          at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3750)

          at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3714)

          at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

          at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)

          at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2283)

          at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2182)

          at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1491)

          at weblogic.work.ExecuteThread.execute(ExecuteThread.java:263)

          at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

      Caused by: java.sql.SQLException: ORA-06550: line 2, column 2:

      PLS-00306: wrong number or types of arguments in call to 'DOCUMENT_USER_UPLOAD'

      ORA-06550: line 2, column 2:

      PL/SQL: Statement ignored

       

          at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)

          at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)

          at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1059)

          at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522)

          at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257)

          at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587)

          at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:220)

          at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:48)

          at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:938)

          at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1150)

          at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4802)

          at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:4905)

          at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:5631)

          at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1385)

          at sun.reflect.GeneratedMethodAccessor96.invoke(Unknown Source)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

          at java.lang.reflect.Method.invoke(Method.java:606)

          at oracle.ucp.jdbc.proxy.StatementProxyFactory.invoke(StatementProxyFactory.java:353)

          at oracle.ucp.jdbc.proxy.PreparedStatementProxyFactory.invoke(PreparedStatementProxyFactory.java:178)

          at oracle.ucp.jdbc.proxy.CallableStatementProxyFactory.invoke(CallableStatementProxyFactory.java:136)

          at com.sun.proxy.$Proxy120.execute(Unknown Source)

          at oracle.dbtools.apex.OWA.execute(OWA.java:186)

          ... 62 more