ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <j...@apache.org>
Subject [jira] [Moved] (AXIOM-479) In OSGi, parser bundle cannot use StAX
Date Sat, 09 Jan 2016 13:05:39 GMT

     [ https://issues.apache.org/jira/browse/AXIOM-479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andreas Veithen moved ABDERA-314 to AXIOM-479:
----------------------------------------------

    Affects Version/s:     (was: 1.1.3)
                  Key: AXIOM-479  (was: ABDERA-314)
              Project: Axiom  (was: Abdera)

> In OSGi, parser bundle cannot use StAX
> --------------------------------------
>
>                 Key: AXIOM-479
>                 URL: https://issues.apache.org/jira/browse/AXIOM-479
>             Project: Axiom
>          Issue Type: Bug
>            Reporter: Bas de Bakker
>
> This issue refers to a version 1.1.3 dated December 21, 2012 on the Apache mirrors. The
mailing lists only mention an 1.1.3 RC2, so I'm not sure if this version is meant to be the
final release version of 1.1.3.
> I'm trying to use Abdera in an OSGi based server. However, this fails with stacktraces
like:
> javax.xml.stream.FactoryConfigurationError: Requested factory com.ctc.wstx.stax.WstxOutputFactory
cannot be located.  Classloader =sun.misc.Launcher$AppClassLoader@42b7141a
>         at javax.xml.stream.FactoryLocator.loadFactory(FactoryLocator.java:120) ~[na:na]
>         at javax.xml.stream.FactoryLocator.locate(FactoryLocator.java:109) ~[na:na]
>         at javax.xml.stream.FactoryLocator.locate(FactoryLocator.java:54) ~[na:na]
>         at javax.xml.stream.XMLOutputFactory.newInstance(XMLOutputFactory.java:29) ~[na:1.7.0_11]
>         at org.apache.axiom.om.util.StAXUtils$9.run(StAXUtils.java:655) ~[na:na]
>         at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_11]
>         at org.apache.axiom.om.util.StAXUtils.newXMLOutputFactory(StAXUtils.java:645)
~[na:na]
>         at org.apache.axiom.om.util.StAXUtils.getXMLOutputFactory_perClassLoader(StAXUtils.java:709)
~[na:na]
>         at org.apache.axiom.om.util.StAXUtils.getXMLOutputFactory(StAXUtils.java:348)
~[na:na]
>         at org.apache.axiom.om.util.StAXUtils.getXMLOutputFactory(StAXUtils.java:313)
~[na:na]
>         at org.apache.axiom.om.util.StAXUtils.createXMLStreamWriter(StAXUtils.java:436)
~[na:na]
>         at org.apache.axiom.om.util.StAXUtils.createXMLStreamWriter(StAXUtils.java:431)
~[na:na]
>         at org.apache.axiom.om.impl.llom.OMSerializableImpl.serialize(OMSerializableImpl.java:149)
~[na:na]
>         at org.apache.abdera.parser.stax.FOMElement.writeTo(FOMElement.java:341) ~[na:na]
>         at org.apache.abdera.parser.stax.FOMWriter.writeTo(FOMWriter.java:73) ~[na:na]
>         at org.apache.abdera.util.AbstractWriter.writeTo(AbstractWriter.java:80) ~[na:na]
>         at org.apache.abdera.parser.stax.FOMElement.writeTo(FOMElement.java:314) ~[na:na]
>         at org.apache.abdera.parser.stax.FOMElement.writeTo(FOMElement.java:329) ~[na:na]
> As Java includes StAX since version 6, I don't need Woodstox. So what I did was:
> 1. Remove the geronimo-stax_api and wstx-asl jars from the abdera-parser bundle
> 2. Remove them from the Bundle-ClassPath manifest header
> 3. Add javax.xml.stream and javax.xml.stream.util to its Import-Package header
> This fixed the issue for me.
> I would suggest doing the above. Anyone still using an ancient Java version without StAX
can include it as an external dependency.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


Mime
View raw message