StAXUtils XMLInputFactory instantiation
---------------------------------------
Key: WSCOMMONS-127
URL: http://issues.apache.org/jira/browse/WSCOMMONS-127
Project: WS-Commons
Issue Type: Bug
Components: AXIOM
Environment: Java 1.6 beta 1, Java 1.6 RC1, not Java 1.6 beta 2
Reporter: Tim Putnam
I'm using Axiom 1.2 in the context of the latest Axis 2 v1.1 snapshots. I've
twice in two months had issues with a particular part of the source, that
being in org.apache.axiom.om.util.StAXUtils:
synchronized public static XMLInputFactory getXMLInputFactory() {
if (!xmlInputFactoryPool.empty()) {
return (XMLInputFactory) xmlInputFactoryPool.pop();
}
return
XMLInputFactory.newInstance("javax.xml.stream.XMLInputFactory",
StAXUtils.class.getClassLoader());
}
When I run my application on either Java 1.6 beta ONE, or the recent Java
1.6 RC 1, it fails when attempting to create the new instance. I have no
idea why, but I get an InstantiationException (exactly the same thing worked
perfectly on Java 1.6 beta TWO).
I've currently got around the issue by replacing the above instantiation in
StAXUtils with the line:
return XMLInputFactory.newInstance();
..which works perfectly. Could anybody shed any light on what the issue is
that I'm experiencing and why its changing with the Java versions? Also, why
is StAXUtils using the parameterised version of this interface when its just
passing in defaults?
Many thanks,
Tim
----------- Response from mailing list-------
Please log a bug. we need to add a try/catch and fall back to ("return
XMLInputFactory.newInstance();"). looks like the stax api inside your
jdk version has a problem. (try dropping the stax 1.0.1 api jar in
lib/endorsed) if you want to run w/o a code fix.
thanks,
dims
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]