tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Fryer <apfr...@hotmail.com>
Subject tomee-webprofile-1.7, cxf3 and jaxrs annotations
Date Thu, 04 Sep 2014 02:23:06 GMT
I'm have been trying out using cxf3 with apache-tomee-webprofile-1.7.0 and
testing to see if i can create some jaxrs services.  I've hit a problem when
i use a jax-rs annotation.

In my pom.xml i have this...

<dependency>
  <groupId>org.apache.cxf</groupId>
  <artifactId>cxf-integration-cdi</artifactId>
  <version>3.0.1</version>
</dependency>

I then create a jaxrs application class...

@ApplicationPath("/api")
public class BookStoreApplication extends Application {
}

and when I boot up the server i get errors...

SEVERE: CDI Beans module deployment failed
javax.enterprise.event.ObserverException: Caught Exception while handling
event object with type :
org.apache.webbeans.portable.events.discovery.AfterDeploymentValidationImpl
	at
org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:501)
	at
org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:446)
	at
org.apache.webbeans.container.BeanManagerImpl.fireLifecycleEvent(BeanManagerImpl.java:436)
	at
org.apache.webbeans.config.BeansDeployer.fireAfterDeploymentValidationEvent(BeansDeployer.java:374)
	at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:205)
	at
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:194)
	at
org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:160)
	at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:797)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:623)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1248)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1087)
	at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:130)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5378)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
	at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.webbeans.exception.WebBeansException:
java.lang.reflect.InvocationTargetException
	at
org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:272)
	at
org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:482)
	... 22 more
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at
org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:266)
	... 23 more
Caused by: java.lang.NoSuchMethodError:
javax.ws.rs.core.Application.getProperties()Ljava/util/Map;
	at
org.apache.cxf.jaxrs.utils.ResourceUtils.createApplication(ResourceUtils.java:799)
	at
org.apache.cxf.cdi.JAXRSCdiResourceExtension.createFactoryInstance(JAXRSCdiResourceExtension.java:127)
	at
org.apache.cxf.cdi.JAXRSCdiResourceExtension.load(JAXRSCdiResourceExtension.java:92)
	... 28 more

Could this be because cxf3 cdi integration requires cdi1.1 and tomee1.7 only
supports cdi1.0?



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/tomee-webprofile-1-7-cxf3-and-jaxrs-annotations-tp4671580.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Mime
View raw message