0 Replies Latest reply on Jun 1, 2010 5:03 PM by sdf sdf

    cxf-bc ws-security callback classnotfoundexception

    sdf sdf Newbie

      I'm trying to implement authentication with SSL as a ws-security policy on a service inside of SMX4. So far I've been able to implement SSL and the transport policy, but I've not been able to get the authentication part to work.  I've tried to attack this at many different angles but I'm just missing something.  I was wondering if you guys can help me. I don't know how it cannot find my callback class since I've exported package in the cxf.bundle config in the pom. 

       

      Error response:

       

       

      Servicemix log:

      15:55:16,812 | WARN  | 7@qtp-31267377-2 | WSS4JInInterceptor               | ecurity.wss4j.WSS4JInInterceptor  255 |

      org.apache.ws.security.WSSecurityException: com.mycompany.useraccount.ServerPasswordCallback; nested exception is:

           java.lang.ClassNotFoundException: com.mycompany.useraccount.ServerPasswordCallback

           at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.getCallback(WSS4JInInterceptor.java:477)

           at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:195)

           at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:78)

           at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)

           at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:109)

           at org.apache.servicemix.cxfbc.CxfBcConsumer$JbiChainInitiationObserver.onMessage(CxfBcConsumer.java:678)

           at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:312)

           at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:276)

           at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)

           at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)

           at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)

           at org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49)

           at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

           at org.mortbay.jetty.Server.handle(Server.java:326)

           at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)

           at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)

           at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)

           at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)

           at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)

           at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)

           at org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:680)

           at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

      Caused by: java.lang.ClassNotFoundException: com.mycompany.useraccount.ServerPasswordCallback

           at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494)

           at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)

           at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)

           at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)

           at java.lang.ClassLoader.loadClass(ClassLoader.java:252)

           at org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass2(ClassLoaderUtils.java:236)

           at org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:222)

           at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.getCallback(WSS4JInInterceptor.java:475)

           ... 21 more

      15:55:16,812 | WARN  | 7@qtp-31267377-2 | PhaseInterceptorChain            | ache.cxf.common.logging.LogUtils  361 | Interceptor for UserAccountService has thrown exception, unwinding now

      org.apache.cxf.binding.soap.SoapFault: com.mycompany.useraccount.ServerPasswordCallback; nested exception is:

           java.lang.ClassNotFoundException: com.mycompany.useraccount.ServerPasswordCallback

           at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.createSoapFault(WSS4JInInterceptor.java:583)

           at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:256)

           at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:78)

           at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)

           at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:109)

           at org.apache.servicemix.cxfbc.CxfBcConsumer$JbiChainInitiationObserver.onMessage(CxfBcConsumer.java:678)

           at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:312)

           at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:276)

           at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)

           at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)

           at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)

           at org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49)

           at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

           at org.mortbay.jetty.Server.handle(Server.java:326)

           at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)

           at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)

           at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)

           at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)

           at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)

           at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)

           at org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:680)

           at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

      Caused by: org.apache.ws.security.WSSecurityException: com.mycompany.useraccount.ServerPasswordCallback; nested exception is:

           java.lang.ClassNotFoundException: com.mycompany.useraccount.ServerPasswordCallback

           at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.getCallback(WSS4JInInterceptor.java:477)

           at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:195)

           ... 20 more

      Caused by: java.lang.ClassNotFoundException: com.mycompany.useraccount.ServerPasswordCallback

           at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494)

           at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)

           at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)

           at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)

           at java.lang.ClassLoader.loadClass(ClassLoader.java:252)

           at org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass2(ClassLoaderUtils.java:236)

           at org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:222)

           at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.getCallback(WSS4JInInterceptor.java:475)

           ... 21 more

       

      xbeans.xml: