-
1. Re: ESB 4.3.1 - CXF - org.apache.cxf.jaxws.spi.ProviderImpl not found
ffang Jun 8, 2011 2:28 AM (in response to eruiz_eruiz)Hi,
A quick question, does your project ever start successfully in any previous released FUSE ESB?
IMHO this is totally another different issue with the one discussed in
http://fusesource.com/forums/thread.jspa?threadID=1692
Freeman
-
2. Re: ESB 4.3.1 - CXF - org.apache.cxf.jaxws.spi.ProviderImpl not found
eruiz_eruiz Jun 8, 2011 3:04 AM (in response to ffang)Hi Freeman,
It should start, it is an example included with FUSE ESB 4.3.1. I only added the "EndpointActivator" class.
Below the stack trace:
-
java.lang.Exception: Could not start bundle mvn:org.apache.servicemix.examples/cxf-osgi/4.3.1-fuse-01-15 in feature(s) examples-cxf-osgi-4.3.1-fuse-01-15: Exception in org.apache.servicemix.osgi.EndpointActivator.start() of bundle cxf-osgi.
at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:326)
30:org.apache.karaf.features.core:2.1.4.fuse-00-15at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:254)
30:org.apache.karaf.features.core:2.1.4.fuse-00-15at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:250)
30:org.apache.karaf.features.core:2.1.4.fuse-00-15at org.apache.karaf.features.command.InstallFeatureCommand.doExecute(InstallFeatureCommand.java:51)
22:org.apache.karaf.features.command:2.1.4.fuse-00-15at org.apache.karaf.features.command.FeaturesCommandSupport.doExecute(FeaturesCommandSupport.java:39)
22:org.apache.karaf.features.command:2.1.4.fuse-00-15at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)
9:org.apache.karaf.shell.console:2.1.4.fuse-00-15at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
9:org.apache.karaf.shell.console:2.1.4.fuse-00-15at org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.java:50)
9:org.apache.karaf.shell.console:2.1.4.fuse-00-15at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:229)
9:org.apache.karaf.shell.console:2.1.4.fuse-00-15at org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.java:162)
9:org.apache.karaf.shell.console:2.1.4.fuse-00-15at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:101)
9:org.apache.karaf.shell.console:2.1.4.fuse-00-15at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:79)
9:org.apache.karaf.shell.console:2.1.4.fuse-00-15at org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSessionImpl.java:71)
9:org.apache.karaf.shell.console:2.1.4.fuse-00-15at org.apache.karaf.shell.console.jline.Console.run(Console.java:170)
9:org.apache.karaf.shell.console:2.1.4.fuse-00-15at java.lang.Thread.run(Thread.java:662)
:1.6.0_22Caused by: org.osgi.framework.BundleException: Exception in org.apache.servicemix.osgi.EndpointActivator.start() of bundle cxf-osgi.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
osgi-3.6.0.v20100517.jar:at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
osgi-3.6.0.v20100517.jar:at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
osgi-3.6.0.v20100517.jar:at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)
osgi-3.6.0.v20100517.jar:at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:276)
osgi-3.6.0.v20100517.jar:at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:323)
30:org.apache.karaf.features.core:2.1.4.fuse-00-15... 14 more
Caused by: javax.xml.ws.spi.FactoryFinder$ConfigurationError: Provider org.apache.cxf.jaxws.spi.ProviderImpl not found
at javax.xml.ws.spi.FactoryFinder$2.run(FactoryFinder.java:130)
at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:220)
:1.6.0_22at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:124)
:1.6.0_22at javax.xml.ws.spi.FactoryFinder.access$200(FactoryFinder.java:44)
:1.6.0_22at javax.xml.ws.spi.FactoryFinder$3.run(FactoryFinder.java:211)
at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:220)
:1.6.0_22at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:160)
:1.6.0_22at javax.xml.ws.spi.Provider.provider(Provider.java:43)
:1.6.0_22at javax.xml.ws.Endpoint.create(Endpoint.java:41)
:1.6.0_22at javax.xml.ws.Endpoint.create(Endpoint.java:37)
:1.6.0_22at org.apache.servicemix.osgi.EndpointActivator.start(EndpointActivator.java:16)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
osgi-3.6.0.v20100517.jar:at java.security.AccessController.doPrivileged(Native Method)
:1.6.0_22at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
osgi-3.6.0.v20100517.jar:... 19 more
-
Many thanks
-
3. Re: ESB 4.3.1 - CXF - org.apache.cxf.jaxws.spi.ProviderImpl not found
ffang Jun 8, 2011 3:39 AM (in response to eruiz_eruiz)Hi,
No, I don't think so.
IMHO you actually changed a lot of the original cxf-osgi example, in our example we use spring-dm to publish the endpoint and use http-osgi transport. In your revised project you use bundle activator to publish the endpoint with jaxws-api and use http transport directly.
Your revised example can bring up two major issues
1. the TCCL which start the bundle activator may not be the expected one.
2. Your code bring trouble for cxf bus wire the correct transport.
You can add this line
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
in your EndpointActivator start method to see if it can resolve the "Provider org.apache.cxf.jaxws.spi.ProviderImpl not found" issue.
May I ask why you want to use bundle activator to publish endpoint but not use our preferred configuration way?
Freeman
-
4. Re: ESB 4.3.1 - CXF - org.apache.cxf.jaxws.spi.ProviderImpl not found
eruiz_eruiz Jun 8, 2011 3:55 AM (in response to ffang)Hi,
I followed the instructions at http://fusesource.com/docs/esb/4.3.1/cxf_jaxws/index.html (chapter 8. Publishing a Service):
-
When you want to deploy a JAX-WS service as a standalone Java application or in an OSGi container without Spring-DM, you must to implement the code that publishes the service provider.
-
The quick way to implement that is to use the cxf-osgi example, remove the spring-dm XML file and implement the Activator as said here: http://fusesource.com/docs/esb/4.3.1/cxf_jaxws/JAXWSServicePublishOSGi.html
You hinted at a ClassLoader problem, could it be the bundle that contains org.apache.cxf.jaxws.spi.ProviderImpl wasn't loaded yet?
The reason to use the Activator is to be able to decide in which URL the WebService is attending, I would like to use http://localhost:9090 (an URL without path)
Many thanks
-
5. Re: ESB 4.3.1 - CXF - org.apache.cxf.jaxws.spi.ProviderImpl not found
ffang Jun 8, 2011 4:13 AM (in response to eruiz_eruiz)Hi,
Bundle that contains org.apache.cxf.jaxws.spi.ProviderImpl already loaded, the problem is that the TCCL(thread context classload) used in your activator start method isn't the expected one, so it can't use the the correct resolved pacakge.
If you want to use http://localhost:9090, you can also use spring configuration way.
You just need edit
src/main/resources/META-INF/spring/beans.xml
change address to
address="http://localhost:9090"
for jaxws:endpoint
and add
Freeman
-
6. Re: ESB 4.3.1 - CXF - org.apache.cxf.jaxws.spi.ProviderImpl not found
eruiz_eruiz Jun 8, 2011 5:24 AM (in response to ffang)Hi Freeman, Spring-DM worked in the way you suggested.
Just to try to understand why the Activator didn't work, can you point me any doc that can help me to understand it?
Thank you so much.
-
7. Re: ESB 4.3.1 - CXF - org.apache.cxf.jaxws.spi.ProviderImpl not found
eruiz_eruiz Jun 8, 2011 11:41 AM (in response to eruiz_eruiz)Peter explains the problem here: http://www.osgi.org/blog/2011/05/what-you-should-know-about-class.html
Regards
-
8. Re: ESB 4.3.1 - CXF - org.apache.cxf.jaxws.spi.ProviderImpl not found
eruiz_eruiz Jun 10, 2011 3:09 AM (in response to ffang)Hi Freeman,
As discussed yesterday, using the spring configuration way worked.
Now I have a curious issue:
Connect to http://localhost:9090 works
I cannot connect using my local LAN IP, i.e., http://192.168.1.192:9090
Any clue or suggestion?
Thanks
-
9. Re: ESB 4.3.1 - CXF - org.apache.cxf.jaxws.spi.ProviderImpl not found
ffang Jun 10, 2011 3:19 AM (in response to eruiz_eruiz)Hi,
You can use http://0.0.0.0:9090 to publish your endpoint, this will bind all available network interface on your machine.
Freeman
-
10. Re: ESB 4.3.1 - CXF - org.apache.cxf.jaxws.spi.ProviderImpl not found
eruiz_eruiz Jun 10, 2011 3:36 AM (in response to ffang)It worked
Thank you so much