Mule and Tibco EMS

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Mule and Tibco EMS

seanc
I am currently trying to use TibcoEMS as my jms provider. On startup, however, I seem
to be getting an error on startup claiming invalid username or password.

my config file for my jms connector looks like:

<connector name="jmsConnector" className="org.mule.providers.jms.JmsConnector">
        <properties>       
            <property name="specification" value="1.1"/>
            <property name="username" value="<username>"/>
             <property name="password" value="<password>"/>
            <property name="connectionFactoryJndiName" value="QueueConnectionFactory"/>
            <property name="jndiInitialFactory" value="com.tibco.tibjms.naming.TibjmsInitialContextFactory"/>
            <property name="jndiProviderUrl" value="tcp://<ip>:7222"/>
      </properties>
    </connector>

with my env specific values. I've verified independently that these values are in fact correct, and in testing,
it looks like perhaps the values arent being read, because if you remove them, the same error is being returned.

Any help would be appreciated. Im sure its just an oversight, but it seems I've checked the docs and this looks correct.

Sean
Reply | Threaded
Open this post in threaded view
|

Re: Mule and Tibco EMS

Andrew Perepelytsya
Sean,

Are those username and password the JNDI ones or Tibco EMS? Specify them in either:
  • jndiProviderProperties map
  • connectionFactoryProperties
E.g. http://mule.codehaus.org/Configuring+Jms#ConfiguringJms-ActiveMQ gives some examples.

Andrew

On 3/16/06, Sean Curtis <[hidden email]> wrote:
I am currently trying to use TibcoEMS as my jms provider. On startup, however, I seem
to be getting an error on startup claiming invalid username or password.

my config file for my jms connector looks like:

<connector name="jmsConnector" className="org.mule.providers.jms.JmsConnector">
        <properties>       
            <property name="specification" value="1.1"/>
            <property name="username" value="<username>"/>
             <property name="password" value="<password>"/>
            <property name="connectionFactoryJndiName" value="QueueConnectionFactory"/>
            <property name="jndiInitialFactory" value="com.tibco.tibjms.naming.TibjmsInitialContextFactory"/>
            <property name="jndiProviderUrl" value="tcp://<ip>:7222"/>
      </properties>
    </connector>

with my env specific values. I've verified independently that these values are in fact correct, and in testing,
it looks like perhaps the values arent being read, because if you remove them, the same error is being returned.

Any help would be appreciated. Im sure its just an oversight, but it seems I've checked the docs and this looks correct.

Sean

Reply | Threaded
Open this post in threaded view
|

Re: Mule and Tibco EMS

seanc
Andrew

I really appreciate the response. I tried your suggestion below and arrived at the following connector config:

<connector name="jmsConnector" className="org.mule.providers.jms.JmsConnector">
        <properties>
            <property name="jndiProviderUrl" value="tcp://<ip>:7222"/>
            <property name="connectionFactoryJndiName" value="QueueConnectionFactory"/>
            <map name="jndiProviderProperties">
                <property name="java.naming.factory.initial"
                    value="com.tibco.tibjms.naming.TibjmsInitialContextFactory"/>
                <property name="java.naming.security.principal" value="<username>"/>
                <property name="java.naming.security.credentials" value="<password>"/>
            </map>
        </properties>
    </connector>

Still with no luck. I think I read connectionFactoryProperties were being replaced by jndiProviderProperties, so I went with that. Any suggestions?

Sean
Reply | Threaded
Open this post in threaded view
|

Re: Mule and Tibco EMS

Andrew Perepelytsya
Sean,

Could you post details of your error?

Next, when I'm looking at my working Tibco EMS config, the naming protocol is different - tibjmsnaming:// maybe it could help.

Andrew

On 3/16/06, seanc <[hidden email]> wrote:

Andrew

I really appreciate the response. I tried your suggestion below and arrived
at the following connector config:

<connector name="jmsConnector"
className="org.mule.providers.jms.JmsConnector ">
        <properties>
            <property name="jndiProviderUrl" value="tcp://<ip>:7222"/>
            <property name="connectionFactoryJndiName"
value="QueueConnectionFactory"/>
            <map name="jndiProviderProperties">
                <property name="java.naming.factory.initial"

value="com.tibco.tibjms.naming.TibjmsInitialContextFactory "/>
                <property name="java.naming.security.principal"
value="<username>"/>
                <property name="java.naming.security.credentials"
value="<password>"/>
            </map>
        </properties>
    </connector>

Still with no luck. I think I read connectionFactoryProperties were being
replaced by jndiProviderProperties, so I went with that. Any suggestions?

Sean
--
View this message in context: http://www.nabble.com/Mule-and-Tibco-EMS-t1294682.html#a3450100
Sent from the Mule - User forum at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Mule and Tibco EMS

seanc
Andrew..

I had come across that tibjmsnaming:// tip before, and have tried both to no avail. i have, in fact, verified that I can connect to EMS when authentication is turned off via Mule and get the server to start. So it appears to boil down to 2 things:
1. I have a config issue strictly on the user/password on my side, meaning perhaps the 2 queues (inbound/outbound routers) Im trying to connect to are not visible to the user I have in my config file. The thing is, however, I've verified these through a standalone main method that sets these values via setting up an InitialContext with properties ( and using the class constants, not the actual string values for the jndi prop names).
2. Perhaps Im still using the wrong keys for my map config or the wrong config type to set username and password?

my latest config is:

<connector name="jmsConnector" className="org.mule.providers.jms.JmsConnector">
        <properties>
            <property name="jndiProviderUrl" value="tibjmsnaming://172.16.100.121:7222"/>
            <property name="connectionFactoryJndiName" value="QueueConnectionFactory"/>
            <map name="jndiProviderProperties">
                <property name="java.naming.factory.initial"
                    value="com.tibco.tibjms.naming.TibjmsInitialContextFactory"/>
                <property name="java.naming.security.principal" value="newsletter"/>
                <property name="java.naming.security.credentials" value="n3wsl3tt3r"/>
            </map>
        </properties>
    </connector>

my latest umo router config is:

<mule-descriptor name="SampleJobUMO"
            implementation="com.foo.SampleJobUMO">
            <inbound-router>
                <endpoint address="jms://demo.inbound"
                    transformers="JMSMessageToOurMessage"/>
            </inbound-router>
            <outbound-router>
                <router className="org.mule.routing.outbound.OutboundPassThroughRouter">
                    <endpoint address="jms://demo.outbound"/>
                </router>
            </outbound-router>
            <interceptor name="default"/>
        </mule-descriptor>

and my latest stack trace is:


********************************************************************************
Exception stack is:
1. invalid name or password(JMS Code: null) (javax.jms.JMSSecurityException)
  com.tibco.tibjms.Tibjmsx:549 (http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/JMSSecurityException.html)
2. Initialisation Failure: invalid name or password (org.mule.providers.ConnectException)
  org.mule.providers.jms.JmsConnector:269 (http://mule.codehaus.org/docs/apidocs/org/mule/providers/ConnectException.html)
********************************************************************************
Root Exception stack trace:
javax.jms.JMSSecurityException: invalid name or password
        at com.tibco.tibjms.Tibjmsx.buildException(Tibjmsx.java:549)
        at com.tibco.tibjms.TibjmsConnection._create(TibjmsConnection.java:693)
        at com.tibco.tibjms.TibjmsConnection.<init>(TibjmsConnection.java:1932)
        at com.tibco.tibjms.TibjmsQueueConnection.<init>(TibjmsQueueConnection.java:37)
        at com.tibco.tibjms.TibjmsxCFImpl._createImpl(TibjmsxCFImpl.java:148)
        at com.tibco.tibjms.TibjmsxCFImpl._createConnection(TibjmsxCFImpl.java:201)
        at com.tibco.tibjms.TibjmsQueueConnectionFactory.createQueueConnection(TibjmsQueueConnect

...

Are you using security with EMS? and if so, is your connector config identitical to mine?
Reply | Threaded
Open this post in threaded view
|

Re: Mule and Tibco EMS

seanc
Ok I was able to get connected to Tibco EMS and security turned on. I had to do it as follows:

<connector name="jmsConnector" className="org.mule.providers.jms.JmsConnector">
        <properties>
            <property name="jndiProviderUrl" value="tibjmsnaming://<ip or hostname>:port"/>
            <property name="connectionFactoryJndiName" value="QueueConnectionFactory"/>
            <map name="jndiProviderProperties">
                <property name="java.naming.factory.initial"
                    value="com.tibco.tibjms.naming.TibjmsInitialContextFactory"/>
                <property name="java.naming.security.principal" value="<username>"/>
                <property name="java.naming.security.credentials" value="<password>/>
            </map>
           
            <property name="username" value="<username>"/>
            <property name="password" value="<password>"/>
           
        </properties>
    </connector>

The second being the non-jndi lookup value to use in order to connect to a specific queue.

Hope this helps someone down the line. The configuration docs are helpful, but not many of them actually list an example where the JMS Server has configs for authentication being set to on.

Sean
Reply | Threaded
Open this post in threaded view
|

Re: Mule and Tibco EMS

Andrew Perepelytsya
Thanks, Sean!

I will file a task to update the docs for Tibco EMS. The nature of the Mule project is such that it's physically impossible for a developer to get a hold of all and everything for testing, and contributions like this cannot be underestimated.

Cheers,
Andrew

On 3/20/06, seanc <[hidden email]> wrote:

Ok I was able to get connected to Tibco EMS and security turned on. I had to
do it as follows:

<connector name="jmsConnector"
className="org.mule.providers.jms.JmsConnector">
        <properties>
            <property name="jndiProviderUrl" value="tibjmsnaming://<ip or
hostname>:port"/>
            <property name="connectionFactoryJndiName"
value="QueueConnectionFactory"/>
            <map name="jndiProviderProperties">
                <property name="java.naming.factory.initial"

value="com.tibco.tibjms.naming.TibjmsInitialContextFactory "/>
                <property name="java.naming.security.principal"
value="<username>"/>
                <property name="java.naming.security.credentials"
value="<password>/>
            </map>

            <property name="username" value="<username>"/>
            <property name="password" value="<password>"/>

        </properties>
    </connector>

The second being the non-jndi lookup value to use in order to connect to a
specific queue.

Hope this helps someone down the line. The configuration docs are helpful,
but not many of them actually list an example where the JMS Server has
configs for authentication being set to on.

Sean
--
View this message in context: http://www.nabble.com/Mule-and-Tibco-EMS-t1294682.html#a3502651
Sent from the Mule - User forum at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Mule and Tibco EMS

varungoel_123
This post has NOT been accepted by the mailing list yet.
In reply to this post by seanc