You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Fladnag <fl...@zerezo.com> on 2013/06/24 13:22:15 UTC

SMX 4.5.1 FactoryLocator broken ?

Hi,

I have an issue with SMX 4.5.1

Environment : Win 7 64b, clean installation of SMX 4.5.1, JDK 1.6.0_31

I tried doing this (for testing, I know there is no route here) :


and I have an exception :


The same code work fine in SMX 4.4.2.

When I searched more, XMLInputFactory.newInstance() can't find the woodstox
API and the default API was used instead.

newInstance() calls javax.xml.stream.FactoryLocator, who is overrided in
*lib/endorsed/org.apache.servicemix.specs.jaxp-api-1.4-2.2.0.jar*
(-verbose:class)

FactoryLocator calls OsgiLocator.doLocate, but in Eclipse I don't enter into
first condition : if (factories != null), despite the fact that Eclipse
tells me factories is not empty (mouseover & watch expression)
factories contains all I need, including javax.xml.stream.XMLInputFactory
defined by woodstox bundle, I don't understand why the "if" failed




--
View this message in context: http://servicemix.396122.n5.nabble.com/SMX-4-5-1-FactoryLocator-broken-tp5717083.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: SMX 4.5.1 FactoryLocator broken ?

Posted by Fladnag <fl...@zerezo.com>.
ok, it's working with snapshot.

Do you know if a patch is available for 4.5.1 or if 4.5.2 will be released
soon ?

Thanks !



--
View this message in context: http://servicemix.396122.n5.nabble.com/SMX-4-5-1-FactoryLocator-broken-tp5717083p5717090.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: SMX 4.5.1 FactoryLocator broken ?

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Please test with 4.5.2 SNAPSHOT kit, I believe this already get fixed

[1]https://repository.apache.org/content/groups/snapshots-group/org/apache/servicemix/apache-servicemix/4.5.2-SNAPSHOT/


-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋



On 2013-6-24, at 下午7:22, Fladnag wrote:

> Hi,
> 
> I have an issue with SMX 4.5.1
> 
> Environment : Win 7 64b, clean installation of SMX 4.5.1, JDK 1.6.0_31
> 
> I tried doing this (for testing, I know there is no route here) :
> 
> 
> and I have an exception :
> 
> 
> The same code work fine in SMX 4.4.2.
> 
> When I searched more, XMLInputFactory.newInstance() can't find the woodstox
> API and the default API was used instead.
> 
> newInstance() calls javax.xml.stream.FactoryLocator, who is overrided in
> *lib/endorsed/org.apache.servicemix.specs.jaxp-api-1.4-2.2.0.jar*
> (-verbose:class)
> 
> FactoryLocator calls OsgiLocator.doLocate, but in Eclipse I don't enter into
> first condition : if (factories != null), despite the fact that Eclipse
> tells me factories is not empty (mouseover & watch expression)
> factories contains all I need, including javax.xml.stream.XMLInputFactory
> defined by woodstox bundle, I don't understand why the "if" failed
> 
> 
> 
> 
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/SMX-4-5-1-FactoryLocator-broken-tp5717083.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: SMX 4.5.1 FactoryLocator broken ?

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Each specs jars will embed org.apache.servicemix.specs.locator.OsgiLocator, that's intended design.

The problem is that we shouldn't endorse new specs jars when use Karaf 2.2.x underlying, as Karaf 2.2.x doesn't support it
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋



On 2013-6-24, at 下午7:42, Fladnag wrote:

> Another idea :
> 
> With -verbose:class, I see that OsgiLocator was loaded from two jars :
> 
> [Loaded org.apache.servicemix.specs.locator.OsgiLocator from
> mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jsr311-api-1.1.1/1.9.0]
> [Loaded org.apache.servicemix.specs.locator.OsgiLocator from
> C:\apache-servicemix-4.5.1\bin\..\lib\endorsed\org.apache.servicemix.specs.jaxb-api-2.2-2.2.0.jar]
> 
> Maybe classes was registered in one class and retrieved with the other ? 
> 
> This could explain why I don't enter into the "if" : factories was really
> empty.
> 
> in SMX 4.4.2, there is no OsgiLocator in any jar at lib\endorsed
> 
> 
> 
> 
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/SMX-4-5-1-FactoryLocator-broken-tp5717083p5717089.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: SMX 4.5.1 FactoryLocator broken ?

Posted by Fladnag <fl...@zerezo.com>.
Another idea :

With -verbose:class, I see that OsgiLocator was loaded from two jars :

[Loaded org.apache.servicemix.specs.locator.OsgiLocator from
mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jsr311-api-1.1.1/1.9.0]
[Loaded org.apache.servicemix.specs.locator.OsgiLocator from
C:\apache-servicemix-4.5.1\bin\..\lib\endorsed\org.apache.servicemix.specs.jaxb-api-2.2-2.2.0.jar]

Maybe classes was registered in one class and retrieved with the other ? 

This could explain why I don't enter into the "if" : factories was really
empty.

in SMX 4.4.2, there is no OsgiLocator in any jar at lib\endorsed




--
View this message in context: http://servicemix.396122.n5.nabble.com/SMX-4-5-1-FactoryLocator-broken-tp5717083p5717089.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.