-
May 14th, 2007, 11:32 PM
#1
Type mismatch exception while configuring JMS with spring
Hi,
i am new to spring and i am getting following exception while attempting to use JMS.
i think there are clashes between com.ibm.mqjms and javax.jms.
i am creating a ConnectionFactoryBean of my own by extending it from org.springframework.jndi.JndiObjectFactoryBean and using it as below in my configuration.
<bean id="internalJmsQueueConnectionFactory" class="com.enterprise.egs.jms.ConnectionFactoryBea n" >
<property name="jndiTemplate" ref="jndiTemplate" />
<property name="jndiName" value="iidqmgr1" />
<property name="expectedType" value="com.ibm.mq.jms.MQQueueConnectionFactory" />
</bean>
here i am getting an exception :
org.springframework.beans.PropertyBatchUpdateExcep tion; nested PropertyAccessException details (1) are:
PropertyAccessException 1:
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.ibm.mq.jms.MQQueueConnectionFactory] to required type [javax.jms.ConnectionFactory] for property 'targetConnectionFactory'; nested exception is java.lang.IllegalArgumentException: No matching editors or conversion strategy found
Caused by:
java.lang.IllegalArgumentException: No matching editors or conversion strategy found
at org.springframework.beans.TypeConverterDelegate.co nvertIfNecessary(TypeConverterDelegate.java:212)
at org.springframework.beans.TypeConverterDelegate.co nvertIfNecessary(TypeConverterDelegate.java:127)
at org.springframework.beans.BeanWrapperImpl.setPrope rtyValue(BeanWrapperImpl.java:775)
at org.springframework.beans.BeanWrapperImpl.setPrope rtyValue(BeanWrapperImpl.java:608)
i thought the problem could be with the version of jars so i checked all the jars, however teh message makes me feel there is some problem in type conversion between MQQueueConnectionFactory and javax.jms.ConnectionFactory.
could anyone please help me out with this?
i am using websphere and put com.ibm.mqjms in my server classpath with spring2.0 jar
Last edited by joshia1; May 15th, 2007 at 12:56 AM.
-
May 16th, 2007, 11:15 AM
#2
Classloader issue ? Class loaded twice ?
Hello Josh,
Could your problem be related to a classloader issue ?
Could you have jms apis jars declared twice : in Websphere base classloader and with the com.ibm.mqjms.jar you put in WAS classpath ?
Which version of Websphere do you use ? Latest version (at least 6.1) bundle an application classloader viewer that is very usefull to diagnose such kind of jar issues. The viewer is available in the Administrative console that.
My reasoning is that the "No matching editors or conversion strategy found" is related to a "Class#isAssignableFrom(cls)" operation that returns false. This could occur with the javax.jms.ConnectionFactory class being loaded twice.
Cyrille
-
Apr 5th, 2011, 02:30 PM
#3
jms.jar duplication causes- No matching editors or conversion strategy found.." error
I agree with the reasoning that "No matching editors or conversion strategy found" error could occur with the javax.jms.ConnectionFactory class being loaded twice. This could happen if the "jms.jar" file is included within your application artifact (.war, .ear files) and is also available under the server's common 'lib' directory.
cheers.
Raj
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules