7 Replies Latest reply: Oct 3, 2006 5:22 AM by (A_Sharma) RSS

    Cannot connect to Policy Server

      Hi -

      I've just started using Policy Server and am trying to connect to it using the SDK.

      I've got a very small amount of source code which I took from the API documentation which should literally create the properties & then calls EDCFactory.connect.

      When I try and connect I keep getting the error message:

      ------

      Exception connecting to the Server -- An error occured while performing this operation(error code bin: 1, hex: 0x1)

      ------

      I've seen a couple of other people getting this error on this list but haven't really found a solution.

      I have imported a new config.xml file to set WebServicesEnabled to true (but not restarted the server - do I need to?), and I've created an external user that I'm using to connect to the policy server (I have also tried with the administrator).

      I'm running the client that's connecting on my local machine, and trying to connect to the policy server machine. I can enter the /edcws/services/EDCPolicyService?wsdl url into a web browser from my local machine and I get an xml response, so I presume that the server is contactable.

      Can anyone point me in the right direction as to how to debug this issue?
        • 1. Re: Cannot connect to Policy Server
          Community Member
          Sorry - I also forgot to mention that I can connect to the LiveCycle server from my Adobe Professional edition, using the url http://<machine name>:8080, and using the username & password I have specified in the source code.<br /><br />So again, I presume that the machine is contactable.<br /><br />I'm not using SSL.<br /><br />Thanks in advance for any help you could offer.
          • 2. Re: Cannot connect to Policy Server
            Can you call e.printStackTrace() on the exception and send the full exception trace, which will have much more information.

            Thanks,

            -Bill
            • 3. Re: Cannot connect to Policy Server
              Community Member
              Hi Bill -<br /><br />Thanks for responding - the full strack trace is as follows ... the thing that I noticed was that I get an error from the WSSecurityHandler saying the message has an invalid timestamp. But I must be honest I don't know how to set this.<br /><br />I figured maybe this is some server configuration that I haven't performed?<br /><br />Anyway, many thanks for responding.<br /><br />Anil.<br /><br />Stack Trace:<br />------------<br /><br />The exception is: Exception connecting to the Server -- An error occured while performing this operation(error code bin: 1, hex: 0x1)<br />com.adobe.edc.sdk.SDKException: Exception connecting to the Server -- An error occured while performing this operation(error code bin: 1, hex: 0x1)<br />     at com.adobe.edc.sdk.impl.ExceptionHandler.throwException(ExceptionHandler.java:78)<br />     at com.adobe.edc.sdk.impl.ExceptionHandler.throwException(ExceptionHandler.java:88)<br />     at com.adobe.edc.sdk.EDCFactory.connect(EDCFactory.java:190)<br />     at com.semantico.drm.client.ApplyPolicy.createConnection(ApplyPolicy.java:45)<br />     at com.semantico.drm.client.ApplyPolicy.main(ApplyPolicy.java:25)<br />Caused by: com.adobe.edc.sdk.SDKException: WSSecurityHandler: security processing failed. Exception Message -- An error was discovered processing the <wsse:Security> header. (WSSecurityEngine: Invalid timestamp The security semantics of message have expired) -- Internal server error(error code bin: 1032, hex: 0x408)<br />     at com.adobe.edc.sdk.impl.ExceptionHandler.throwException(ExceptionHandler.java:54)<br />     at com.adobe.edc.sdk.impl.ExceptionHandler.throwException(ExceptionHandler.java:88)<br />     at com.adobe.edc.sdk.impl.ExceptionHandler.throwException(ExceptionHandler.java:36)<br />     at com.adobe.edc.sdk.impl.soap.SOAPConnection.getAssertion(SOAPConnection.java:434)<br />     at com.adobe.edc.sdk.impl.soap.SOAPClientFactoryImpl.<init>(SOAPClientFactoryImpl.java:97)<b r />     at com.adobe.edc.sdk.EDCFactory.connect(EDCFactory.java:187)<br />     ... 2 more<br />Caused by: com.adobe.edc.common.PolicyServiceException<br />     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)<br />     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)<br />     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)<br />     at java.lang.reflect.Constructor.newInstance(Unknown Source)<br />     at java.lang.Class.newInstance0(Unknown Source)<br />     at java.lang.Class.newInstance(Unknown Source)<br />     at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:90)<br />     at org.apache.axis.encoding.ser.BeanDeserializerFactory.getGeneralPurpose(BeanDeserializerFa ctory.java:88)<br />     at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFa ctory.java:90)<br />     at org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.ja va:449)<br />     at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationCon text.java:529)<br />     at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java :157)<br />     at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java: 1015)<br />     at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)<br />     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)<br />     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch( Unknown Source)<br />     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)<br />     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)<br />     at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)<br />     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)<br />     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)<br />     at javax.xml.parsers.SAXParser.parse(Unknown Source)<br />     at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:225)<br />     at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:645)<br />     at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)<br />     at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) <br />     at org.apache.axis.client.AxisClient.invoke(AxisClient.java:173)<br />     at org.apache.axis.client.Call.invokeEngine(Call.java:2735)<br />     at org.apache.axis.client.Call.invoke(Call.java:2718)<br />     at org.apache.axis.client.Call.invoke(Call.java:2394)<br />     at org.apache.axis.client.Call.invoke(Call.java:2317)<br />     at org.apache.axis.client.Call.invoke(Call.java:1774)<br />     at com.adobe.edc.sdk.impl.soap.SOAPConnection.getAssertion(SOAPConnection.java:430)<br />     ... 4 more
              • 4. Re: Cannot connect to Policy Server
                Community Member
                Hi Guys -

                I just thought I would add a little more description to this call in the hope that someone out there can help me, as I am really stuck with this one.

                a) I am not connecting to an LDAP server as we are not using one to authenticate (Do I need to do anything to configure this?)

                b) I have followed the automatic install option on Linux and so far as I can tell SSL has been configured correctly although I haven't actually done anything to set it up. (Do I need this to be set up?)

                c) I am connecting from a remote machine - I can get the /edcws/services/EDCPolicyService?wsdl xml presented to me in a web browser so I presume that that should mean I@m able to connect?

                Sorry - I realise that this may seem like a trivial problem but I haven't managed to find the solution to this yet and am starting to get a little desperate!

                Many thanks in advance for anyone that can help me.
                Anil.
                • 5. Re: Cannot connect to Policy Server
                  Community Member
                  Hi -<br /><br />As another addition to this request for help I've now managed to get something working and making a connection on the actual machine that is running the LiveCycle server.<br /><br />But the same code on another machine still gives me an error with a stack trace of:<br /><br />com.adobe.edc.sdk.SDKException: Exception connecting to the Server -- An error occured while performing this operation(error code bin: 1, hex: 0x1)<br />The exception is: Exception connecting to the Server -- An error occured while performing this operation(error code bin: 1, hex: 0x1)<br />     at com.adobe.edc.sdk.impl.ExceptionHandler.throwException(ExceptionHandler.java:78)<br />     at com.adobe.edc.sdk.impl.ExceptionHandler.throwException(ExceptionHandler.java:88)<br />     at com.adobe.edc.sdk.EDCFactory.connect(EDCFactory.java:190)<br />     at com.semantico.drm.client.ApplyPolicy.createConnectionSoap(ApplyPolicy.java:50)<br />     at com.semantico.drm.client.ApplyPolicy.main(ApplyPolicy.java:27)<br />Caused by: com.adobe.edc.sdk.SDKException: WSSecurityHandler: security processing failed. Exception Message -- An error was discovered processing the <wsse:Security> header. (WSSecurityEngine: Invalid timestamp The security semantics of message have expired) -- Internal server error(error code bin: 1032, hex: 0x408)<br />     at com.adobe.edc.sdk.impl.ExceptionHandler.throwException(ExceptionHandler.java:54)<br />     at com.adobe.edc.sdk.impl.ExceptionHandler.throwException(ExceptionHandler.java:88)<br />     at com.adobe.edc.sdk.impl.ExceptionHandler.throwException(ExceptionHandler.java:36)<br />     at com.adobe.edc.sdk.impl.soap.SOAPConnection.getAssertion(SOAPConnection.java:434)<br />     at com.adobe.edc.sdk.impl.soap.SOAPClientFactoryImpl.<init>(SOAPClientFactoryImpl.java:97)<b r />     at com.adobe.edc.sdk.EDCFactory.connect(EDCFactory.java:187)<br />     ... 2 more<br /><br />The key thing here still seems to be the invalid timestamp from the WSSecurityHeader.<br /><br />Sorry to keep bugging everyone about this but it is terribly frustrating.
                  • 6. Re: Cannot connect to Policy Server
                    Community Member
                    Hi Anil,

                    The "invalid timestamp" error occurs when the client and server machine's times are out of sync. That would also explain why you see the problem on one machine and not another. Try setting the clocks of the client to server to be in sync and that should resolve the issue. You may also want to use NTP to keep the clocks in sync.

                    Hope this helps,

                    -Bill
                    • 7. Re: Cannot connect to Policy Server
                      Community Member
                      Hi Bill -

                      The change to the server clock worked a treat. Thank you very much for all your efforts - I really appreciate it.

                      Hopefully I'll stop annoying this forum now!

                      Many thanks,
                      Anil.