-
1. Re: jboss-fuse-6.0.0.redhat-024 issue with commons logging
ffang Sep 14, 2013 3:36 AM (in response to kishor_pawar89)Hi,
The error generally means the class was loaded by different class loaders
To deploy the JBI SA into OSGi container, your SA shouldn't embed third party jars like commons logging, it should refer the one already installed in OSGi container.
To refer a class which already installed in container in your SA/SU, you need add something like
<classpath>
<library>osgi:Bundle-SymbolicName</library>
</classpath>
to the xbean.xml of your SU, take a look a similar discussion[1] to get more details
[1]http://servicemix.396122.n5.nabble.com/Service-4-JBI-amp-3rd-Party-Libs-td5715490.html
Freeman
-
2. Re: jboss-fuse-6.0.0.redhat-024 issue with commons logging
kishor_pawar89 Sep 14, 2013 6:28 AM (in response to ffang)Many thank Freeman.issue resolved.
-
3. Re: jboss-fuse-6.0.0.redhat-024 issue with commons logging
kishor_pawar89 Sep 17, 2013 7:11 AM (in response to ffang)Hi,
<classpath>
<library>osgi:Bundle-SymbolicName</library>
</classpath>
As we have added the above in the camel context ,we get a XML validation error as below:
Type
cvc-complex-type.2.4.a: Invalid content was found starting with element 'classpath'. One of '{"http://www.springframework.org/schema/beans":description, "http://www.springframework.org/schema/beans":import, "http://www.springframework.org/schema/beans":alias, "http://www.springframework.org/schema/beans":bean, WC[##other:"http://www.springframework.org/schema/beans"], "http://www.springframework.org/schema/beans":beans}' is expected. camel-context.xml /ssa/camel-routing-service-unit/src/main/resources line 45 XML Problem.Do we need to add any namespace or XSD?
-
4. Re: jboss-fuse-6.0.0.redhat-024 issue with commons logging
ffang Sep 17, 2013 7:22 AM (in response to kishor_pawar89)Hi,
No, you can't add
<classpath>
<library>osgi:Bundle-SymbolicName</library>
</classpath>
into camel context, it's only applicable in JBI SU's xbean.xml.
Freeman
-
5. Re: jboss-fuse-6.0.0.redhat-024 issue with commons logging
kishor_pawar89 Sep 17, 2013 8:47 AM (in response to ffang)Hi,
We dont have xbean.xml in our project .
Could let us know about the other alternatives where we can place the above piece of code.
I have attached my JBI code. pls. have a look.
-
poc.zip 23.7 KB
-
-
6. Re: jboss-fuse-6.0.0.redhat-024 issue with commons logging
ffang Sep 17, 2013 8:36 AM (in response to kishor_pawar89)Hi,
Per the previous discussion, you are using JBI, right? How you define your SA/SU?
Freeman
-
7. Re: jboss-fuse-6.0.0.redhat-024 issue with commons logging
kishor_pawar89 Sep 17, 2013 10:22 AM (in response to ffang)
Can you please look at the code..just attched before your last immediate reply. -
8. Re: jboss-fuse-6.0.0.redhat-024 issue with commons logging
ffang Sep 18, 2013 4:27 AM (in response to kishor_pawar89)Hi,
Sorry somehow miss your poc.zip.
Well, from your testcase I can't see any reason you use JBI SA/SU to wrap your camel router, it's just camel router and you can simply put it into a bundle and so use maven-bundle-plugin to help you generate required OSGi metadata header.
JBI is kind of dead and we even don't suggest to use it now, so please simply put camel router as a normal bundle and forget the JBI classloader tricky in OSGi container as I don't see any reason you need JBI from your testcase.
HTH
Freeman
-
9. Re: jboss-fuse-6.0.0.redhat-024 issue with commons logging
kishor_pawar89 Sep 19, 2013 6:42 AM (in response to ffang)Hi,
we are confined to usage of JBI with Service mix as a part of project requirement and cannot eliminate its involvment.Any suggestions on this please.