Return-Path: X-Original-To: apmail-cxf-users-archive@www.apache.org Delivered-To: apmail-cxf-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 999B810C6F for ; Mon, 10 Jun 2013 15:12:55 +0000 (UTC) Received: (qmail 62727 invoked by uid 500); 10 Jun 2013 15:12:54 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 62679 invoked by uid 500); 10 Jun 2013 15:12:54 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 62671 invoked by uid 99); 10 Jun 2013 15:12:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jun 2013 15:12:54 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: error (athena.apache.org: encountered temporary error during SPF processing of domain of allamcxfUser2013@gmail.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jun 2013 15:12:48 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Um3lQ-0005PZ-1P for users@cxf.apache.org; Mon, 10 Jun 2013 08:12:08 -0700 Date: Mon, 10 Jun 2013 08:12:08 -0700 (PDT) From: allam To: users@cxf.apache.org Message-ID: In-Reply-To: <51B5EACC.809@gmail.com> References: <1370876189018-5729061.post@n5.nabble.com> <51B5EACC.809@gmail.com> Subject: Re: RESTful example: Switch from cxf 5.x to cxf 7.x MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Thanks for your reply. I'm using Eclipse J2EE, not Maven to deploy my example. What is the corresponding modification for javax.ws.rs-api-m10 dependency, please? Diana On Mon, Jun 10, 2013 at 5:04 PM, Sergey Beryozkin [via CXF] < ml-node+s547215n5729063h34@n5.nabble.com> wrote: > Hi, one needs to switch to javax.ws.rs-api-m10 dependency, when > migrating RS endpoints to CXF 2.7.x > > Sergey > On 10/06/13 15:56, allam wrote: > > > Hello, > > > > I used before cxf 2.5.10 and 2.4 and I would like to switch now on the > > latest version, cxf 2.7.5. > > However, I had a restful example which turn successfully in the old > version > > but not in the new one. > > My example is configured using spring library and Java SE 6.0. > > Here is the configuration of my beans.xml file: > > > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xmlns:jaxrs="http://cxf.apache.org/jaxrs" > > xsi:schemaLocation=" > > http://www.springframework.org/schema/beans > > http://www.springframework.org/schema/beans/spring-beans.xsd > > http://cxf.apache.org/jaxrs > > http://cxf.apache.org/schemas/jaxrs.xsd"> > > > > > > > > > > > > > > > > > > > > > > > > I tried to modify it into: > > > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xmlns:jaxrs="http://cxf.apache.org/jaxrs" > > xmlns:jaxws="http://cxf.apache.org/jaxws" > > xmlns:cxf="http://cxf.apache.org/core" > > xsi:schemaLocation=" > > http://www.springframework.org/schema/beans > > http://www.springframework.org/schema/beans/spring-beans.xsd > > http://cxf.apache.org/jaxrs > > http://cxf.apache.org/schemas/jaxrs.xsd > > http://cxf.apache.org/jaxws > > http://cxf.apache.org/schemas/jaxws.xsd > > http://cxf.apache.org/core > > http://cxf.apache.org/schemas/core.xsd"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > but I get always the same exception: > > > > SEVERE: Context initialization failed > > org.springframework.beans.factory.BeanCreationException: Error creating > bean > > with name 'org.apache.cxf.bus.spring.BusApplicationListener' defined in > > class path resource [META-INF/cxf/cxf.xml]: Initialization of bean > failed; > > nested exception is > org.springframework.beans.factory.BeanCreationException: > > Error creating bean with name 'cxf' defined in class path resource > > [META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested exception > is > > org.springframework.beans.BeanInstantiationException: Could not > instantiate > > bean class [org.apache.cxf.bus.CXFBusImpl]: Constructor threw exception; > > nested exception is java.lang.ExceptionInInitializerError > > Caused by: org.springframework.beans.factory.BeanCreationException: > Error > > creating bean with name 'cxf' defined in class path resource > > [META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested exception > is > > org.springframework.beans.BeanInstantiationException: Could not > instantiate > > bean class [org.apache.cxf.bus.CXFBusImpl]: Constructor threw exception; > > nested exception is java.lang.ExceptionInInitializerError > > Caused by: org.springframework.beans.BeanInstantiationException: Could > not > > instantiate bean class [org.apache.cxf.bus.CXFBusImpl]: Constructor > threw > > exception; nested exception is java.lang.ExceptionInInitializerError > > Caused by: java.lang.ExceptionInInitializerError > > at org.apache.cxf.bus.CXFBusImpl.(CXFBusImpl.java:54) > > at org.apache.cxf.bus.CXFBusImpl.(CXFBusImpl.java:41) > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > > at > > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > > > at > > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > > > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > at > org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85) > > at > > > org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61) > > > at > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:757) > > > at > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:722) > > > at > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386) > > > at > > > org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249) > > > at > > > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155) > > > at > > > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246) > > > at > > > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) > > > at > > > org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:757) > > > at > > > org.apache.cxf.bus.spring.BusExtensionPostProcessor.getBus(BusExtensionPostProcessor.java:62) > > > at > > > org.apache.cxf.bus.spring.BusExtensionPostProcessor.postProcessBeforeInitialization(BusExtensionPostProcessor.java:53) > > > at > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:302) > > > at > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1168) > > > at > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427) > > > at > > > org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249) > > > at > > > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155) > > > at > > > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246) > > > at > > > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) > > > at > > > org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:248) > > > at > > > org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:820) > > > at > > > org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:597) > > > at > > > org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349) > > > at > > > org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246) > > > at > > > org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189) > > > at > > > org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) > > > at > > > org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723) > > > at > > > org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226) > > at > > > org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221) > > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > > at > > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > > > at > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > > > at java.lang.Thread.run(Thread.java:680) > > Caused by: java.lang.IllegalArgumentException: org.apache.cxf.Messages > != > > org.apache.cxf.APIMessages > > at java.util.logging.Logger.getLogger(Logger.java:337) > > at > org.apache.cxf.common.logging.LogUtils.createLogger(LogUtils.java:210) > > at > org.apache.cxf.common.logging.LogUtils.getL7dLogger(LogUtils.java:152) > > at org.apache.cxf.BusFactory.(BusFactory.java:39) > > ... 40 more > > Jun 10, 2013 4:11:10 PM org.apache.catalina.core.StandardContext > > listenerStart > > SEVERE: Exception sending context initialized event to listener instance > of > > class org.springframework.web.context.ContextLoaderListener > > org.springframework.beans.factory.BeanCreationException: Error creating > bean > > with name 'org.apache.cxf.bus.spring.BusApplicationListener' defined in > > class path resource [META-INF/cxf/cxf.xml]: Initialization of bean > failed; > > nested exception is > org.springframework.beans.factory.BeanCreationException: > > Error creating bean with name 'cxf' defined in class path resource > > [META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested exception > is > > org.springframework.beans.BeanInstantiationException: Could not > instantiate > > bean class [org.apache.cxf.bus.CXFBusImpl]: Constructor threw exception; > > nested exception is java.lang.ExceptionInInitializerError > > Caused by: org.springframework.beans.factory.BeanCreationException: > Error > > creating bean with name 'cxf' defined in class path resource > > [META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested exception > is > > org.springframework.beans.BeanInstantiationException: Could not > instantiate > > bean class [org.apache.cxf.bus.CXFBusImpl]: Constructor threw exception; > > nested exception is java.lang.ExceptionInInitializerError > > Caused by: org.springframework.beans.BeanInstantiationException: Could > not > > instantiate bean class [org.apache.cxf.bus.CXFBusImpl]: Constructor > threw > > exception; nested exception is java.lang.ExceptionInInitializerError > > Caused by: java.lang.ExceptionInInitializerError > > at org.apache.cxf.bus.CXFBusImpl.(CXFBusImpl.java:54) > > at org.apache.cxf.bus.CXFBusImpl.(CXFBusImpl.java:41) > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > > at > > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > > > at > > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > > > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > at > org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85) > > at > > > org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61) > > > at > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:757) > > > at > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:722) > > > at > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386) > > > at > > > org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249) > > > at > > > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155) > > > at > > > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246) > > > at > > > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) > > > at > > > org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:757) > > > at > > > org.apache.cxf.bus.spring.BusExtensionPostProcessor.getBus(BusExtensionPostProcessor.java:62) > > > at > > > org.apache.cxf.bus.spring.BusExtensionPostProcessor.postProcessBeforeInitialization(BusExtensionPostProcessor.java:53) > > > at > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:302) > > > at > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1168) > > > at > > > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427) > > > at > > > org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249) > > > at > > > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155) > > > at > > > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246) > > > at > > > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) > > > at > > > org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:248) > > > at > > > org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:820) > > > at > > > org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:597) > > > at > > > org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349) > > > at > > > org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246) > > > at > > > org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189) > > > at > > > org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) > > > at > > > org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723) > > > at > > > org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226) > > at > > > org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221) > > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > > at > > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > > > at > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > > > at java.lang.Thread.run(Thread.java:680) > > Caused by: java.lang.IllegalArgumentException: org.apache.cxf.Messages > != > > org.apache.cxf.APIMessages > > at java.util.logging.Logger.getLogger(Logger.java:337) > > at > org.apache.cxf.common.logging.LogUtils.createLogger(LogUtils.java:210) > > at > org.apache.cxf.common.logging.LogUtils.getL7dLogger(LogUtils.java:152) > > at org.apache.cxf.BusFactory.(BusFactory.java:39) > > ... 40 more > > > > > > I didn't found any information about the cause of this error. > > Could I have your help please to resolve it? > > > > Kind Regards, > > > > Diana ALLAM > > > > > > > > > > > > -- > > View this message in context: > http://cxf.547215.n5.nabble.com/RESTful-example-Switch-from-cxf-5-x-to-cxf-7-x-tp5729061.html > > Sent from the cxf-user mailing list archive at Nabble.com. > > > > > -- > Sergey Beryozkin > > Talend Community Coders > http://coders.talend.com/ > > Blog: http://sberyozkin.blogspot.com > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://cxf.547215.n5.nabble.com/RESTful-example-Switch-from-cxf-5-x-to-cxf-7-x-tp5729061p5729063.html > To unsubscribe from RESTful example: Switch from cxf 5.x to cxf 7.x, click > here > . > NAML > -- View this message in context: http://cxf.547215.n5.nabble.com/RESTful-example-Switch-from-cxf-5-x-to-cxf-7-x-tp5729061p5729067.html Sent from the cxf-user mailing list archive at Nabble.com.