Announcement Announcement Module
Collapse
No announcement yet.
Spring JMS & Weblogic 9.2 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring JMS & Weblogic 9.2

    I'm having some problems with Spring JMS on Weblogic 9.2. The stack trace I'm getting looks like this,

    Code:
    <15-Aug-2007 11:49:04 o'clock BST> <Warning> <Deployer> <BEA-149078> <Stack trac
    e for message 149004
    weblogic.application.ModuleException:
            at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.jav
    a:894)
            at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:336)
            at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleSta
    teDriver.java:204)
            at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
    river.java:26)
            at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStat
    eDriver.java:60)
            Truncated. see log file for complete stacktrace
    org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExc
    eptions (1) are:
    PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Fail
    ed to convert property value of type [javax.naming.Reference] to required type [
    javax.jms.ConnectionFactory] for property 'targetConnectionFactory'; nested exce
    ption is java.lang.IllegalArgumentException: Cannot convert value of type [javax
    .naming.Reference] to required type [javax.jms.ConnectionFactory] for property '
    targetConnectionFactory': no matching editors or conversion strategy found
            at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(
    AbstractPropertyAccessor.java:97)
            at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(
    AbstractPropertyAccessor.java:57)
            at org.springframework.beans.factory.support.AbstractBeanFactory.applyPr
    opertyValues(AbstractBeanFactory.java:840)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1026)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.populateBean(AbstractAutowireCapableBeanFactory.java:809)
            Truncated. see log file for complete stacktrace
    >
    Having had a read around on the forum, it seems that the

    java.lang.IllegalArgumentException: Cannot convert value of type [javax
    .naming.Reference] to required type [javax.jms.ConnectionFactory] for property


    Is often found if there are multiple jms.jar on the app server classpath, or if it's been included within the war/ear itself. From what I can see, the only javax.jms libraries available to the application are from within weblogic.jar, yet, I still seem to have the problem.

    Wondering whether anyone has seen anything similar, and managed to overcome it - or would have a strategy on how I can overcome it!

    Hate these classloader type issues!!

    Thanks in advance,
    Seth

    ...

    Thought I'd better add this, as you can see, all pretty 'sandbox'.

    Code:
        <!-- Spring JMS Queue Connection Factory -->
        <bean id="jmsQueueConnectionFactory"
            class="org.springframework.jms.connection.SingleConnectionFactory102">
            <property name="targetConnectionFactory">
                <ref bean="internalJmsQueueConnectionFactory"/>
            </property>
            <property name="pubSubDomain">
                <value>false</value>
            </property>
        </bean>
    
        <!-- JMS Destination Resolver -->
        <bean id="jmsDestinationResolver"
            class="org.springframework.jms.support.destination.JndiDestinationResolver">
            <property name="jndiTemplate">
                <ref bean="jndiTemplate"/>
            </property>
            <property name="cache">
                <value>true</value>
            </property>
        </bean>
        
        
    
        <!-- JMS Queue Template -->
        <bean id="jmsQueueTemplate" class="org.springframework.jms.core.JmsTemplate102">
            <property name="connectionFactory">
                <ref bean="jmsQueueConnectionFactory"/>
            </property>
            <property name="destinationResolver">
                <ref bean="jmsDestinationResolver"/>
            </property>
            <property name="pubSubDomain">
                <value>false</value>
            </property>
            <property name="receiveTimeout">
                <value>20000</value>
            </property>
        </bean>
        
          <bean id="jmsSender" class="com.my.message.JMSSender">
          <property name="jmsTemplate102">
                <ref bean="jmsQueueTemplate"/>
            </property>
         
          </bean>
    Last edited by Java_Maniac; Aug 15th, 2007, 08:30 AM. Reason: Addition of config file entries...

  • #2
    Usual trick...

    Thought I'd answer this just in case someone thought or finds they're having a similar problem. My JMS queue is in fact IBM Websphere MQ JMS, and the problem was that I was missing some IBM specific jars from my classpath.

    Therefore, if you're using IBM MQ and having this problem, check your dependencies - maybe!

    Good luck...
    Seth

    Comment


    • #3
      Thanks,

      Today i have got same problem; got resolved becos of your note.

      Thanks again.

      Laks

      Comment

      Working...
      X