1 Reply Latest reply on Feb 26, 2009 9:36 PM by (Ullas)

    Render Exception In generating pdf using output service client

      Hi All,
      i am trying to generate pdf using output service client by calling "generatePDFOutput" and passing xdp and data xml parameters as follows,
      but i am facing render exception, any body knows why getting such error.
      =======================================================
      try{

      //Set connection properties required to invoke LiveCycle ES

      Properties connectionProps = new Properties();

      connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "t3://localhost:8001");

      connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,"EJB");

      connectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, "WebLogic");

      connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "administrator");

      connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");



      //Create a ServiceClientFactory object

      ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);



      //Create an OutputClient object

      OutputClient outClient = new OutputClient(myFactory);



      //Reference form data

      FileInputStream fileInputStream = new FileInputStream("C:\\Adobe\\data.xml");

      Document inXMData = new Document (fileInputStream);



      //Set PDF run-time options

      PDFOutputOptionsSpec outputOptions = new PDFOutputOptionsSpec();

      outputOptions.setFileURI("C:\\Adobe\\output.pdf");



      //Set rendering run-time options

      RenderOptionsSpec pdfOptions = new RenderOptionsSpec();

      pdfOptions.setLinearizedPDF(true);

      pdfOptions.setPdfVersion("1.6");



      //Create a PDF document

      OutputResult outputDocument = outClient.generatePDFOutput(

      TransformationFormat.PDF,

      "input.xdp",

      "C:\\Adobe",

      outputOptions,

      pdfOptions,

      inXMData

      );



      //Retrieve the results of the operation

      Document metaData = outputDocument.getStatusDoc();

      File myFile = new File("C:\\Adobe\\Output.xml");

      metaData.copyToFile(myFile);

      }

      catch (Exception ee)

      {

      ee.printStackTrace();

      }
        • 1. Re: Render Exception In generating pdf using output service client
          Level 1
          Hi
          I am also doing a similar activity. and getting a IllegalStateException.

          com.adobe.livecycle.output.exception.OutputException: java.lang.IllegalStateException
          at com.adobe.livecycle.output.client.OutputClient.generatePDFOutput(OutputClient.java:141)
          at CreatePDFDocument.main(CreatePDFDocument.java:56)
          Caused by: java.lang.IllegalStateException
          at com.adobe.idp.dsc.clientsdk.ServiceClientFactory$1.handleThrowable(ServiceClientFactory.j ava:67)
          at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:220)
          at com.adobe.livecycle.output.client.OutputClient.invokeRequest(OutputClient.java:436)
          at com.adobe.livecycle.output.client.OutputClient.generatePDFOutput(OutputClient.java:124)
          ... 1 more
          Caused by: java.lang.NoClassDefFoundError: org/apache/axis/soap/SOAPConstants
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Unknown Source)
          at com.adobe.idp.dsc.clientsdk.ServiceClientFactory.createMessageDispatcher(ServiceClientFac tory.java:586)
          at com.adobe.idp.dsc.clientsdk.ServiceClientFactory.getMessageDispatcher(ServiceClientFactor y.java:543)
          at com.adobe.idp.dsc.clientsdk.ServiceClient.getMessageDispatcher(ServiceClient.java:239)
          at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:205)
          ... 3 more

          Please give a solution for this problom.

          regards
          Ullas