[
https://issues.apache.org/jira/browse/CXF-4489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13444016#comment-13444016
]
Freeman Fang commented on CXF-4489:
-----------------------------------
Hi Dan,
Hmm, not sure it's an jaxws-api spec jar issue, as CXF use servicemix spec
1.9.0 for a while.
The code which cause the exception is
{code}
public W3CEndpointReference createWSA(String address) {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try {
if (setClassLoader) {
Thread.currentThread().setContextClassLoader(WSNHelper.class.getClassLoader());
}
return new
W3CEndpointReferenceBuilder().address(address).build();//this line cause the
exception
} finally {
Thread.currentThread().setContextClassLoader(cl);
}
}
{code}
seems set class loader as WSNHelper.class.getClassLoader() cause that the
wsn-api bundle need explicitly import the org.apache.cxf.jaxws.spi package.
Freeman
> cxf-wsn-api bundle can't find org.apache.cxf.jaxws.spi.ProviderImpl in OSGi
> container
> -------------------------------------------------------------------------------------
>
> Key: CXF-4489
> URL: https://issues.apache.org/jira/browse/CXF-4489
> Project: CXF
> Issue Type: Bug
> Components: OSGi
> Affects Versions: 2.5.5, 2.6.2
> Reporter: Freeman Fang
> Assignee: Freeman Fang
> Fix For: 2.5.6, 2.6.3, 2.7.0
>
>
> we can see exception like
> 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:229)
> at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:124)
> at javax.xml.ws.spi.FactoryFinder.access$200(FactoryFinder.java:44)
> at javax.xml.ws.spi.FactoryFinder$3.run(FactoryFinder.java:209)
> at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:229)
> at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:160)
> at javax.xml.ws.spi.Provider.provider(Provider.java:43)
> at
> javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder.build(W3CEndpointReferenceBuilder.java:142)
> at org.apache.cxf.wsn.util.WSNHelper.createWSA(WSNHelper.java:65)
> at
> org.apache.cxf.wsn.client.NotificationBroker.<init>(NotificationBroker.java:71)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira