cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-2028) ClassNotFoundException when exposing service.
Date Thu, 16 Apr 2009 14:18:15 GMT

    [ https://issues.apache.org/jira/browse/CXF-2028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699715#action_12699715
] 

Daniel Kulp commented on CXF-2028:
----------------------------------


Two paths to fix this:

1) Make sure wss4j bundle is available for you.

2)  Update to the CXF 2.2.1-SNAPSHOT version which will detect if wss4j is not there and just
not enable the security policies.


> ClassNotFoundException when exposing service.
> ---------------------------------------------
>
>                 Key: CXF-2028
>                 URL: https://issues.apache.org/jira/browse/CXF-2028
>             Project: CXF
>          Issue Type: Bug
>          Components: Distributed-OSGi
>            Reporter: David Bosschaert
>
> When I expose a simple service I get an exception that boils down to the following: ClassNotFoundException:
org.apache.ws.security.handler.WSHandler.
> The Service is not configured to use anything of security and does seem to work.
> The full stack trace:
> WARNING: method annotated by @PostConstruct throws exception when invoked
> java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at org.apache.cxf.common.injection.ResourceInjector.invokePostConstruct(
> ResourceInjector.java:302)
>         at org.apache.cxf.common.injection.ResourceInjector.construct(ResourceIn
> jector.java:86)
>         at org.apache.cxf.bus.spring.Jsr250BeanPostProcessor.postProcessAfterIni
> tialization(Jsr250BeanPostProcessor.java:71)
>         at org.springframework.beans.factory.support.AbstractAutowireCapableBean
> Factory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFa
> ctory.java:361)
>         at org.springframework.beans.factory.support.AbstractAutowireCapableBean
> Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1343)
>         at org.springframework.beans.factory.support.AbstractAutowireCapableBean
> Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
>         at org.springframework.beans.factory.support.AbstractAutowireCapableBean
> Factory$1.run(AbstractAutowireCapableBeanFactory.java:409)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at org.springframework.beans.factory.support.AbstractAutowireCapableBean
> Factory.createBean(AbstractAutowireCapableBeanFactory.java:380)
>         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
> ject(AbstractBeanFactory.java:264)
>         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
> y.getSingleton(DefaultSingletonBeanRegistry.java:221)
>         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
> an(AbstractBeanFactory.java:261)
>         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
> (AbstractBeanFactory.java:185)
>         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
> (AbstractBeanFactory.java:164)
>         at org.springframework.beans.factory.support.DefaultListableBeanFactory.
> preInstantiateSingletons(DefaultListableBeanFactory.java:429)
>         at org.springframework.context.support.AbstractApplicationContext.finish
> BeanFactoryInitialization(AbstractApplicationContext.java:729)
>         at org.springframework.context.support.AbstractApplicationContext.refres
> h(AbstractApplicationContext.java:381)
>         at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplication
> Context.java:88)
>         at org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(S
> pringBusFactory.java:102)
>         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory
> .java:93)
>         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory
> .java:86)
>         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory
> .java:64)
>         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory
> .java:53)
>         at org.apache.cxf.transport.servlet.CXFNonSpringServlet.loadBusNoConfig(
> CXFNonSpringServlet.java:46)
>         at org.apache.cxf.transport.servlet.CXFNonSpringServlet.loadBus(CXFNonSp
> ringServlet.java:38)
>         at org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFS
> ervlet.java:79)
>         at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.jav
> a:433)
>         at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:25
> 6)
>         at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> 39)
>         at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.ja
> va:616)
>         at org.mortbay.jetty.servlet.ServletHandler.updateMappings(ServletHandle
> r.java:984)
>         at org.mortbay.jetty.servlet.ServletHandler.setServletMappings(ServletHa
> ndler.java:1041)
>         at org.mortbay.jetty.servlet.ServletHandler.addServletMapping(ServletHan
> dler.java:740)
>         at org.ops4j.pax.web.service.internal.JettyServerImpl$1.call(JettyServer
> Impl.java:129)
>         at org.ops4j.pax.web.service.internal.JettyServerImpl$1.call(JettyServer
> Impl.java:126)
>         at org.ops4j.pax.swissbox.core.ContextClassLoaderUtils.doWithClassLoader
> (ContextClassLoaderUtils.java:60)
>         at org.ops4j.pax.web.service.internal.JettyServerImpl.addServlet(JettySe
> rverImpl.java:121)
>         at org.ops4j.pax.web.service.internal.ServerControllerImpl$Started.addSe
> rvlet(ServerControllerImpl.java:214)
>         at org.ops4j.pax.web.service.internal.ServerControllerImpl.addServlet(Se
> rverControllerImpl.java:90)
>         at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet
> (HttpServiceStarted.java:144)
>         at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(H
> ttpServiceProxy.java:53)
>         at org.apache.cxf.dosgi.dsw.handlers.HttpServiceConfigurationTypeHandler
> .createServer(HttpServiceConfigurationTypeHandler.java:92)
>         at org.apache.cxf.dosgi.dsw.hooks.ServiceHookUtils.createServer(ServiceH
> ookUtils.java:89)
>         at org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook.createServer(CxfPublish
> Hook.java:106)
>         at org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook.publishEndpoint(CxfPubl
> ishHook.java:80)
>         at org.apache.cxf.dosgi.dsw.Activator$1.run(Activator.java:143)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
> )
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>         at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.NoClassDefFoundError: org/apache/ws/security/handler/WSHand
> ler
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(Unknown Source)
>         at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(
> DefaultClassLoader.java:165)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(Clas
> spathManager.java:570)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(Cl
> asspathManager.java:540)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassIm
> pl(ClasspathManager.java:471)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_L
> ockClassLoader(ClasspathManager.java:459)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(C
> lasspathManager.java:439)
>         at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalCla
> ss(DefaultClassLoader.java:193)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLo
> ader.java:372)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(Bundl
> eLoader.java:448)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.
> java:401)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.
> java:389)
>         at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(De
> faultClassLoader.java:87)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(Unknown Source)
>         at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(
> DefaultClassLoader.java:165)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(Clas
> spathManager.java:570)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(Cl
> asspathManager.java:540)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassIm
> pl(ClasspathManager.java:471)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_L
> ockClassLoader(ClasspathManager.java:459)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(C
> lasspathManager.java:439)
>         at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalCla
> ss(DefaultClassLoader.java:193)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLo
> ader.java:372)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(Bundl
> eLoader.java:448)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.
> java:401)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.
> java:389)
>         at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(De
> faultClassLoader.java:87)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>         at org.apache.cxf.ws.security.policy.interceptors.WSSecurityInterceptorP
> rovider.<init>(WSSecurityInterceptorProvider.java:55)
>         at org.apache.cxf.ws.security.policy.WSSecurityPolicyLoader.registerProv
> iders(WSSecurityPolicyLoader.java:121)
>         at org.apache.cxf.ws.security.policy.WSSecurityPolicyLoader.register(WSS
> ecurityPolicyLoader.java:75)
>         ... 53 more
> Caused by: java.lang.ClassNotFoundException: org.apache.ws.security.handler.WSHa
> ndler
>         at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(Bundl
> eLoader.java:485)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.
> java:401)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.
> java:389)
>         at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(De
> faultClassLoader.java:87)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>         ... 88 more
> 09-Feb-2009 15:20:46 org.apache.cxf.transport.servlet.AbstractCXFServlet replace

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message