You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Bratislav Stojanovic <br...@gmail.com> on 2013/09/10 16:02:31 UTC
No newFactory() method in default ServiceMix
Hi,
I've just realized that default ServiceMix provides
javax.xml.stream.XMLInputFactory class
(via stax api 1.0 bundle) without newFactory() method. Method newInstance()
is there, but
that one is deprecated.
On the other hand I have a third-party bundle that uses newFactory and the
code is obfuscated.
What should I do to provide newFactory() method (as in Java SE) to other
bundles? I've tried to enable this package in jre.properties but my bundle
always picks version from the stax bundle (I guess because of the versions,
since javax.xml.stream is exported with version 0.0.0).
Thanx in advance.
--
Bratislav Stojanovic, M.Sc.
Re: No newFactory() method in default ServiceMix
Posted by stevegy <st...@126.com>.
i had install the StAX-API-1.2 to servicemix and disable the StAX-API-1.0.
But now i met this exception.
| ERROR | pool-15-thread-2 | DataStAXParser | 210 -
hp.es.ucmdb.integration.UCMDBXMLDataAdapter - 0.0.1.SNAPSHOT | General error
validate the XML data
java.lang.ClassCastException:
com.sun.xml.internal.stream.XMLInputFactoryImpl cannot be cast to
javax.xml.stream.XMLInputFactory
at
javax.xml.stream.XMLInputFactory.newFactory(XMLInputFactory.java:48)[209:org.apache.servicemix.specs.stax-api-1.2:2.3.0.SNAPSHOT]
--
View this message in context: http://servicemix.396122.n5.nabble.com/No-newFactory-method-in-default-ServiceMix-tp5717787p5717963.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: No newFactory() method in default ServiceMix
Posted by Bratislav Stojanovic <br...@gmail.com>.
OK, finally solved it. Bundle with Stax API 1.2 specs needs to be installed
instead of Stax API 1.0.
On Tue, Sep 10, 2013 at 4:32 PM, Bratislav Stojanovic <
bratislav1983@gmail.com> wrote:
> What is really interesting is that after I enable
> javax.xml.stream;version=1.6 in jre.properties
> , bundle will pick up this one, but I'm still getting :
>
> >>java.lang.NoSuchMethodError:
> javax.xml.stream.XMLInputFactory.newFactory()Ljavax/xml/stream/XMLInputFactory;
>
>
>
> On Tue, Sep 10, 2013 at 4:02 PM, Bratislav Stojanovic <
> bratislav1983@gmail.com> wrote:
>
>> Hi,
>>
>> I've just realized that default ServiceMix provides
>> javax.xml.stream.XMLInputFactory class
>> (via stax api 1.0 bundle) without newFactory() method. Method
>> newInstance() is there, but
>> that one is deprecated.
>>
>> On the other hand I have a third-party bundle that uses newFactory and
>> the code is obfuscated.
>>
>> What should I do to provide newFactory() method (as in Java SE) to other
>> bundles? I've tried to enable this package in jre.properties but my bundle
>> always picks version from the stax bundle (I guess because of the versions,
>> since javax.xml.stream is exported with version 0.0.0).
>>
>> Thanx in advance.
>>
>> --
>> Bratislav Stojanovic, M.Sc.
>>
>
>
>
> --
> Bratislav Stojanovic, M.Sc.
>
--
Bratislav Stojanovic, M.Sc.
Re: No newFactory() method in default ServiceMix
Posted by Bratislav Stojanovic <br...@gmail.com>.
What is really interesting is that after I enable
javax.xml.stream;version=1.6 in jre.properties
, bundle will pick up this one, but I'm still getting :
>>java.lang.NoSuchMethodError:
javax.xml.stream.XMLInputFactory.newFactory()Ljavax/xml/stream/XMLInputFactory;
On Tue, Sep 10, 2013 at 4:02 PM, Bratislav Stojanovic <
bratislav1983@gmail.com> wrote:
> Hi,
>
> I've just realized that default ServiceMix provides
> javax.xml.stream.XMLInputFactory class
> (via stax api 1.0 bundle) without newFactory() method. Method
> newInstance() is there, but
> that one is deprecated.
>
> On the other hand I have a third-party bundle that uses newFactory and the
> code is obfuscated.
>
> What should I do to provide newFactory() method (as in Java SE) to other
> bundles? I've tried to enable this package in jre.properties but my bundle
> always picks version from the stax bundle (I guess because of the versions,
> since javax.xml.stream is exported with version 0.0.0).
>
> Thanx in advance.
>
> --
> Bratislav Stojanovic, M.Sc.
>
--
Bratislav Stojanovic, M.Sc.