1 Reply Latest reply: Mar 10, 2010 5:16 PM by 666879 RSS

    createDocumentDefinition is failing

    666879
      using the devkit, I have developed an upload method that throws


      java.lang.RuntimeException: Unknown exception. See cause.
           at oracle.ifs.fdk.client.impl.AxisRemoteManagersFactory.handleException(AxisRemoteManagersFactory.java:1023)
           at oracle.ifs.fdk.client.impl.FileManagerProxy.createDocumentDefinitions(FileManagerProxy.java:464)
           at oracle.ifs.fdk.client.impl.FileManagerProxy.createDocumentDefinition(FileManagerProxy.java:346)
           at com.exel.rad.contentdb.FileTransferUtil.upload(FileTransferUtil.java:605)
           at com.exel.rad.contentdb.FileTransferUtil.main(FileTransferUtil.java:895)
      Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
           at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
           at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1476)
           at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:174)
           at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:168)
           at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:847)
           at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:106)
           at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
           at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)
           at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:815)
           at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1025)
           at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:619)
           at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
           at java.io.ByteArrayOutputStream.writeTo(ByteArrayOutputStream.java:112)
           at HTTPClient.HTTPConnection.sendRequest(HTTPConnection.java:3034)
           at HTTPClient.HTTPConnection.handleRequest(HTTPConnection.java:2859)
           at HTTPClient.HTTPResponse.handleResponse(HTTPResponse.java:769)
           at HTTPClient.HTTPResponse.getStatusCode(HTTPResponse.java:196)
           at oracle.ifs.fdk.client.impl.BaseProxy.checkHttpError(BaseProxy.java:75)
           at oracle.ifs.fdk.client.impl.FileManagerProxy.createDocumentDefinitions(FileManagerProxy.java:459)
           ... 3 more
      Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
           at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:221)
           at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:145)
           at sun.security.validator.Validator.validate(Validator.java:203)
           at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:172)
           at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSLContextImpl.java:320)
           at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:840)
           ... 17 more
      Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
           at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:236)
           at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:194)
           at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:216)
           ... 22 more


      on the following line

      Item docDef = fileM.createDocumentDefinition(new NamedValue[] {
      ClientUtils.newNamedValue(Attributes.NAME, sourceFilename),
      ClientUtils.newNamedValue(Options.CONTENTSTREAM,
      sourceFileInputStream)
      }, requestedAttributes);

      why would this throw SSL handshake exception when I am not using https?
        • 1. Re: createDocumentDefinition is failing
          666879
          ok I have got passed this after importing the SSL certificate. Now I am getting this exception

          java.lang.RuntimeException: HTTP Error: Code = 500; Reason = Internal Server Error; Original URI = http://content.mydomain.com/content/dav/?docid=46133775; Final URI = https://content.mydomain.com/content/dav/?docid=46133775; Dump:
          HTTP/1.1 500 Internal Server Error
          Effective-URI: https://content.mydomain.com/content/dav/?docid=46133775
          Content-Type: text/html
          Connection: Keep-Alive
          Date: Wed, 10 Mar 2010 23:11:21 GMT
          Cache-Control: private, max-age=1
          Keep-Alive: timeout=5, max=999
          Content-Length: 182
          Server: Oracle-Application-Server-10g/10.1.2.2.0 Oracle-HTTP-Server OracleAS-Web-Cache-10g/10.1.2.3.1 (N;ecid=160534652368,0)

               at oracle.ifs.fdk.client.impl.BaseProxy.checkHttpError(BaseProxy.java:79)
               at oracle.ifs.fdk.client.impl.FileManagerProxy.createDocumentDefinitions(FileManagerProxy.java:459)
               at oracle.ifs.fdk.client.impl.FileManagerProxy.createDocumentDefinition(FileManagerProxy.java:346)




          when I look at the application log, I see the following

          10/03/10 17:50:31 content: Servlet error
          javax.servlet.ServletException: internal error: required attributes missing
          at oracle.ifs.protocols.dav.ecm.EcmDavServlet.doDocumentGetOrHead(EcmDavServlet.java:2405)
          at oracle.ifs.protocols.dav.ecm.EcmDavServlet.doGetOrHead(EcmDavServlet.java:2287)
          at oracle.ifs.protocols.dav.ecm.EcmDavServlet.doGet(EcmDavServlet.java:1187)
          at oracle.ifs.protocols.dav.DavServlet.processRequest(DavServlet.java:2614)
          at oracle.ifs.protocols.dav.ecm.EcmDavServlet.processRequest(EcmDavServlet.java:3616)
          at oracle.ifs.protocols.dav.DavServlet.processRequest(DavServlet.java:2396)
          at oracle.ifs.protocols.dav.DavServlet.service(DavServlet.java:2361)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
          at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
          at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
          at oracle.ifs.fdk.http.HttpServerManager.doFilter(HttpServerManager.java:103)
          at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:670)
          at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:341)
          at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:816)
          at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:231)
          at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:136)
          at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
          at java.lang.Thread.run(Thread.java:534)