Freeman Fang <freeman.fang@...> writes:

> 
> Hi,
> 
> What's the OSGi container you're using?
> How your customer bundle OSGi metadata header looks like?
> -------------
> 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-1-7, at 上午12:37, Malisetti, Ramanjaneyulu wrote:
> 
> > Hi,
> >        In OSGi env we are getting the following exception. How can we make 
WSS4JInInterceptor find our callback
> handler? We are using CXF 2.7.1.
> > 
> > 2013-01-06 11:21:21,238 ERROR  [Thread] client.WSModuleProxy -118-
com.ca.ucf.core.bind-3.3.0.50
> - com.ca.ucf.security.impl.PasswordCallbackHandler.
> > javax.xml.ws.soap.SOAPFaultException: 
com.ca.ucf.security.impl.PasswordCallbackHandler
> >        at 
org.apache.cxf.jaxws.DispatchImpl.mapException(DispatchImpl.java:287)
[101:org.apache.cxf.bundle:2.7.1]
> >        at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:392)
[101:org.apache.cxf.bundle:2.7.1]
> >        at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:243)
[101:org.apache.cxf.bundle:2.7.1]
> >        at com.ca.ucf.remote.ws.SOAPHelper.proxyInvoke(SOAPHelper.java:257)
[118:com.ca.ucf.core.bind:3.3.0.50]
> > Caused by: org.apache.cxf.binding.soap.SoapFault: 
com.ca.ucf.security.impl.PasswordCallbackHandler
> >        at 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.createSoapFault(WSS4JInInter
ceptor.java:793)[101:org.apache.cxf.bundle:2.7.1]
> >        at 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterce
ptor.java:329)[101:org.apache.cxf.bundle:2.7.1]
> >        at 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterce
ptor.java:95)[101:org.apache.cxf.bundle:2.7.1]
> >        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.jav
a:271)[101:org.apache.cxf.bundle:2.7.1]
> >        at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:800)
[101:org.apache.cxf.bundle:2.7.1]
> >        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInte
rnal(HTTPConduit.java:1590)[101:org.apache.cxf.bundle:2.7.1]
> >        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTT
PConduit.java:1488)[101:org.apache.cxf.bundle:2.7.1]
> >        at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.
java:1307)[101:org.apache.cxf.bundle:2.7.1]
> >        at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
[101:org.apache.cxf.bundle:2.7.1]
> >        at 
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:622)
[101:org.apache.cxf.bundle:2.7.1]
> >        at 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingIntercept
or.handleMessage(MessageSenderInterceptor.java:62)
[101:org.apache.cxf.bundle:2.7.1]
> >        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.jav
a:271)[101:org.apache.cxf.bundle:2.7.1]
> >        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
[101:org.apache.cxf.bundle:2.7.1]
> >        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
[101:org.apache.cxf.bundle:2.7.1]
> >        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
[101:org.apache.cxf.bundle:2.7.1]
> >        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
[101:org.apache.cxf.bundle:2.7.1]
> >        at 
org.apache.cxf.endpoint.ClientImpl.invokeWrapped(ClientImpl.java:354)
[101:org.apache.cxf.bundle:2.7.1]
> >        at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:385)
[101:org.apache.cxf.bundle:2.7.1]
> >        ... 5 more
> > Caused by: org.apache.ws.security.WSSecurityException: 
com.ca.ucf.security.impl.PasswordCallbackHandler
> >        at 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.getCallback(WSS4JInIntercept
or.java:638)[101:org.apache.cxf.bundle:2.7.1]
> >        at 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.getCallback(WSS4JInIntercept
or.java:621)[101:org.apache.cxf.bundle:2.7.1]
> >        at 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterce
ptor.java:238)[101:org.apache.cxf.bundle:2.7.1]
> >        ... 21 more
> > Caused by: java.lang.ClassNotFoundException: 
com.ca.ucf.security.impl.PasswordCallbackHandler
> >        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.jav
a:501)
> >        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
> >        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
> >        at 
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassL
oader.java:107)
> >        at java.lang.ClassLoader.loadClass(Unknown Source)[:1.7.0_12-ea]
> >        at 
org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass2(ClassLoaderUtils.j
ava:287)
> >        at 
org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass(ClassLoaderUtils.ja
va:261)
> >        at 
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.getCallback(WSS4JInIntercept
or.java:636)[101:org.apache.cxf.bundle:2.7.1]
> >        ... 23 more
> > 
> 
> 

Hi Freeman,

I also faced same problem, i am using karaf OSGI container + cxf 2.7.1.

here is the MANIFEST.MF export package section, below package has the Custom 
PasswordCallbackHandler class.

customer bundle OSGi metadata header

Export-Package:  com.test.security.impl

Thanks,
-Nagamohan




Reply via email to