Uploaded image for project: 'XMLGraphicsCommons'
  1. XMLGraphicsCommons
  2. XGC-13

Thread Safety Problem with FOP 0.93

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 2.6
    • None
    • xmp
    • None
    • Operating System: Windows XP
      Platform: PC

    Description

      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

      Attachments

        Activity

          People

            general@xmlgraphics.apache.org XML Graphics Project Mailing List
            jcrouvi@yahoo.com Jean-Claude Rouvinez
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: