Details

    • Type: Bug Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: xmp
    • Labels:
      None
    • Environment:
      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

        Activity

        Hide
        Jeremias Maerki added a comment -

        Problematic uses of DecimalFormat now fixed in 0.95 branch of FOP, too:
        http://svn.apache.org/viewvc?rev=669173&view=rev

        Show
        Jeremias Maerki added a comment - Problematic uses of DecimalFormat now fixed in 0.95 branch of FOP, too: http://svn.apache.org/viewvc?rev=669173&view=rev
        Hide
        Jean-Claude Rouvinez added a comment -

        $ java -version
        java version "1.5.0_09"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
        Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode)

        Intel(R)
        Pentium(R) 4 CPU 2.80GHz
        2.79GHz, 1.99 GB RAM

        Microsoft Windows XP
        Professional
        Version 2002
        Service Pack 2

        Show
        Jean-Claude Rouvinez added a comment - $ java -version java version "1.5.0_09" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03) Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode) Intel(R) Pentium(R) 4 CPU 2.80GHz 2.79GHz, 1.99 GB RAM Microsoft Windows XP Professional Version 2002 Service Pack 2
        Hide
        Jeremias Maerki added a comment -

        The issue in XG Commons should be fixed now:
        http://svn.apache.org/viewvc?rev=652284&view=rev

        I'll keep this issue open until I've fixed similar problems in FOP, too.

        Show
        Jeremias Maerki added a comment - The issue in XG Commons should be fixed now: http://svn.apache.org/viewvc?rev=652284&view=rev I'll keep this issue open until I've fixed similar problems in FOP, too.
        Hide
        Jeremias Maerki added a comment -

        Yeah, we know that we use the date and number format classes in a not so good way but so far I can't remember a bug report before. I'm just curious: what Java VM, operating system and CPU are you using?

        I'll look into this and try to find a better solution. I guess while we're at it we'll have to fix similar misuses in FOP, too.

        Show
        Jeremias Maerki added a comment - Yeah, we know that we use the date and number format classes in a not so good way but so far I can't remember a bug report before. I'm just curious: what Java VM, operating system and CPU are you using? I'll look into this and try to find a better solution. I guess while we're at it we'll have to fix similar misuses in FOP, too.

          People

          • Assignee:
            XML Graphics Project Mailing List
            Reporter:
            Jean-Claude Rouvinez
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development