Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Newbie to AEM : Connection refused when invoking a service

Avatar

Level 2

I am trying to run the example from : https://helpx.adobe.com/livecycle/help/aem/aem-livecycle-connector.html#Invoking%20via%20Service%20R...

Here's the package download link on that page: https://helpx.adobe.com/content/help/en/livecycle/help/aem/aem-livecycle-connector/_jcr_content/main...

Its a simple form  that converts a word doc into pdf but i am not able to run it.

I tried to trace the issue in the log and disabled few Validation components to get around HTTP 403.

But now it errors out with and am stuck. Please advise. Please find the stacktrace from errors.log

12.08.2015 11:06:02.198 *INFO* [0:0:0:0:0:0:0:1 [1439395562195] POST /content/livecycle/connector/samples/pdfg.html HTTP/1.1] org.apache.commons.httpclient.HttpMethodDirector I/O exception (java.net.ConnectException) caught when processing request: Connection refused 12.08.2015 11:06:02.198 *INFO* [0:0:0:0:0:0:0:1 [1439395562195] POST /content/livecycle/connector/samples/pdfg.html HTTP/1.1] org.apache.commons.httpclient.HttpMethodDirector Retrying request 12.08.2015 11:06:02.198 *INFO* [0:0:0:0:0:0:0:1 [1439395562195] POST /content/livecycle/connector/samples/pdfg.html HTTP/1.1] org.apache.commons.httpclient.HttpMethodDirector I/O exception (java.net.ConnectException) caught when processing request: Connection refused 12.08.2015 11:06:02.198 *INFO* [0:0:0:0:0:0:0:1 [1439395562195] POST /content/livecycle/connector/samples/pdfg.html HTTP/1.1] org.apache.commons.httpclient.HttpMethodDirector Retrying request 12.08.2015 11:06:02.198 *INFO* [0:0:0:0:0:0:0:1 [1439395562195] POST /content/livecycle/connector/samples/pdfg.html HTTP/1.1] org.apache.commons.httpclient.HttpMethodDirector I/O exception (java.net.ConnectException) caught when processing request: Connection refused 12.08.2015 11:06:02.198 *INFO* [0:0:0:0:0:0:0:1 [1439395562195] POST /content/livecycle/connector/samples/pdfg.html HTTP/1.1] org.apache.commons.httpclient.HttpMethodDirector Retrying request 12.08.2015 11:06:02.199 *ERROR* [0:0:0:0:0:0:0:1 [1439395562195] POST /content/livecycle/connector/samples/pdfg.html HTTP/1.1] apps.livecycle.connector.samples.pdfg.POST$jsp Error occured while converting document to PDF com.adobe.idp.dsc.DSCRuntimeException: java.net.ConnectException: Connection refused         at com.adobe.livecycle.dsc.clientsdk.internal.soap.AbstractHttpInvocationRequestExecutor.executeRequest(AbstractHttpInvocationRequestExecutor.java:73)         at com.adobe.livecycle.dsc.clientsdk.internal.soap.CommonsClientMessageDispatcherFactory$CommonsClientMessageDispatcher.doSend(CommonsClientMessageDispatcherFactory.java:121)         at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:69)         at com.adobe.livecycle.dsc.clientsdk.internal.MessageDispatcherProxy$InvocationInterceptorChainImpl.doIntercept(MessageDispatcherProxy.java:64)         at com.adobe.livecycle.dsc.clientsdk.internal.ClassLoaderInterceptor.intercept(ClassLoaderInterceptor.java:34)         at com.adobe.livecycle.dsc.clientsdk.internal.MessageDispatcherProxy$InvocationInterceptorChainImpl.doIntercept(MessageDispatcherProxy.java:60)         at com.adobe.livecycle.dsc.clientsdk.internal.security.SecurityInterceptor.intercept(SecurityInterceptor.java:128)         at com.adobe.livecycle.dsc.clientsdk.internal.MessageDispatcherProxy$InvocationInterceptorChainImpl.doIntercept(MessageDispatcherProxy.java:60)         at com.adobe.livecycle.dsc.clientsdk.internal.RequestProgressInterceptor.intercept(RequestProgressInterceptor.java:41)         at com.adobe.livecycle.dsc.clientsdk.internal.MessageDispatcherProxy$InvocationInterceptorChainImpl.doIntercept(MessageDispatcherProxy.java:60)         at com.adobe.livecycle.dsc.clientsdk.internal.MessageDispatcherProxy.send(MessageDispatcherProxy.java:41)         at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:213)         at com.adobe.livecycle.generatepdf.client.GeneratePdfServiceClient.createPDF2(GeneratePdfServiceClient.java:620)         at org.apache.jsp.apps.livecycle.connector.samples.pdfg.POST_jsp$1.run(POST_jsp.java:43)  
1 Accepted Solution

Avatar

Correct answer by
Employee

Unless I am completely mistaken, the package you have installed allows you to invoke services on a LiveCycle ES4 Server. So you need a standalone LiveCycle ES4 server running. From "http://help.adobe.com/en_US/livecycle/11.0/Overview/lc_overview_ds.pdf":

Integration with Adobe Experience Manager (AEM)

LiveCycle provides a rich client SDK that allows client applications to invoke LiveCycle services using Java APIs. You can invoke LiveCycle Document Services from within Adobe Experience Manager (AEM) web apps and workflows using AEM LiveCycle Conenctor. It simplifies using these APIs within the OSGi environment and enables seamless invocation of LiveCycle Services. 

View solution in original post

16 Replies

Avatar

Employee

From this exception:

  1. or.samples.pdfg.POST$jsp Error occured while converting document to PDF
  2. com.adobe.idp.dsc.DSCRuntimeException: java.net.ConnectException: Connection refused

Is your LifeCycle server definitely up and running?

Avatar

Level 2

How do i check the status of my LifeCycle server? And how do i know which port it is running on?

I checked various configurations and services in console but i couldn't find it.

Appreciate your help!

Avatar

Employee

From the link you posted[1],  the article explains "Adobe® Experience Manager (AEM) LiveCycle Connector enables seamless invocation of Adobe® LiveCycle® ES4 Document Services from within AEM web apps and workflows."

Do you have a lifecycle server running?

So you need a LiveCycle instance to connect to. In the Getting started section of the article, it states you need to configure the OSGI settings for "Adobe LiveCycle Client SDK Configuration Component":

The details required are:

Although the properties are self explanatory, the important ones are as follows:

  • Server URL - URL to the LiveCycle server. If you want LiveCycle and AEM to communicate over https, start AEM with the -Djavax.net.ssl.trustStore=<path to LC keystore> option.
  • Username - Username of the account That will be used for making calls from AEM to LiveCycle. It can be any LiveCycle user who has the permissions to invoke Document Services.
  • Password - User password.
  • Service Name - Services that should be invoked using the user credentials provided in Username and Password fields. By default, no credentials are passed while invoking LiveCycle services.

[1] https://helpx.adobe.com/livecycle/help/aem/aem-livecycle-connector.html#Invoking%20via%20Service%20R...

Avatar

Level 2

I checked for GeneratePDFService in Components and Services and it was present. I assumed that LiveCycle services are running since GeneratePDFService is part of the SDK. Here's the service from service section :

[com.adobe.pdfg.service.api.GeneratePDFService]

                                                         
component.id2372
component.namecom.adobe.pdfg.impl.GeneratePDFServiceImpl
htmlToPdfFactory.target(bmc.service.name=HtmlToPdfSvc)
imageToPdfFactory.target(bmc.service.name=Img2PDFSvc)
nativeToPdfFactory.target(bmc.service.name=Native2PDFSvc)
openOfficeToPdfFactory.target(bmc.service.name=OpenOffice2PDFSvc)
paperCaptureFactory.target(bmc.service.name=PaperCaptureSvc)
pdfMakerFactory.target(bmc.service.name=PDFMakerSvc)
service.bundleid490
Service PIDcom.adobe.pdfg.impl.GeneratePDFServiceImpl
service.scopebundle
Service VendorAdobe Systems
swfToPdfFactory.target(bmc.service.name=Swf2PDFSvc)
Using Bundlesadobe-aemfd-pdfg-config (489)

Avatar

Correct answer by
Employee

Unless I am completely mistaken, the package you have installed allows you to invoke services on a LiveCycle ES4 Server. So you need a standalone LiveCycle ES4 server running. From "http://help.adobe.com/en_US/livecycle/11.0/Overview/lc_overview_ds.pdf":

Integration with Adobe Experience Manager (AEM)

LiveCycle provides a rich client SDK that allows client applications to invoke LiveCycle services using Java APIs. You can invoke LiveCycle Document Services from within Adobe Experience Manager (AEM) web apps and workflows using AEM LiveCycle Conenctor. It simplifies using these APIs within the OSGi environment and enables seamless invocation of LiveCycle Services. 

Avatar

Level 2

@Opkar Gill  That's true. Thanks a lot clarifying. I was investigating and found the same. Its a standalone server that needs to be installed in order to use the Document services.

I presumed that LiveCycle was bundled with AEM.

I wonder what the com.adobe.pdfg.service.api.GeneratePDFService is then?

My eventual goal is to use some kind of PDF conversion service. Does AEM have anything out of the box?

Avatar

Level 10

are you talking about converting the AEM pages into pdf ? or a word doc asset into pdf ?

Avatar

Level 10

LiveCycle ES is not bundled with AEM. 

Avatar

Level 10

If its from word doc to pdf, you can use some 3rd party APIs like JODConverter or OpenOffice

Avatar

Level 2

So, based on the suggestions in this thread, i went ahead to download LiveCycle trial. But it seems all the LiveCycle feature are now accommodated in AEM.

http://www.adobe.com/downloads/livecycle-trial-download.html

The same dependable features that you have come to appreciate in LiveCycle are now available in Adobe Experience Manager forms (AEM forms) and so much more. AEM forms can transform complex enterprise forms and processes into simple engaging digital experiences, anytime, anywhere, on any device. For more information go to: www.adobe.com/go/aemforms

 

 

 

Avatar

Level 2

Word doc and other MIME types into pdf. I have a list actually :

GIF, ONG, JPEG, TIFF, BMP, doc, docx, rtf, xls, xlsx, ppt, pptx, txt/plain, txt/html, txt/csv, txt/tab separated, eml, Pdf

Avatar

Employee

Hi Anup,

as bsloki said, you can use 3rd party libraries to generate PDF's. Here is an article for CQ5.6[1]

I think what you are looking for is Document Services [2] if using AEM6

Regards,

Opkar

[1] https://helpx.adobe.com/experience-manager/using/creating-custom-experience-manager-pdf.html

[2] https://helpx.adobe.com/aem-forms/6/overview-aem-document-services.html

Avatar

Level 2

Thanks Opkar..

This looks like it. It states - "can easily convert documents created within the organization to Adobe PDF files that can be viewed using the ubiquitous Adobe Reader® software."

Thanks for sharing the links. Looks promising. I will look for LiveCycle like APIs for pdf conversion since i need to do this programatically.

Avatar

Employee

No problem Anup,

if you have any specific questions, please head over to the AEM Forms forum where you will get some expert advice

Regards,

Opkar