Hi everybody,
I have my bean's declaration like that:
Here we have JCF which is a TcpConnectionFactory, declared in joramAdmin of Jonas.Code:<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>
When I deloy it in Jonas ( via a WAR file with the ContextLoaderListener in web.xml ), I have this error. It means that Spring found well JCF in JNDI, but It couldn't convert a TcpConnectionFactory to ConnectionFactoryCode:<ConnectionFactory className="org.objectweb.joram.client.jms.tcp.TcpConnectionFactory"> <tcp host="localhost" port="16010"/> <jndi name="JCF"/> </ConnectionFactory>
Someone told me that it sounds the Classloader problem, but I have no idea how to do do resolve it.Code:10:45:27,133 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.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(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.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429) at org.ow2.jonas.web.tomcat6.JOnASStandardContext.start(JOnASStandardContext.java:281) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526) at org.ow2.jonas.web.tomcat6.Tomcat6Service.__doRegisterWar(Tomcat6Service.java:699) at org.ow2.jonas.web.tomcat6.Tomcat6Service.doRegisterWar(Tomcat6Service.java) at org.ow2.jonas.web.base.BaseWebContainerService.registerWar(BaseWebContainerService.java:918) at org.ow2.jonas.web.base.BaseWebContainerService.registerWar(BaseWebContainerService.java:1074) at org.ow2.jonas.web.tomcat6.Tomcat6Service.__registerWar(Tomcat6Service.java:1354)
Any guess for my problem?
Thanks



Reply With Quote