Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

OutputService.generatePDFOutput connection to failed Service

Avatar

Avatar
Validate 1
Level 2
nchandra
Level 2

Likes

2 likes

Total Posts

14 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
nchandra
Level 2

Likes

2 likes

Total Posts

14 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
nchandra
Level 2

28-08-2018

We are attempting to generate pdf document, using OutputService.generatePDFOutput() getting connection to failed Service error. Below are our environment details

Environment : AEM  6.3.2

Forms package : AEM-Forms-6.3.2.0-LX-4.1.64

Server : Linux

in the POM added below dependency

<dependency>

    <groupId>com.adobe.aemfd</groupId>

    <artifactId>aemfd-client-sdk</artifactId>

    <version>6.3.0</version>

    <scope>provided</scope>

</dependency>

Exception :

com.adobe.fd.output.internal.exception.OutputServiceException: AEM_OUT_001_003:Unexpected Exception: AEM_OUT_001_003:Unexpected Exception: Connection to failed service.

at com.adobe.fd.output.impl.OutputServiceImpl.generatePDFOutput(OutputServiceImpl.java:84)

at com.xxx.core.servlet.MSServicesServlet.generatePDFOutput(MSServicesServlet.java:590)

at com.xxx.core.servlet.MSServicesServlet.doPost(MSServicesServlet.java:291)

at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:149)

at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:346)

at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:378)

at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552)

at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)

at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:138)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:375)

at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:190)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:96)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282)

at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:71)

at com.day.cq.wcm.core.impl.warp.TimeWarpFilter.doFilter(TimeWarpFilter.java:109)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.cq.social.ugcbase.security.impl.SaferSlingPostServlet.doFilter(SaferSlingPostServlet.java:126)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

...frames omitted

Caused by: com.adobe.fd.output.internal.exception.OutputServiceException: AEM_OUT_001_003:Unexpected Exception: Connection to failed service.

at com.adobe.fd.output.impl.OutputServiceImpl.generatePDFOutput(OutputServiceImpl.java:117)

at com.adobe.fd.output.impl.OutputServiceImpl.generatePDFOutput(OutputServiceImpl.java:82)

... 136 common frames omitted

Caused by: java.lang.IllegalStateException: Connection to failed service.

at com.adobe.service.ResourcePooler.allocateResource(ResourcePooler.java:104)

at com.adobe.service.ConnectionFactoryManagerPeer.getConnectionResourceFromPool(ConnectionFactoryManagerPeer.java:76)

at com.adobe.service.ConnectionFactoryManagerPeerImpl.getConnection(ConnectionFactoryManagerPeerImpl.java:155)

at com.adobe.service.impl.PlatformPeerImpl.lookup(PlatformPeerImpl.java:49)

at com.adobe.forms.aem.impl.XFANativeServiceImpl.paExecute(XFANativeServiceImpl.java:115)

at com.adobe.forms.aem.impl.XFANativeServiceImpl.paExecute(XFANativeServiceImpl.java:430)

at com.adobe.forms.xtg.impl.XMLFormServiceImpl$$anonfun$paExecute$2$$anonfun$2.apply(XMLFormServiceImpl.scala:167)

at com.adobe.forms.xtg.impl.XMLFormServiceImpl$$anonfun$paExecute$2$$anonfun$2.apply(XMLFormServiceImpl.scala:167)

at com.adobe.forms.logging.PerfLogger$class.measure(PerfLogger.scala:60)

at com.adobe.forms.logging.PerfLogger$.measure(PerfLogger.scala:33)

at com.adobe.forms.xtg.impl.XMLFormServiceImpl$$anonfun$paExecute$2.apply(XMLFormServiceImpl.scala:166)

at com.adobe.forms.xtg.impl.XMLFormServiceImpl$$anonfun$paExecute$2.apply(XMLFormServiceImpl.scala:158)

at com.adobe.forms.logging.PerfLogger$class.measure(PerfLogger.scala:60)

at com.adobe.forms.logging.PerfLogger$.measure(PerfLogger.scala:33)

at com.adobe.forms.xtg.impl.XMLFormServiceImpl.paExecute(XMLFormServiceImpl.scala:156)

at com.adobe.forms.xtg.impl.XMLFormServiceImpl$$anonfun$com$adobe$forms$xtg$impl$XMLFormServiceImpl$$resolveTemplateCacheGen$2.apply(XMLFormServiceImpl.scala:192)

at com.adobe.forms.xtg.impl.XMLFormServiceImpl$$anonfun$com$adobe$forms$xtg$impl$XMLFormServiceImpl$$resolveTemplateCacheGen$2.apply(XMLFormServiceImpl.scala:187)

at com.adobe.forms.logging.PerfLogger$class.measure(PerfLogger.scala:60)

at com.adobe.forms.logging.PerfLogger$.measure(PerfLogger.scala:33)

at com.adobe.forms.xtg.impl.XMLFormServiceImpl.com$adobe$forms$xtg$impl$XMLFormServiceImpl$$resolveTemplateCacheGen(XMLFormServiceImpl.scala:187)

at com.adobe.forms.xtg.impl.XMLFormServiceImpl$$anonfun$resolveTemplate$2$$anonfun$apply$2.apply(XMLFormServiceImpl.scala:281)

at com.adobe.forms.xtg.impl.XMLFormServiceImpl$$anonfun$resolveTemplate$2$$anonfun$apply$2.apply(XMLFormServiceImpl.scala:281)

at com.adobe.forms.cache.ResourceCache$$anonfun$getOrElseUpdate$2.apply(ResourceCache.scala:107)

at com.adobe.forms.cache.ResourceCache$$anonfun$getOrElseUpdate$2.apply(ResourceCache.scala:97)

at com.adobe.forms.logging.PerfLogger$class.measure(PerfLogger.scala:60)

at com.adobe.forms.logging.PerfLogger$.measure(PerfLogger.scala:33)

at com.adobe.forms.cache.ResourceCache$class.getOrElseUpdate(ResourceCache.scala:97)

at com.adobe.forms.cache.impl.PreRenderCacheImpl.getOrElseUpdate(PreRenderCacheImpl.scala:35)

at com.adobe.forms.xtg.impl.XMLFormServiceImpl$$anonfun$resolveTemplate$2.apply(XMLFormServiceImpl.scala:281)

at com.adobe.forms.xtg.impl.XMLFormServiceImpl$$anonfun$resolveTemplate$2.apply(XMLFormServiceImpl.scala:280)

at com.adobe.forms.logging.PerfLogger$class.measure(PerfLogger.scala:60)

at com.adobe.forms.logging.PerfLogger$.measure(PerfLogger.scala:33)

at com.adobe.forms.xtg.impl.XMLFormServiceImpl.resolveTemplate(XMLFormServiceImpl.scala:279)

at com.adobe.forms.service.impl.LCOptionsXFAInterpreterImpl$$anonfun$resolvedTemplate$2.apply(LCOptionsXFAInterpreterImpl.scala:135)

at com.adobe.forms.service.impl.LCOptionsXFAInterpreterImpl$$anonfun$resolvedTemplate$2.apply(LCOptionsXFAInterpreterImpl.scala:134)

at com.adobe.forms.logging.PerfLogger$class.measure(PerfLogger.scala:60)

at com.adobe.forms.logging.PerfLogger$.measure(PerfLogger.scala:33)

at com.adobe.forms.service.impl.LCOptionsXFAInterpreterImpl.resolvedTemplate(LCOptionsXFAInterpreterImpl.scala:134)

at com.adobe.forms.service.impl.AEMFormsHelperServiceImpl.resolvedTemplate(AEMFormsHelperServiceImpl.scala:53)

at com.adobe.fd.output.impl.OutputServiceImpl.generatePDFOutput(OutputServiceImpl.java:114)

I am suspecting aemfd-client-sdk dependency version in the POM is not the correct one, am not sure.

Thanks,

Chandra

View Entire Topic

Avatar

Avatar
Validate 1
Level 2
nchandra
Level 2

Likes

2 likes

Total Posts

14 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
nchandra
Level 2

Likes

2 likes

Total Posts

14 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
nchandra
Level 2

29-08-2018

Sorry for late reply, Below is the sample code, how we are invoking generatePDFOutput

InputStream targetStream = new ByteArrayInputStream(xml.getBytes()); 

PDFOutputOptions option = new PDFOutputOptions();   

  ...Adding options

Document pdfDoc = outputService.generatePDFOutput(document,new Document(targetStream),option);

Thanks,

Chandra