cancel
Showing results for 
Search instead for 
Did you mean: 

Rendering error with wrong template path

bernd_speckmann
Contributor
0 Kudos

Hi there,

I got a processing exception during a "Render" operation. I think the problem is shown in the following log entries on the server with Adobe Document Services installed (ADS). The application is running on another system (AS1):

com.adobe.ads.remote.EJB_PDFAgent: Embedding of file/stream: DatasheetView_InteractiveForm.xdp using ID: template0 Failed:

Unable to create a FileDataBuffer for: E:\usr\sap\AS1\J00\j2ee\cluster\apps\company.de\sheetwd\servlet_jsp\webdynpro\resources\company.de\sheetwd\root\WEB-INF\webdynpro\Components\de.company.sheet.wd.datasheet.Datasheet\DatasheetView_InteractiveForm.xdp

... Continuing with Embedding files ...

The path "E:\usr\sap\AS1\J00..." does not exists on the Server with Adobe document services installed. Its SID is "ADS".

Caused by: com.adobe.ProcessingException: File not found: E:\usr\sap\AS1\J00\j2ee\cluster\apps\company.de\sheetwd\servlet_jsp\webdynpro\resources\company.de\sheetwd\root\WEB-INF\webdynpro\Components\de.company.sheet.wd.datasheet.Datasheet\DatasheetView_InteractiveForm.xdp

at com.adobe.ads.operation.Render.execute(Unknown Source)

at com.adobe.ads.operation.ADSOperation.doWork(Unknown Source)

... 85 more

Caused by: com.adobe.ProcessingException: File not found: E:\usr\sap\AS1\J00\j2ee\cluster\apps\company.de\sheetwd\servlet_jsp\webdynpro\resources\company.de\sheetwd\root\WEB-INF\webdynpro\Components\de.company.sheet.wd.datasheet.Datasheet\DatasheetView_InteractiveForm.xdp

at com.adobe.ads.data.FileURLData.getInputStream(Unknown Source)

at com.adobe.ads.data.URLData.getByteArray(Unknown Source)

at com.adobe.ads.data.TemplateCacheInfo.<init>(Unknown Source)

at com.adobe.ads.data.TemplateCacheInfo.getInstance(Unknown Source)

at com.adobe.ads.operation.support.Template.setCacheInfo(Unknown Source)

at com.adobe.ads.operation.support.Template.initialize(Unknown Source)

at com.adobe.ads.operation.Render.initializeTemplates(Unknown Source)

at com.adobe.ads.operation.Render.initializeSources(Unknown Source)

at com.adobe.ads.operation.Render.initialize(Unknown Source)

... 87 more

Caused by: java.io.FileNotFoundException: E:\usr\sap\AS1\J00\j2ee\cluster\apps\company.de\sheetwd\servlet_jsp\webdynpro\resources\company.de\sheetwd\root\WEB-INF\webdynpro\Components\de.company.sheet.wd.datasheet.Datasheet\DatasheetView_InteractiveForm.xdp (The system cannot find the path specified)

at java.io.FileInputStream.open(Native Method)

Any ideas

Thanks ahead

Accepted Solutions (1)

Accepted Solutions (1)

bernd_speckmann
Contributor
0 Kudos

The problem was, that I was passing xdp template source as url .

Instead I should send it as a stream using the appropriate pdfdocument api.

Former Member
0 Kudos

Dear Bernd,

I faced the same problem. Could you tell me how to send it as a stream ?

Thank you

Ray

bernd_speckmann
Contributor
0 Kudos

Hello,

I think at the moment you are passing the xdp template source as url using the WDURLGenerator.

Instead you should send it as a stream using the appropriate pdfdocument api like this:

String templateUrl = null;

ByteArrayOutputStream templateStream = null;

...

templateUrl = WDURLGenerator.getPublicResourcePath(otherPart, "My_InteractiveForm.xdp");

InputStream template = new FileInputStream(templateUrl);

ByteArrayOutputStream buffer = new ByteArrayOutputStream();

              int nRead;

              byte[] data = new byte[16384]; 

              while ((nRead = template.read(data, 0, data.length)) != -1) {

                        buffer.write(data, 0, nRead);

              } 

              buffer.flush(); 

              templateStream = buffer;

.....

IWDPDFDocumentHandler pdfDocumentHandler = WDPDFDocumentFactory.getDocumentHandler();

IWDPDFDocumentCreationContext pdfDocumentCreationContext = pdfDocumentHandler.getDocumentCreationContext();

.....

pdfDocumentCreationContext.setTemplate(templateStream);

Hope this helps...

Regards, Bernd

Former Member
0 Kudos

It helps a lot. Thank you, Bernd.

Answers (0)