16 Replies Latest reply on Jul 8, 2008 4:49 PM by (Nikunj_Kshatriya)

    Error - Conversion from .doc to pdf

      Hi,

      I'm using Trail version of LiveCycle ES 8.0(Turnkey Installation).
      I need to convert any native file format to PDF/A. In order to do that, I'm just trying to convert it(.doc) to PDF first. But I do end-up with the error that is given below:

      ALC-PDG-1000-000: com.adobe.livecycle.generatepdf.client.ConversionException: ALC-PDG-001-000-Conversion failed because of an exception.
      RuntimeException; CausedByException is:
      An unexpected exception while resolving a new connection to an Adobe Service.
      Caused by: javax.ejb.EJBException: RuntimeException; CausedByException is:
      An unexpected exception while resolving a new connection to an Adobe Service.
      at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:382)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:196)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:122)
      at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
      at org.jboss.ejb.Container.invoke(Container.java:873)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
      at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
      at $Proxy221.convertPDFMToPdf(Unknown Source)
      .
      .
      .
      .
      .
      Caused by: java.lang.reflect.InvocationTargetException
      Caused by: java.lang.IllegalStateException: Connection to failed service.
      at com.adobe.service.ResourcePooler.allocateResource(ResourcePooler.java:87)
      at com.adobe.service.ConnectionFactoryManagerPeer.getConnectionResourceFromPool(ConnectionFa ctoryManagerPeer.java:79)
      at com.adobe.service.J2EEConnectionFactoryManagerPeerImpl.getConnection(J2EEConnectionFactor yManagerPeerImpl.java:84)
      ... 112 more
      Error OCCURRED: ALC-PDG-001-000-Conversion failed because of an exception.
      RuntimeException; CausedByException is:
      An unexpected exception while resolving a new connection to an Adobe Service.

      I'm using Generate PDF Service API(Java) to convert a document(.doc) to PDF.
      Can anyone please provide their inputs on the above issue. How it can be resolved?
      or
      Is there any API to convert any native file format to PDFA directly?

      Thanks.
        • 1. Re: Error - Conversion from .doc to pdf
          Level 1
          Hi,

          For further more information,

          Properties ConnectionProps = new Properties();
          ConnectionProps.setProperty("DSC_DEFAULT_EJB_ENDPOINT", "jnp://localhost:1099");
          ConnectionProps.setProperty("DSC_TRANSPORT_PROTOCOL", "EJB");
          ConnectionProps.setProperty("DSC_SERVER_TYPE", "JBoss");
          ConnectionProps.setProperty("DSC_CREDENTIAL_USERNAME", "administrator");
          ConnectionProps.setProperty("DSC_CREDENTIAL_PASSWORD", "password");

          These are the connection properties i'm using to invoke livecycle ES.
          I guess the problem i'm facing is with the connection URL "jnp://localhost:1099". when i tried this in my browser i couldnot see any display page. but my jnp port is listening to the port no 1099 only.

          How can i debug this?

          Livecycle ES is installed and configured succesfully.
          • 2. Re: Error - Conversion from .doc to pdf
            Hodmi Level 4
            Can you convert using the Admin UI tools instead of the API?
            • 3. Re: Error - Conversion from .doc to pdf
              Level 1
              Hi Michael,

              Thanks for your reply. I'm unable to convert using Admin UI also.
              First, a pop-up error(pdfgen.exe Application Error) says - The instruction at "0x7c820bbc" referenced memory at "0x00000001", The memory could not be read. When i click ok, the following error:

              Error Code:1000
              Error Message: ALC-PDG-001-000-Conversion failed because of an exception. RuntimeException; CausedByException is: An unexpected exception while resolving a new connection to an Adobe Service.

              has appeared in my Admin UI browser.

              What could be the reason behind this? How can i solve this?

              Thanks.
              • 4. Re: Error - Conversion from .doc to pdf
                Level 1
                Hi,

                Now I'm able to convert Image formats to PDF. But the same error while trying for other formats(like .doc,.xsl,...)

                But i want to convert to pdf from all formats. how can i achieve this?

                Thanks
                • 5. Re: Error - Conversion from .doc to pdf
                  Hodmi Level 4
                  I've seen this error caused by access issues. The user under which the LiveCycle service is running must have permissions to run Microsoft Office. I usually suggest installing Office as the same user under whom the LiveCycle service is running.
                  • 6. Re: Error - Conversion from .doc to pdf
                    I reinstalled the office using same user who is running the liveCycle . Still facing the same error
                    • 7. Re: Error - Conversion from .doc to pdf
                      Level 1
                      See if are able to convert from the adminui
                      • 8. Re: Error - Conversion from .doc to pdf
                        Level 1
                        when i use the adminui i get following error

                        ALC-PDG-001-000-Conversion failed because of an exception. RemoteException occurred in server thread; nested exception is: java.rmi.RemoteException: ; nested exception is: java.lang.IllegalStateException: Connection to failed service.
                        • 9. Re: Error - Conversion from .doc to pdf
                          Level 1
                          looks like your PDFG service has not started/installed properly

                          One silly question to ask you do have office installed?
                          • 10. Re: Error - Conversion from .doc to pdf
                            Level 1
                            I have office installed with the same user who start the server1 on websphere application server.
                            • 11. Re: Error - Conversion from .doc to pdf
                              i meet the same error. Is there anyone convert to pdf successfully?
                              • 12. Re: Error - Conversion from .doc to pdf
                                Hi,<br /><br />I'm having the same problem.<br /><br />The PDFG service is running, in the adminui all works fine, the server has the Office installed, but in a client app it gives me the error:<br /><br />I'm using WebSphere 6.1.0.5, jdk 1.5, PDFG 8.01<br /><br />ALC-PDG-1000-000: com.adobe.livecycle.generatepdf.client.ConversionException: ALC-PDG-001-000-Conversion failed because of an exception.<br />com/ibm/CORBA/iiop/ObjectURL<br />Caused by: java.lang.NoClassDefFoundError: com/ibm/CORBA/iiop/ObjectURL<br />        at java.lang.Class.forName0(Native Method)<br />        at java.lang.Class.forName(Class.java:242)<br />        at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)<br />        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)<br />        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)<br />        at javax.naming.InitialContext.init(InitialContext.java:223)<br />        at javax.naming.InitialContext.<init>(InitialContext.java:197)<br />        at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.initJndiContext(EjbMessageDispat cher.java:213)<br />        at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.getJndiContext(EjbMessageDispatc her.java:226)<br />        at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.initialise(EjbMessageDispatcher. java:87)<br />        at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.doSend(EjbMessageDispatcher.java :130)<br />        at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.java:57)<br />        at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)<br />        at com.adobe.livecycle.generatepdf.client.GeneratePdfServiceClient.createPDF(GeneratePdfServ iceClient.java:172)<br />        at testepfdgenapi.Main.main(Main.java:33)<br /><br />        at com.adobe.livecycle.generatepdf.client.GeneratePdfServiceClient.createPDF(GeneratePdfServ iceClient.java:194)<br />        at testepfdgenapi.Main.main(Main.java:33)<br /><br />Any idea how to solve this?
                                • 13. Re: Error - Conversion from .doc to pdf
                                  Level 1
                                  I have made it work by adding the following properties:<br /><br />System.setProperty("org.omg.CORBA.ORBClass", "com.ibm.CORBA.iiop.ORB");<br />        System.setProperty("org.omg.CORBA.ORBSingletonClass", "com.ibm.rmi.corba.ORBSingleton");<br />        System.setProperty("javax.rmi.CORBA.StubClass", "com.ibm.rmi.javax.rmi.CORBA.StubDelegateImpl");<br />        System.setProperty("javax.rmi.CORBA.PortableRemoteObjectClass", "com.ibm.rmi.javax.rmi.PortableRemoteObject");<br /><br />I'm using NetBeans 6.0 and jdk 1.6 to compile my test app (normal java app).<br /><br />But to run the app i must use the jre that comes with websphere.<br /><br /><your install path for wesphere>/AppServer\java\jre\bin\java.exe<br /><br />The PDFG works with a .doc file, but it still throws a exception<br />"18/Abr/2008 11:16:30 com.ibm.ws.naming.java.javaURLContextFactory<br />SEVERE: javaAccessorNotSet" and i can't figure out from here it's coming from.<br /><br />The next step is to create a web app of this, lets see how that goes.
                                  • 14. Re: Error - Conversion from .doc to pdf
                                    Ramya T,

                                    Sorry to digress from the topic. I have been searching for a Java API based solution to convert .doc to .pdf. Came across adobe's option. I guess you are using the same code as on this page...

                                    http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/wwhelp/wwhimpl/common/ht ml/wwhelp.htm?context=sdkHelp&file=quickStarts_GeneratePDF.11.2.html

                                    Can you tell me how can I get access to the Java API's which are imported in this code ?

                                    The import classes I am talking about are:
                                    import com.adobe.idp.Document;
                                    import com.adobe.idp.dsc.clientsdk.ServiceClientFactory;
                                    import com.adobe.livecycle.generatepdf.client.CreatePDFResult;
                                    import om.adobe.livecycle.generatepdf.client.GeneratePdfServiceClient;

                                    Looking forward to your reply.

                                    Thanks,
                                    Nikunj
                                    • 15. Re: Error - Conversion from .doc to pdf
                                      Hi,

                                      I'm facing a different problem. Please help.

                                      My requirement is to develop a standalone java program to convert Word documents to PDFs using Adoble LC ES.

                                      I found the code from the Adobe LC ES documentation. Please help me what's wrong in the code.

                                      I don't understand what i'm missing in the code...The "test.doc" file
                                      is there in the given location with proper data and Document object is not "NULL". Program is able to connect to Adobe LC Server. No issues with connection. But why the error ??

                                      Code & exception are below :

                                      CODE:
                                      -----------
                                      import java.io.File;
                                      import java.util.Properties;
                                      import com.adobe.idp.Document;
                                      import com.adobe.idp.dsc.clientsdk.ServiceClientFactory;
                                      import com.adobe.livecycle.generatepdf.client.CreatePDFResult;
                                      import
                                      com.adobe.livecycle.generatepdf.client.GeneratePdfServiceClient;

                                      public class GeneratePDFFromNativeFiles {

                                      public static void main(String[] args)
                                      {
                                      Properties ConnectionPropsForSOAP = new Properties();

                                      ConnectionPropsForSOAP.setProperty("DSC_DEFAULT_SOAP_ENDPOINT",
                                      "http://workspace-d.web.abbott.com:8080/soap/services/
                                      ConvertAllFileTypesToPDF?wsdl");

                                      ConnectionPropsForSOAP.setProperty("DSC_TRANSPORT_PROTOCOL", "SOAP");
                                      ConnectionPropsForSOAP.setProperty("DSC_SERVER_TYPE", "JBoss");
                                      ConnectionPropsForSOAP.setProperty("DSC_CREDENTIAL_USERNAME",
                                      "epaspdfgen");
                                      ConnectionPropsForSOAP.setProperty("DSC_CREDENTIAL_PASSWORD",
                                      "epaspdf1");

                                      ServiceClientFactory factory =
                                      ServiceClientFactory.createInstance(ConnectionPropsForSOAP);
                                      try{
                                      String currentDirectory = System.getProperty("user.dir");

                                      String sourceDocPath="/test.doc";
                                      String resultDocPath ="/bin/arg/util/simpleFTP/test.pdf";

                                      String inputFilePath = currentDirectory+sourceDocPath;

                                      File file = new File(inputFilePath);

                                      String adobePDFSettings = "Standard";
                                      String securitySettings = "No Security";
                                      String fileTypeSettings = "Standard";

                                      GeneratePdfServiceClient gps = new
                                      GeneratePdfServiceClient(factory);

                                      Document inputDoc = new Document(file,true);

                                      CreatePDFResult docResult=gps.createPDF (inputDoc, inputFilePath,
                                      fileTypeSettings, adobePDFSettings,
                                      securitySettings, null, null);

                                      Document createdDocument = docResult.getCreatedDocument();
                                      createdDocument.copyToFile(new File(currentDirectory
                                      +resultDocPath));

                                      }

                                      catch (Exception e) {
                                      e.printStackTrace();
                                      System.out.println("Error OCCURRED: " + e.getMessage());

                                      }
                                      }
                                      }

                                      EXCEPTION:
                                      --------------------

                                      ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal
                                      error.
                                      at
                                      com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapAxisDispatcher.throwExceptionHandler(So apAxisDispatcher.java:
                                      207)
                                      at
                                      com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapAxisDispatcher.doSend(SoapAxisDispatche r.java:
                                      125)
                                      at
                                      com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.java:
                                      57)
                                      at
                                      com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:
                                      208)
                                      at
                                      com.adobe.livecycle.generatepdf.client.GeneratePdfServiceClient.createPDF(GeneratePdfServ iceClient.java:
                                      172)
                                      at
                                      arg.util.simpleFTP.GeneratePDFFromNativeFiles.main(GeneratePDFFromNativeFiles.java:
                                      73)
                                      Caused by: ALC-DSC-002-000:
                                      com.adobe.idp.dsc.RequiredParameterException: Parameter: inputDocument
                                      is required.
                                      at
                                      org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:
                                      221)
                                      at
                                      org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:
                                      128)
                                      at
                                      org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:
                                      1087)
                                      at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
                                      Source)
                                      at
                                      org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
                                      Source)
                                      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
                                      $FragmentContentDispatcher.dispatch(Unknown Source)
                                      at
                                      org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
                                      Source)
                                      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                                      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                                      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
                                      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
                                      at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
                                      Source)
                                      at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
                                      at
                                      org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:
                                      227)
                                      at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
                                      at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
                                      at
                                      org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:
                                      62)
                                      at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
                                      at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
                                      at org.apache.axis.client.Call.invoke(Call.java:2748)
                                      at org.apache.axis.client.Call.invoke(Call.java:2424)
                                      at org.apache.axis.client.Call.invoke(Call.java:2347)
                                      at org.apache.axis.client.Call.invoke(Call.java:1804)
                                      at
                                      com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapAxisDispatcher.doSend(SoapAxisDispatche r.java:
                                      123

                                      Please help me.

                                      Thanks a lot.
                                      VJ.
                                      • 16. Re: Error - Conversion from .doc to pdf
                                        Level 1
                                        If you correctly used the Configuration Manager then these two applications should be deployed and in Active state on your JBoss server

                                        adobe-livecycle-native-jboss-x86_win32
                                        adobe-livecycle-jboss