Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

OutputClient.generatePDFOutput error inside Servlet

Avatar

Level 2

I am getting the following error when executing the OutputClient.generatePDFOutput method in Servlet environment. The same code works when called from the main method. Any ideas?? I am getting the error in JBOSS as well as Webshere

The following exception occurred:

java.lang.NullPointerException

com.adobe.livecycle.output.exception.OutputException

: java.lang.NullPointerException

at com.adobe.livecycle.output.client.OutputClient.generatePDFOutput(

OutputClient.java:141)

at com.mandt.dd.AssembleDynamicPDF2.outputPDF(

AssembleDynamicPDF2.java:283)

at com.mandt.dd.AssembleDynamicPDF2.process(

AssembleDynamicPDF2.java:168)

at com.mandt.dd.servlet.BranchEnvironmentTest.doPost(

BranchEnvironmentTest.java:67)

at com.mandt.dd.servlet.BranchEnvironmentTest.doGet(

BranchEnvironmentTest.java:44)

at javax.servlet.http.HttpServlet.service(

HttpServlet.java:689)

at javax.servlet.http.HttpServlet.service(

HttpServlet.java:802)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(

ApplicationFilterChain.java:237)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(

ApplicationFilterChain.java:157)

at org.apache.catalina.core.StandardWrapperValve.invoke(

StandardWrapperValve.java:214)

at org.apache.catalina.core.StandardValveContext.invokeNext(

StandardValveContext.java:104)

at org.apache.catalina.core.StandardPipeline.invoke(

StandardPipeline.java:520)

at org.apache.catalina.core.StandardContextValve.invokeInternal(

StandardContextValve.java:198)

at org.apache.catalina.core.StandardContextValve.invoke(

StandardContextValve.java:152)

at org.apache.catalina.core.StandardValveContext.invokeNext(

StandardValveContext.java:104)

at org.apache.catalina.core.StandardPipeline.invoke(

StandardPipeline.java:520)

at org.apache.catalina.core.StandardHostValve.invoke(

StandardHostValve.java:137)

at org.apache.catalina.core.StandardValveContext.invokeNext(

StandardValveContext.java:104)

at org.apache.catalina.valves.ErrorReportValve.invoke(

ErrorReportValve.java:118)

at org.apache.catalina.core.StandardValveContext.invokeNext(

StandardValveContext.java:102)

at org.apache.catalina.core.StandardPipeline.invoke(

StandardPipeline.java:520)

at org.apache.catalina.core.StandardEngineValve.invoke(

StandardEngineValve.java:109)

at org.apache.catalina.core.StandardValveContext.invokeNext(

StandardValveContext.java:104)

at org.apache.catalina.core.StandardPipeline.invoke(

StandardPipeline.java:520)

at org.apache.catalina.core.ContainerBase.invoke(

ContainerBase.java:929)

at org.apache.coyote.tomcat5.CoyoteAdapter.service(

CoyoteAdapter.java:160)

at org.apache.coyote.http11.Http11Processor.process(

Http11Processor.java:799)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(

Http11Protocol.java:705)

at org.apache.tomcat.util.net.TcpWorkerThread.runIt(

PoolTcpEndpoint.java:577)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(

ThreadPool.java:683)

at java.lang.Thread.run(

Thread.java:595)

Caused by:

java.lang.NullPointerException

at java.io.ByteArrayInputStream.<init>(

ByteArrayInputStream.java:89)

at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapSdkBindingStubUtil.deSerializeResponse(

SoapSdkBindingStubUtil.java:106)

at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapAxisDispatcher.doSend(

SoapAxisDispatcher.java:128)

at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(

AbstractMessageDispatcher.java:57)

at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(

ServiceClient.java:208)

at com.adobe.livecycle.output.client.OutputClient.invokeRequest(

OutputClient.java:436)

at com.adobe.livecycle.output.client.OutputClient.generatePDFOutput(

OutputClient.java:124)

... 30 more

1 Reply

Avatar

Former Community Member

I would review how you are reading the input data and creating the Document object required by the OutputClient. The null pointer exception appears to be pointing to a java.io.ByteArrayInputStream.

See the Document object at http://help.adobe.com/en_US/livecycle/9.0/programLC/javadoc/index.html

Document(byte[] data)

          Creates a new Document out of the content specified by the byte array.

Document(File file, boolean own)

          Creates a new Document out of the content stored in the file.

Document(InputStream is)

          Creates a new Document with the content provided by the java.io.InputStream object.

Document(URL url)

          Creates a new Document out of the content accessible via the URL.

If you could post the servlet source, I would be happy to take a look.

Steve