After clean some jars which are not necessary, the problem still exists, with the same error message !
Any another guess for my case? Thanks ========================================================================= NGUYEN Tien Luong | M2PGI - UFRIMAG 13 Rue Blanche MONIER | Tel : 06.45.42.46.33 38000 GRENOBLE | http://tienluong.info ----- Original Message ---- From: Daniel Kulp <[email protected]> To: [email protected] Cc: Nguyen Tien Luong <[email protected]> Sent: Tue, 25 May, 2010 22:09:25 Subject: Re: Problem with JMSConfigFeature on Jonas ! This SOUNDS like a classloader issue where the CXF classloader is picking up a different JMS api jar than the classloader that is loading the TcpConnectionFactory. The place to start looking would be the classpath and lib dirs for anythings related to JMS and make sure it's not in places where it's not needed. Dan On Tuesday 25 May 2010 12:23:50 pm Nguyen Tien Luong wrote: > Hi evetybody, > > In order to publish a WebService on Jonas, I use JMSConfigFeature with all > its advantages of using Spring bean config. > > Here is my config. Here JCF is an ConnectionFactory > ( org.objectweb.joram.client.jms.tcp.TcpConnectionFactory ), created when > Jonas is started, the same with the two queues request and reply > > ______________________________________________ > <bean id="jmsConnectionFactory" > class="org.springframework.jms.connection.SingleConnectionFactory"> > <property name="targetConnectionFactory"> > <bean id="connectionFactory" > class="org.springframework.jndi.JndiObjectFactoryBean"> <property > name="jndiName" value="JCF"/> > </bean> > </property> > </bean> > > <bean id="request_bean" > class="org.springframework.jndi.JndiObjectFactoryBean"> <property > name="jndiName" value="request"/> > </bean> > > <bean id="reply_bean" > class="org.springframework.jndi.JndiObjectFactoryBean"> <property > name="jndiName" value="reply"/> > </bean> > <bean id="jmsConfig" > class="org.apache.cxf.transport.jms.JMSConfiguration" > p:connectionFactory-ref="jmsConnectionFactory" > p:targetDestination-ref="request_bean" > p:replyDestination-ref="reply_bean"> > </bean> > > <jaxws:endpoint id="endpoint-JMSgreeter" > implementor="demo.jms_greeter.server.GreeterJMSImpl" > wsdlLocation="/wsdl/jms_greeter.wsdl" > address="/JMSgreeter"> > <jaxws:features> > <bean > class="org.apache.cxf.transport.jms.JMSConfigFeature" p:jmsConfig-ref="jms > Config" /> </jaxws:features> > </jaxws:endpoint> > ______________________________________________ > > > But when I deploy on Jonas, I have this error: > > ______________________________________________ > 18:04:04,400 ERROR ContextLoader(215) - Context initialization failed > org.springframework.beans.factory.BeanCreationException: Error creating > bean with name 'jmsConnectionFactory' defined in ServletContext resource > [/WEB -INF/applicationContextTest.xml]: Initialization of bean failed; > nested exception is org.springframework.beans.TypeMismatchException: > Failed to conver t property value of type > [org.objectweb.joram.client.jms.tcp.TcpConnectionFactory] to required type > [javax.jms.ConnectionFactory] for property 'target ConnectionFactory'; > nested exception is java.lang.IllegalArgumentException: Cannot convert > value of type [org.objectweb.joram.client.jms.tcp.TcpConnec tionFactory] > to required type [javax.jms.ConnectionFactory] for property > 'targetConnectionFactory': no matching editors or conversion strategy > found at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto > ry.doCreateBean(AbstractAutowireCapableBeanFactory.java:480) at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto > ry$1.run(AbstractAutowireCapableBeanFactory.java:409) at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto > ry.createBean(AbstractAutowireCapableBeanFactory.java:380) at > org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject( > AbstractBeanFactory.java:264) at > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.get > Singleton(DefaultSingletonBeanRegistry.java:222) at > org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Ab > stractBeanFactory.java:261) at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abst > ractBeanFactory.java:185) at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abst > ractBeanFactory.java:164) at > org.springframework.beans.factory.support.DefaultListableBeanFactory.preIn > stantiateSingletons(DefaultListableBeanFactory.java:429) at > org.springframework.context.support.AbstractApplicationContext.finishBeanF > actoryInitialization(AbstractApplicationContext.java:728) at > org.springframework.context.support.AbstractApplicationContext.refresh(Abs > tractApplicationContext.java:380) at > org.springframework.web.context.ContextLoader.createWebApplicationContext( > ContextLoader.java:255) at > org.springframework.web.context.ContextLoader.initWebApplicationContext(Co > ntextLoader.java:199) at > org.springframework.web.context.ContextLoaderListener.contextInitialized(C > ontextLoaderListener.java:45) at > org.apache.catalina.core.StandardContext.listenerStart(StandardContext.jav > a:3934) ______________________________________________ > > It means that I couldn't use TcpConnectionFactory to replace a > ConnectionFactory !!! > > When I see the API of TcpConnectionFactory, it implements well the > javax.jms.ConnectionFactory interface. > (http://joram.ow2.org/current/javadoc/org/objectweb/joram/client/jms/tcp/T > cpConnectionFactory.html) > > Any suggestions in my case? > > Thanks > > ========================================================================= > NGUYEN Tien Luong | M2PGI - UFRIMAG > 13 Rue Blanche MONIER | Tel : > 06.45.42.46.33 38000 GRENOBLE | > http://tienluong.info -- Daniel Kulp [email protected] http://dankulp.com/blog
