Forum Discussion

prsjoberg's avatar
prsjoberg
Occasional Contributor
9 years ago
Solved

JMS could not create InitialContext with weblogic server

Hi

I'm trying to conncet to a JMS qeue with groovy and found an example at http://www.soapui.org/jms/working-with-jms-messages.html. The server is weblogic.

I have got the  Hermes console to work.

I substituted the endpoint in the script with the endpoint created with API/JMS Destination. (bold in the code)

 

when I run the script I get an error on the line def jmsConnectionHolder (red in the code) saying:

 

An error occurred:

javax.jms.JMSException: Could not create InitialContext: t3://localhost:18080: Destination unreachable; nested exception is: java.net.ProtocolException: Empty or no response from proxy; No available router to destination error at line: 9

 

I'm totally lost here. The weblogicSession works in the Hermes console

 

When I look at the parameters in jmsConnectionHolder the look as follows:

 

Wed Aug 26 14:15:08 CEST 2015:INFO: jmsEndpoint =   jms://weblogicSession::queue_kfm/kg/lab/testApp/in::queue_kfm/kg/lab/testApp/ut

 

Wed Aug 26 14:15:08 CEST 2015:INFO:hermes = connectionFactory class=hermes.JNDIConnectionFactory, properties={port=null, securityCredentials=wlssystem, securityAuthentication=null, host=null, initialContextFactory=weblogic.jndi.WLInitialContextFactory, referral=null, stateFactories=null, objectFactories=null, batchSize=null, class=class hermes.JNDIConnectionFactory, securityProtocol=null, authoritative=null, dnsUrl=null, userPropertiesFile=null, rmiAdaptorBinding=null, userPropertiesURL=null, securityPrincipal=system, binding=javax/jms/QueueConnectionFactory, providerURL=t3://localhost:18080, language=null, urlPkgPrefixes=null}

 

 

 import com.eviware.soapui.impl.wsdl.submit.transports.jms.JMSConnectionHolder
 import com.eviware.soapui.impl.wsdl.submit.transports.jms.util.HermesUtils
 import com.eviware.soapui.impl.wsdl.submit.transports.jms.JMSEndpoint
 import hermes.Hermes
 import javax.jms.*

 def jmsEndpoint = new  JMSEndpoint("jms://weblogicSession::queue_kfm/kg/lab/testApp/in::queue_kfm/kg/lab/testApp/ut");
 def hermes = HermesUtils.getHermes( context.testCase.testSuite.project, jmsEndpoint.sessionName)
 def jmsConnectionHolder = new JMSConnectionHolder( jmsEndpoint, hermes, false, null, null, null);

 Session queueSession = jmsConnectionHolder.getSession();
 Queue queueSend = jmsConnectionHolder.getQueue( jmsConnectionHolder.getJmsEndpoint().getSend() );
 Queue queueBrowse = jmsConnectionHolder.getQueue( jmsConnectionHolder.getJmsEndpoint().getReceive() );

 

 

I'm stuck here. Can anyone give me a hint what might be wrong?

Regards,

Per

  • In this particular case we ran into the problem due to a checkout of a floating license.

    It seems that when checking out the floating license I get a question to log on to the domain. ReadyApi saves the proxy setting  in the ReadyApi system setting. I cannot change it under Preferences. But, I can check in the floating license and check out a new one and choose to do a "direct connect", thus erasing the Proxy settings. After that the JMS connect works just fine. The strange thing is that this only affects JMS, not HTTP.

     

    Per

4 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3

    May be you want to try the with following change and see if this works your case?

     

     

    from:

    def jmsEndpoint = new  JMSEndpoint("jms://weblogicSession::queue_kfm/kg/lab/testApp/in::queue_kfm/kg/lab/testApp/ut");

    to:

     def jmsEndpoint = new  JMSEndpoint("jms://weblogicSession::queue_kfm/kg/lab/testApp/in::queue_kfm/kg/lab/testApp/ut::queue_")
    • prsjoberg's avatar
      prsjoberg
      Occasional Contributor

      Hi Rao

       

      Thank you for your answer. I tried it but get the same error as before

       

      Regards

      Per

      • prsjoberg's avatar
        prsjoberg
        Occasional Contributor

        Also, due to company restrictions we are running on ReadyApi 1.3.0

        Per