[
https://issues.apache.org/jira/browse/ODFTOOLKIT-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14611724#comment-14611724
]
Vladimir commented on ODFTOOLKIT-198:
-------------------------------------
I had this issue right now with odfdom-java 0.8.7 from maven:
{code:java}
OdfTextDocument document = OdfTextDocument.loadDocument(new
ByteArrayInputStream(bytes));
{code}
in multiple threads hang with this stacktrace:
{code}
"qtp1250500222-6687" prio=10 tid=0x00007fcddc058000 nid=0x14df runnable
[0x00007fcebd441000]
java.lang.Thread.State: RUNNABLE
at java.util.HashMap.put(HashMap.java:498)
at java.util.HashSet.add(HashSet.java:217)
at org.odftoolkit.odfdom.doc.OdfDocument.<init>(OdfDocument.java:805)
at
org.odftoolkit.odfdom.doc.OdfTextDocument.<init>(OdfTextDocument.java:189)
at
org.odftoolkit.odfdom.doc.OdfDocument.newDocument(OdfDocument.java:329)
at
org.odftoolkit.odfdom.doc.OdfDocument.loadDocument(OdfDocument.java:271)
at
org.odftoolkit.odfdom.doc.OdfDocument.loadDocument(OdfDocument.java:241)
at
org.odftoolkit.odfdom.doc.OdfDocument.loadDocument(OdfDocument.java:219)
at
org.odftoolkit.odfdom.doc.OdfTextDocument.loadDocument(OdfTextDocument.java:150)
at org.odftoolkit.odfdom.doc.OdfTextDocument$loadDocument.call(Unknown
Source)
at
ru.ihc.panel.service.reporting.ReportService.generateOdtPdf(ReportService.groovy:40)
{code}
> Some threads hang if openning a document with multiple threads
> --------------------------------------------------------------
>
> Key: ODFTOOLKIT-198
> URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-198
> Project: ODF Toolkit
> Issue Type: Improvement
> Components: java
> Affects Versions: odfdom-0.8.6
> Environment: Operating System: Windows
> Platform: PC
> Reporter: Ying Chun Guo
> Assignee: issues
> Priority: Minor
>
> If a document is openning with ODFDOM by multiple threads, some threads hang.
> By looking into the stack, the problem is caused by HashMap used in
> concurrent environment.
> So we need to change the type of static variables from HashMap to Hashtable.
> One place I found is some variables definition in OdfXMLFactory. There might
> be other places which should be changed.
> Patches will be uploaded later.
> Regards
> Daisy
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)