| Products | Versions | 
|---|---|
| TIBCO ActiveMatrix BusinessWorks | - | 
| Not Applicable | - | 
Description:
 Reading PDF file in Java activity with Adobe APIs works fine with TIBCO 
Businessworks (BW) 5.9.2 and backward versions but fails with java.net.MalformedURLException in TIBCO Businessworks 
(BW) 5.9.3 and newer versions.
 Symptoms:
 Steps to reproduce:
1). Download the attached jar file and the project.
2). Set the alias library in the AdobeUtilities/AlliasLibrary folder.
3). Set the full path of a sample pdf file in the input tab of the Java code activity.
4). Run the "read pdf from-file" process.
5). The process will run fine with BW 5.9.2, but will fail with the 
following exception with BW 5.9.3 and newer. The exception happens while 
executing doc.exportAnnotations() method in the Java code.
2013 Feb 06 12:19:44:780 GMT -8 BW.PDFReader Debug [BW-Core] Job-22000 
Error in [read pdf form - file.process/read pdf file] While executing 
[invoke] encountered [com.adobe.pdf.exceptions.XFDFException] : 
[java.net.MalformedURLException at 
com.adobe.pdf.impl.PDFDocumentImpl.exportAnnotations(Unknown Source)]
2013 Feb 06 12:19:44:783 GMT -8 BW.PDFReader Debug [BW-Core] <= read 
pdf form - file.process/read pdf file.eval(Job-22000) returned ERROR
2013 Feb 06 12:19:44:784 GMT -8 BW.PDFReader Error [BW_Plugin] 
BW-JAVA-100001 Job-22000 Error in [read pdf form - file.process/read pdf
 file]
While executing [invoke] encountered 
[com.adobe.pdf.exceptions.XFDFException] : 
[java.net.MalformedURLException at 
com.adobe.pdf.impl.PDFDocumentImpl.exportAnnotations(Unknown Source)]
at com.tibco.plugin.java.JavaActivity.eval(JavaActivity.java:420)
at com.tibco.pe.plugin.Activity.eval(Activity.java:240)
at com.tibco.pe.core.TaskImpl.eval(TaskImpl.java:775)
at com.tibco.pe.core.Job.step(Job.java:729)
at com.tibco.pe.core.Job.checkStep(Job.java:518)
at com.tibco.pe.core.JobDispatcher$JobCourier.runx(JobDispatcher.java:249)
at com.tibco.pe.core.JobDispatcher$JobCourier.run(JobDispatcher.java:200)
<?xml version="1.0" encoding="UTF-8"?>
<Data>
<ns0:InvocationException xmlns:ns0="http://schemas.tibco.com/bw/plugins/java/5.0/javaExceptions">
<msg>While executing [invoke] encountered 
[com.adobe.pdf.exceptions.XFDFException] : 
[java.net.MalformedURLException at 
com.adobe.pdf.impl.PDFDocumentImpl.exportAnnotations(Unknown 
Source)]</msg>
<msgCode>BW-JAVA-100001</msgCode>
<methodName>invoke</methodName>
<exceptionClassName>com.adobe.pdf.exceptions.XFDFException</exceptionClassName>
<exceptionMessage>java.net.MalformedURLException at 
com.adobe.pdf.impl.PDFDocumentImpl.exportAnnotations(Unknown 
Source)</exceptionMessage>
</ns0:InvocationException>
</Data>
 Cause:
 The issue is due to jar xmlparsers.jar which provides the object of 
TransformFactoryImpl concrete class. It was changed starting with BW 
5.9.3 for a security fix related to XML parsing. If you copy the 
engine.jar from BW 5.9.2 to the hotfix/lib directory of BW 5.9.3, the 
project will work fine even with BW 5.9.3.