You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by unni_varun <va...@yahoo.com> on 2007/07/25 13:00:33 UTC

Connecting to IBM MQ from service-mix

Can we connect to IBM MQ using servicemix-jms component ?

If yes please let me know how.

Thanks in anticipation
Varun
-- 
View this message in context: http://www.nabble.com/Connecting-to-IBM-MQ-from-service-mix-tf4141411s12049.html#a11780300
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Connecting to IBM MQ from service-mix

Posted by Gert Vanthienen <ge...@skynet.be>.
Varun,

Sure you can connect to WebSphere MQ using servicemix-jms.  It's been 
implemented with a few of our customers.  We've discussing this some 
time ago already, I think... 
(http://www.nabble.com/Re%3A-configuring-sevicemix-jms-to-IBM-MQ-tf4068641s12049.html#a11562733).

You already had (part of) the solution there (at least, the 
configuration looks fine to me), but you are still experiencing 
problems, I suppose?  Do you have a message ID and/or text? Or some kind 
of stacktrace?

Gert


unni_varun wrote:
> Can we connect to IBM MQ using servicemix-jms component ?
> 
> If yes please let me know how.
> 
> Thanks in anticipation
> Varun

Re: Connecting to IBM MQ from service-mix

Posted by Gert Vanthienen <ge...@skynet.be>.
Varun,


You probably didn't even need to extends the class, because MQ is 
installed on the same machine.  We had to do this a while back because 
MQ was running on System i and the credentials didn't match.

Can you retry with the default MQConnectionFactory and post the 
exception stack trace you get?


Gert

unni_varun wrote:
> Gert,
> 
> Yeah  i remember the discussion we had on this. This is what i did. 
> 
> 1) Wrote a java class which extends MQQueueConnectionFactory class and
> overrides the createQueueConnection()   method. I gave my windows user
> id/password in that. (IBM MQ was installed using the same.)
> 
> 2) Created the jar file for this java class and kept in
> Jboss-4.0.5.GA\server\default\lib folder.
> 
> 3) Modified the xbean.xml of jms su. Please look at this.
>   <jms:endpoint service="iq:jms"
>                 endpoint="endpoint"
>                 role="provider" 
>                 destinationStyle="queue"
>                 jmsProviderDestinationName="Q1.SQ"
>                 connectionFactory="#connectionFactory" />
>                 
>   <bean id="connectionFactory" class="IQQueueConnectionFactory">
>     <property name="queueManager" value="SampleQM1" />
>     <property name="transportType" value="1" />
>     <property name="hostName" value="localhost" />
>     <property name="port" value="1417" />
>   </bean>
> 
> IQQueueConnectionFactory is the jar file holding my java class.
> 
> Now when i deploy  my SA in jboss i'm getting exception in my
> servicemix-shared component. It was mentioning "Unable to deploy
> servicemix-shared component."
> 
> So this is where i'm stuck up. Right now jboss is throwing access violation
> error. So cant get the actual stack trace.
> 
> 
> 
> 
> 
> 
> 

Re: Connecting to IBM MQ from service-mix

Posted by Gert Vanthienen <ge...@skynet.be>.
Varun,

Rechecking my own config files, I see I use 
com.ibm.mq.jms.MQConnectionFactory instead of 
com.ibm.mq.jms.MQQueueConnectionFactory...



Gert

unni_varun wrote:
> The following is the exception stack trace i'm getting.
> 
> 19:21:27,730 ERROR [MainDeployer] Could not create deployment:
> file:/D:/Jboss-4.0.5.GA/server/default/deploy/servicemix-share
> d-3.1-incubating-installer.zip
> org.jboss.deployment.DeploymentException: ServiceMix deployer unable to
> deploy: org.jboss.deployment.DeploymentInfo@64bee78 {
> 
> url=file:/D:/Jboss-4.0.5.GA/server/default/deploy/servicemix-shared-3.1-incubating-installer.zip
> }
>   deployer: org.servicemix.jboss.deployment.JBIDeployer@a39de
>   status: null
>   state: CREATE_DEPLOYER
>   watch:
> file:/D:/Jboss-4.0.5.GA/server/default/deploy/servicemix-shared-3.1-incubating-installer.zip
>   altDD: null
>   lastDeployed: 1185371461370
>   lastModified: 1185371459667
>   mbeans:
> ; - nested throwable: (javax.management.RuntimeErrorException)
>         at
> org.servicemix.jboss.deployment.JBIDeployer.create(JBIDeployer.java:115)
>         at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
>         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
>         
>         
> 
> Caused by: java.lang.AbstractMethodError:
> com.ibm.mq.jms.MQQueueConnectionFactory.createConnection()Ljavax/jms/Connection;
>         at
> org.apache.servicemix.jms.AbstractJmsProcessor.start(AbstractJmsProcessor.java:74)
>         at
> org.apache.servicemix.soap.SoapEndpoint.activate(SoapEndpoint.java:348)
>         at
> org.apache.servicemix.common.ServiceUnit.start(ServiceUnit.java:55)
>         at
> org.apache.servicemix.common.BaseServiceUnitManager.start(BaseServiceUnitManager.java:151)
>         at
> org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.start(ServiceUnitLifeCycle.java:103)
>         at
> org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:130)
>         at
> org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:374)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.checkPendingSAs(AutoDeploymentService.java:471)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.checkPendingComponents(AutoDeploymentService.java:525)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:299)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateExternalArchive(AutoDeploymentService.java:201)
>         at
> org.servicemix.jboss.deployment.JBIService.installArchive(JBIService.java:116)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
>         ... 72 more
> 19:21:27,730 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
> 
> --- Incompletely deployed packages ---
> org.jboss.deployment.DeploymentInfo@64bee78 {
> url=file:/D:/Jboss-4.0.5.GA/server/default/deploy/servicemix-shared-3.1-incubat
> ing-installer.zip }
>   deployer: org.servicemix.jboss.deployment.JBIDeployer@a39de
>   status: Deployment FAILED reason: ServiceMix deployer unable to deploy:
> org.jboss.deployment.DeploymentInfo@64bee78 { url=f
> ile:/D:/Jboss-4.0.5.GA/server/default/deploy/servicemix-shared-3.1-incubating-installer.zip
> }
>   deployer: org.servicemix.jboss.deployment.JBIDeployer@a39de
>   status: null
>   state: CREATE_DEPLOYER
>   watch:
> file:/D:/Jboss-4.0.5.GA/server/default/deploy/servicemix-shared-3.1-incubating-installer.zip
>   altDD: null
>   lastDeployed: 1185371461370
>   lastModified: 1185371459667
>   mbeans:
> ; - nested throwable: (javax.management.RuntimeErrorException)
>   state: FAILED
>   watch:
> file:/D:/Jboss-4.0.5.GA/server/default/deploy/servicemix-shared-3.1-incubating-installer.zip
>   altDD: null
>   lastDeployed: 1185371461370
>   lastModified: 1185371459667
>   mbeans:
> 
> Any clue ???

Re: Connecting to IBM MQ from service-mix

Posted by Gert Vanthienen <ge...@skynet.be>.
Varun,

And do you still get the same stacktrace or is it saying something else 
by now?

Gert

unni_varun wrote:
> Its still not working, i tried to use the class you have mentioned. And i
> even tried to extend it to my own class and overrided the particular method
> also. Still the same. Anyways i'm leaving for the day. Will try it out
> tomorrow.

Re: Connecting to IBM MQ from service-mix

Posted by unni_varun <va...@yahoo.com>.
Gert,

Now I could connect to IBM MQ from servicemix-jms. The error was not with my
xbean.xml or the class which i was using. The problem was with the jar file
i was using. The class MQConnectionFactory was an abstract class in the jar
which i used. I was using a different version of com.ibm.mqjms.jar.  i got
the correct com.ibm.mqjms.jar from the lib folder of IBM MQ installed folder
(MQ\MSI\eclipse\plugins\com.ibm.mq.runtime_6.0.0\lib). These jars along with
dhbcore.jar when placed in server/default/lib of jboss things started
working fine. 

Yeah and i added the line processorName="standard" in jms endpoint in xbean.
Thanks a lot for your help.





Gert Vanthienen wrote:
> 
> Varun,
> 
> And do you still get the same stacktrace or is it saying something else 
> by now?
> 
> Gert
> 
> unni_varun wrote:
>> Its still not working, i tried to use the class you have mentioned. And i
>> even tried to extend it to my own class and overrided the particular
>> method
>> also. Still the same. Anyways i'm leaving for the day. Will try it out
>> tomorrow.
> 
> 

-- 
View this message in context: http://www.nabble.com/Connecting-to-IBM-MQ-from-service-mix-tf4141411s12049.html#a11806666
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Connecting to IBM MQ from service-mix

Posted by unni_varun <va...@yahoo.com>.
Its still not working, i tried to use the class you have mentioned. And i
even tried to extend it to my own class and overrided the particular method
also. Still the same. Anyways i'm leaving for the day. Will try it out
tomorrow.
-- 
View this message in context: http://www.nabble.com/Connecting-to-IBM-MQ-from-service-mix-tf4141411s12049.html#a11783782
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Connecting to IBM MQ from service-mix

Posted by unni_varun <va...@yahoo.com>.
The following is the exception stack trace i'm getting.

19:21:27,730 ERROR [MainDeployer] Could not create deployment:
file:/D:/Jboss-4.0.5.GA/server/default/deploy/servicemix-share
d-3.1-incubating-installer.zip
org.jboss.deployment.DeploymentException: ServiceMix deployer unable to
deploy: org.jboss.deployment.DeploymentInfo@64bee78 {

url=file:/D:/Jboss-4.0.5.GA/server/default/deploy/servicemix-shared-3.1-incubating-installer.zip
}
  deployer: org.servicemix.jboss.deployment.JBIDeployer@a39de
  status: null
  state: CREATE_DEPLOYER
  watch:
file:/D:/Jboss-4.0.5.GA/server/default/deploy/servicemix-shared-3.1-incubating-installer.zip
  altDD: null
  lastDeployed: 1185371461370
  lastModified: 1185371459667
  mbeans:
; - nested throwable: (javax.management.RuntimeErrorException)
        at
org.servicemix.jboss.deployment.JBIDeployer.create(JBIDeployer.java:115)
        at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
        
        

Caused by: java.lang.AbstractMethodError:
com.ibm.mq.jms.MQQueueConnectionFactory.createConnection()Ljavax/jms/Connection;
        at
org.apache.servicemix.jms.AbstractJmsProcessor.start(AbstractJmsProcessor.java:74)
        at
org.apache.servicemix.soap.SoapEndpoint.activate(SoapEndpoint.java:348)
        at
org.apache.servicemix.common.ServiceUnit.start(ServiceUnit.java:55)
        at
org.apache.servicemix.common.BaseServiceUnitManager.start(BaseServiceUnitManager.java:151)
        at
org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.start(ServiceUnitLifeCycle.java:103)
        at
org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:130)
        at
org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:374)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.checkPendingSAs(AutoDeploymentService.java:471)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.checkPendingComponents(AutoDeploymentService.java:525)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:299)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateExternalArchive(AutoDeploymentService.java:201)
        at
org.servicemix.jboss.deployment.JBIService.installArchive(JBIService.java:116)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
        ... 72 more
19:21:27,730 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo@64bee78 {
url=file:/D:/Jboss-4.0.5.GA/server/default/deploy/servicemix-shared-3.1-incubat
ing-installer.zip }
  deployer: org.servicemix.jboss.deployment.JBIDeployer@a39de
  status: Deployment FAILED reason: ServiceMix deployer unable to deploy:
org.jboss.deployment.DeploymentInfo@64bee78 { url=f
ile:/D:/Jboss-4.0.5.GA/server/default/deploy/servicemix-shared-3.1-incubating-installer.zip
}
  deployer: org.servicemix.jboss.deployment.JBIDeployer@a39de
  status: null
  state: CREATE_DEPLOYER
  watch:
file:/D:/Jboss-4.0.5.GA/server/default/deploy/servicemix-shared-3.1-incubating-installer.zip
  altDD: null
  lastDeployed: 1185371461370
  lastModified: 1185371459667
  mbeans:
; - nested throwable: (javax.management.RuntimeErrorException)
  state: FAILED
  watch:
file:/D:/Jboss-4.0.5.GA/server/default/deploy/servicemix-shared-3.1-incubating-installer.zip
  altDD: null
  lastDeployed: 1185371461370
  lastModified: 1185371459667
  mbeans:

Any clue ???
-- 
View this message in context: http://www.nabble.com/Connecting-to-IBM-MQ-from-service-mix-tf4141411s12049.html#a11783153
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Connecting to IBM MQ from service-mix

Posted by unni_varun <va...@yahoo.com>.
Gert,

Yeah  i remember the discussion we had on this. This is what i did. 

1) Wrote a java class which extends MQQueueConnectionFactory class and
overrides the createQueueConnection()   method. I gave my windows user
id/password in that. (IBM MQ was installed using the same.)

2) Created the jar file for this java class and kept in
Jboss-4.0.5.GA\server\default\lib folder.

3) Modified the xbean.xml of jms su. Please look at this.
  <jms:endpoint service="iq:jms"
                endpoint="endpoint"
                role="provider" 
                destinationStyle="queue"
                jmsProviderDestinationName="Q1.SQ"
                connectionFactory="#connectionFactory" />
                
  <bean id="connectionFactory" class="IQQueueConnectionFactory">
    <property name="queueManager" value="SampleQM1" />
    <property name="transportType" value="1" />
    <property name="hostName" value="localhost" />
    <property name="port" value="1417" />
  </bean>

IQQueueConnectionFactory is the jar file holding my java class.

Now when i deploy  my SA in jboss i'm getting exception in my
servicemix-shared component. It was mentioning "Unable to deploy
servicemix-shared component."

So this is where i'm stuck up. Right now jboss is throwing access violation
error. So cant get the actual stack trace.







-- 
View this message in context: http://www.nabble.com/Connecting-to-IBM-MQ-from-service-mix-tf4141411s12049.html#a11781759
Sent from the ServiceMix - User mailing list archive at Nabble.com.