InputStreamPassivationHandler / OutputService class not found
Hi All, I'm trying to generate PDF using XDP and XML input streams. Below is the piece of code used to generate documents & PDF
@Reference private OutputService outputService;
1. InputStream xdpIS = xdpRendition.getStream(); // Get XDP input steam and assign it to xdpIS object.
2. InputStream xmlIS = new ByteArrayInputStream(xmlStr.getBytes()); // Get XML input steam
3. Document xdpDocument = new Document(xdpIS);
4. Document xmlDocument = new Document(xmlIS);
com.adobe.fd.output.api.PDFOutputOptions pdfOptions = new com.adobe.fd.output.api.PDFOutputOptions(); pdfOptions.setAcrobatVersion(com.adobe.fd.output.api.AcrobatVersion.Acrobat_11);
com.adobe.aemfd.docmanager.Document generatedDocument;
try {
generatedDocument = outputService.generatePDFOutput(xdpDocument,xmlDocument,pdfOptions);
generatedDocument.getInputStream().toString();
generatedDocument.copyToFile(new java.io.File("C:\\migration\\files\\test.pdf"));
} catch (OutputServiceException e) { // TODO Auto-generated catch block e.printStackTrace(); }
Exception:
1. Getting java.lang.NoClassDefFoundError: com/adobe/aemfd/docmanager/internal/passivation/InputStreamPassivationHandler at Line number 3. Also, getting OutputService class not found exception.
I've added below dependencies in pom.xml
<dependency>
<groupId>com.adobe.aemds.core</groupId>
<artifactId>adobe-aemds-core-docmanager</artifactId>
<version>1.4.6</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.adobe.aem/aem-api -->
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>aem-api</artifactId>
<version>6.0.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.adobe.aemfd</groupId>
<artifactId>aemfd-client-sdk</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.adobe.livecycle</groupId>
<artifactId>adobe-lc-forms-bedrock-connector</artifactId>
<version>6.0.44</version>
<scope>provided</scope>
</dependency>
Please advise If we need to add any other dependencies to resolve the issues. FYI, when I use the same code in jsp, it's working fine. Thanks In advance Siva
