[ 
https://issues.apache.org/jira/browse/WSCOMMONS-489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761830#action_12761830
 ] 

Andreas Veithen commented on WSCOMMONS-489:
-------------------------------------------

Axiom now has a mechanism that detects the StAX implementation and that (among 
other things) makes the factories thread safe. This however only works if it 
correctly detects the StAX "dialect", which is probably what fails in your case.

The test you mention is executed several times during the build: once in 
axiom-api and several times in axiom-parser-tests, using different StAX 
implementations. One execution of this test in axiom-parser-tests is against 
the StAX implementation that is part of the JRE (on Java >= 1.6). It is 
probably this execution that fails. Can you please provide the following 
additional information:

- The tests in axiom-parser-tests output several lines starting with "INFO: 
Detected StAX dialect". Can you please post these messages?
- What JRE (vendor and version) do you use? Do you know which StAX parser is 
shipped with that JRE?

> StAXUtils incorrectly assumes that XMLInputFactory and XMLOutputFactory 
> instances are thread safe
> -------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-489
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-489
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>    Affects Versions: Axiom 1.2.8
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>             Fix For: Axiom 1.2.9
>
>
> StAXUtil uses a single XMLInputFactory or XMLOutputFactory instance (per 
> classloader). This means that it makes the assumption that these instances 
> are thread safe. However, there is nothing in the StAX specs that guarantees 
> that, and Sun's implementation in JDK 6 is not thread safe, at least with the 
> default properties [1] [2].
> [1] 
> http://www.java2s.com/Open-Source/Java-Document/6.0-JDK-Modules-com.sun/xml/com/sun/xml/internal/stream/XMLInputFactoryImpl.java.htm
> [2] 
> http://www.java2s.com/Open-Source/Java-Document/6.0-JDK-Modules-com.sun/xml/com/sun/xml/internal/stream/XMLOutputFactoryImpl.java.htm

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to