https://issues.apache.org/bugzilla/show_bug.cgi?id=44887
Summary: Thread Safety Problem with FOP 0.93
Product: XMLGraphicsCommons
Version: Trunk
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: XMP
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
Hi,
We use the version 0.93 of FOP.
When this library is used in a Multi Threaded environment, we receive the
following error message:
java.lang.Thread.run(Thread.java:595)
Caused by: <java.lang.NumberFormatException: For input string:
"E444444411E411EEEEEE1">
sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
java.lang.Double.parseDouble(Double.java:482)
java.text.DigitList.getDouble(DigitList.java:141)
java.text.DecimalFormat.parse(DecimalFormat.java:1276)
java.text.SimpleDateFormat.subParse(SimpleDateFormat.java:1375)
java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1124)
java.text.DateFormat.parse(DateFormat.java:333)
org.apache.xmlgraphics.xmp.XMPSchemaAdapter.parseISO8601Date(XMPSchemaAdapter.java:189)
The reason is the use of a DateFormat as static class variable:
http://svn.apache.org/viewvc/xmlgraphics/commons/tags/commons-1_1/src/java/org/apache/xmlgraphics/xmp/XMPSchemaAdapter.java?view=markup
The JAVA DateFormat classes are not at all thread safe. This is written in the
API description: <Date formats are not synchronized>.
On your site
http://xmlgraphics.apache.org/fop/0.94/embedding.html#multithreading
you write:
<If you encounter any suspicious behaviour, please notify us.>
I hope that the notification of this problem will help you.
Best Regards
Jean-Claude
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]