Results 1 to 2 of 2

Thread: Web Logic 10.3.5 JMS configuration problems

  1. #1
    Join Date
    May 2007
    Posts
    16

    Default Web Logic 10.3.5 JMS configuration problems

    I started with Tomcat and ActiveMQ for my Application Server & JMS queues to get the spring configuration working so all I would have to do is change from ActiveMQ to WebLogic and be done. Unfortunately, I absolutely can not get the configuration working for Web Logic.

    Here is the ActiveMQ configuration:

    Code:
        <bean id="connectionFactory" class="org.apache.activemq.spring.ActiveMQConnectionFactory">
            <property name="brokerURL" value="tcp://localhost:61616"/>
        </bean>
    
        <bean id="myOutgoingQueue" class="org.apache.activemq.command.ActiveMQQueue">
            <constructor-arg value="JMS_Outgoing_Queue"/>
        </bean>
    
        <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
            <property name="connectionFactory" ref="connectionFactory"/>
        </bean>

    I am able to successfully route an incoming SOAP request directly to a Channel then transform it to a string and send to the queue defined above. I verify receipt through the ActiveMQ admin console and it's there.

    I have tried for days to get WebLogic, which our customer requires, configured to do the same and I have been unsuccessful.

    I tried:
    Code:
        <jee:jndi-lookup id="connectionFactory" jndi-name="weblogic.jms.ConnectionFactory"/>
        <jee:jndi-lookup id="myOutgoingQueue" jndi-name="JMS_Outgoing_Queue" expose-access-context="true"/>
        <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
            <property name="connectionFactory" ref="connectionFactory"/>
        </bean>
    I also tried:

    Code:
     
       <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
            <property name="environment">
                <props>
                    <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
                    <prop key="java.naming.provider.url">http://localhost:7001</prop>
                </props>
            </property>
        </bean>
    
        <bean id="queueConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
            <property name="jndiTemplate">
                <ref bean="jndiTemplate"/>
            </property>
            <property name="jndiName">
                <value>connectionFactory</value>
            </property>
        </bean>
    
        <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>
    
        <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
            <property name="connectionFactory">
                <ref bean="queueConnectionFactory"/>
            </property>
            <property name="destinationResolver">
                <ref bean="jmsDestinationResolver"/>
            </property>
        </bean>
    
        <bean id="myOutgoingQueue" class="org.springframework.jndi.JndiObjectFactoryBean">
            <property name="jndiTemplate">
                <ref bean="jndiTemplate"/>
            </property>
            <property name="jndiName">
                <value>JMS_Outgoing_Queue</value>
            </property>
        </bean>
    In both cases my IDE Idea, complains that the ConnectionFactory has to be of javax.jms.ConnectionFactory.

    Before I tried worked on the JMS piece, I deployed my application to WebLogic to validate that the Web Services were working by routing the Spring Integration Channel to stdout. So I know the application worked in web logic at that point.

    The error I get is the following:
    org.springframework.ws.soap.client.SoapFaultClient Exception: [JMSClientExceptions:055142]Foreign destination, MySystem
    Module!JMS_Outgoing_Queue; nested exception is weblogic.jms.common.InvalidDestinationException: [
    JMSClientExceptions:055142]Foreign destination,MySystemModule!JMS_Outgoing_Queue
    at org.springframework.ws.soap.client.core.SoapFaultM essageResolver.resolveFault(SoapFaultMessageResolv er.java:3
    7)
    at org.springframework.ws.client.core.WebServiceTempl ate.handleFault(WebServiceTemplate.java:733)
    at org.springframework.ws.client.core.WebServiceTempl ate.doSendAndReceive(WebServiceTemplate.java:559)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:496)
    at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 343)
    at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 333)
    at com.accenture.inde.itron.headend.ws.ExceptionSubsc riberServiceClient.sendExceptionsArrivedMessage(Ex ceptionSu
    bscriberServiceClient.java:46)
    at com.accenture.inde.itron.headend.ws.ExceptionSubsc riberServiceClient.run(ExceptionSubscriberServiceC lient.jav
    a:103)
    at java.lang.Thread.run(Thread.java:662)

    Additional Spring Integration configuraiton is:
    Code:
        <bean class="org.springframework.ws.server.endpoint.mapping.UriEndpointMapping">
            <property name="mappings">
                <props>
                    <prop key="${myUri}">myGateway</prop>
                </props>
            </property>
        </bean>
    
        <si:channel id="myChannel" />
        <si-ws:inbound-gateway id="myGateway" request-channel=myChannel" />
    NOTE at this point the data on myChannel is a DOMSource object, I next convert to string then output to JMS Queue
    Code:
        <si:channel id="myChannelToString" />
        <si:transformer input-channel="myInputChannel" output-channel="myChannelToString"
            method="transformDOMSourceToString" ref="DOMSourceToStringTransformer" />
    
        <si-jms:outbound-channel-adapter id="myJmsOut"
                                         channel="myChannelToString"
                                         destination="myOutgoingQueue" />
    Also looking at the Web Logic Logs I see this stack trace recurring:
    org.springframework.beans.factory.xml.XmlBeanDefin itionStoreException: Line 182 in XML document from class path resource [inde-si-ws-gateway-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'jms:outbound-channel-adapter'.

    I am pretty confident I have the right Spring Integration, Spring Core and Spring WS jar's as when I use ActiveMQ It works without any errors.

    Any help would be greatly appreciated.
    Last edited by phillips4jc; Nov 8th, 2011 at 08:19 AM.

  2. #2
    Join Date
    May 2007
    Posts
    16

    Default Problem resolved

    I was able to resolve the problem.

    Removing the expose-access-context="true" from the queue definition was all it took.

    Hope this helps someone.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •