ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » com.ibm.disthub2.impl.client.SessionConfig

Post new topic  Reply to topic
 com.ibm.disthub2.impl.client.SessionConfig « View previous topic :: View next topic » 
Author Message
paulf1
PostPosted: Tue Jan 22, 2013 11:19 am    Post subject: com.ibm.disthub2.impl.client.SessionConfig Reply with quote

Newbie

Joined: 14 Jan 2013
Posts: 7

We're seeing a ClassNotFoundError using MQ JMS from Spring that is proving difficult to diagnose:

Code:

Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.ibm.mq.jms.MQQueueConnectionFactory]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError
   at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:162)
   at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:76)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:990)
   ... 43 more
Caused by: java.lang.NoClassDefFoundError
   at com.ibm.msg.client.wmq.factories.WMQFactoryFactory.class$(WMQFactoryFactory.java:132)
   at com.ibm.msg.client.wmq.factories.WMQFactoryFactory.setupDistHubTracing(WMQFactoryFactory.java:360)
   at com.ibm.msg.client.wmq.factories.WMQFactoryFactory.<init>(WMQFactoryFactory.java:330)
   at com.ibm.msg.client.wmq.factories.WMQFactoryFactory.getInstance(WMQFactoryFactory.java:182)
   at com.ibm.msg.client.wmq.factories.WMQComponent.getFactoryInstance(WMQComponent.java:138)
   at com.ibm.msg.client.jms.internal.JmsFactoryFactoryImpl.getInstance(JmsFactoryFactoryImpl.java:152)
   at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.setProviderFactory(JmsConnectionFactoryImpl.java:176)
   at com.ibm.mq.jms.MQConnectionFactory.<init>(MQConnectionFactory.java:285)
   at com.ibm.mq.jms.MQQueueConnectionFactory.<init>(MQQueueConnectionFactory.java:76)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
   ... 45 more
Caused by: java.lang.ClassNotFoundException: com.ibm.disthub2.impl.client.SessionConfig
   at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:169)
   ... 59 more


This comes from a very typical MQQueueConnectionFactory bean declaration:

Code:

    <bean id="inboundJmsConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory">
        <property name="transportType" value="1"/>
        <property name="hostName" value="${grs.mq.in.queue.host}"/>
        <property name="port" value="${grs.mq.in.queue.port}"/>
        <property name="queueManager" value="${grs.mq.in.queue.manager}"/>
        <property name="channel" value="${grs.mq.in.queue.channel}"/>
    </bean>


We're using version 5.3.07 of IBM mq, mqjsm, and mqbind.

What is odd is that this was all working. We did not change any of the IBM jars, or bean config, and this error starting happening on app start.

Can someone tell me under what conditions this factory attempts to dynamically load com.ibm.disthub2.impl.client.SessionConfig?
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jan 22, 2013 11:36 am    Post subject: Re: com.ibm.disthub2.impl.client.SessionConfig Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

paulf1 wrote:
We're using version 5.3.07 of IBM mq, mqjsm, and mqbind.


You do know that's out of support don't you?

paulf1 wrote:
What is odd is that this was all working. We did not change any of the IBM jars, or bean config, and this error starting happening on app start.


So what changed? What restarted? Why did you do that knowing you have out of support WMQ that won't be tested on any new component you use?

paulf1 wrote:
Can someone tell me under what conditions this factory attempts to dynamically load com.ibm.disthub2.impl.client.SessionConfig?


Only IBM can.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
paulf1
PostPosted: Tue Jan 22, 2013 11:42 am    Post subject: Reply with quote

Newbie

Joined: 14 Jan 2013
Posts: 7

Hi,

Problem solved: we needed dhbcore core. Previously, it was being pulled in by a transitive dependency. Somebody changed a dep far up the line and suddenly it's no longer there (the joys of maven).

As for the client jars being out of support, our mandate is to replicate current functionality, so we are starting with those. Thanks for the info, though: I'll make sure to create a task to update the jars.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jan 22, 2013 12:41 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Better to install the MQ Client than just install the jars.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
paulf1
PostPosted: Tue Jan 22, 2013 12:43 pm    Post subject: Reply with quote

Newbie

Joined: 14 Jan 2013
Posts: 7

Vitor wrote:
Better to install the MQ Client than just install the jars.


I've read that. But I'm not sure how you do that on Linux batch job servers. And I also do not have permissions to do so, nor do other developers or local managers (it's a big, big company).
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jan 22, 2013 2:21 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

paulf1 wrote:
Vitor wrote:
Better to install the MQ Client than just install the jars.


I've read that. But I'm not sure how you do that on Linux batch job servers. And I also do not have permissions to do so, nor do other developers or local managers (it's a big, big company).


Usually the way you do that in a big big company on servers that you don't control is that you open an internal ticket of some kind with the team that does control the servers, and you tell them that you require they do this task.

Then you tell your management that you can't deploy new code until this other team has completed the task.

Then you tell the other team that they are holding up your task.

Then you keep repeating this until the other team gives up and gives you access to install it yourself.
Back to top
View user's profile Send private message
paulf1
PostPosted: Tue Jan 22, 2013 3:19 pm    Post subject: Reply with quote

Newbie

Joined: 14 Jan 2013
Posts: 7

We were told there's no motivation since only a few jars are required, it works, and that's that.

And, to be honest, it's hard to argue with that, when you have a finite number of political points to spend.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jan 22, 2013 8:57 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

paulf1 wrote:
We were told there's no motivation since only a few jars are required, it works, and that's that.

And, to be honest, it's hard to argue with that, when you have a finite number of political points to spend.


Tell them that it just "happens" to work. There is no guarantee that it will work tomorrow, and it is not best practice... Then ask management if they want you to use the shortcut or implement best practice (in writing (CYA)).

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Wed Jan 23, 2013 6:21 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

paulf1 wrote:
We were told there's no motivation since only a few jars are required, it works, and that's that.


The motivation is that IBM doesn't guarantee it works, nor support the configuration if it doesn't. So if you hit problems your only recourse is places like this. Embarassing if it's a production issue.

paulf1 wrote:
And, to be honest, it's hard to argue with that, when you have a finite number of political points to spend.


If you don't spend them on this, then on what?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Wed Jan 23, 2013 6:51 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7717

http://www-01.ibm.com/support/docview.wss?uid=swg21376217
Quote:

Question
What is the recommended way to update the WebSphere MQ Javaâ„¢ and MQ JMS JAR files?
Answer
The only supported way to get the MQ JAR files onto a system is to install either the WebSphere MQ product, or the WebSphere MQ Client SupportPac.
Do not copy the WebSphere MQ JAR files to application EAR or WAR files and
Do not copy the WebSphere MQ JAR files from other machines....


Regardless, in my opinion, IBM took a step backwards years ago when they got rid of the MA88 Support Pack, which was the only way back then to get the MQ Jar files onto a server. And it was ONLY the jar files needed. Yeah, the MQ Client is free, yeah its a simple install, but its not a zero install and Java people rightfully ask why they need all the rest of that MQ Client install when all they want / need and know to work is a few jar files. I sigh, say I know, shrug and then refer them to the link I posted. Because that's the way it be.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Wed Jan 23, 2013 10:05 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7717

Here is an IBM TechNote on how to setup a UNIX or Linux machine to run WebSphere MQ 7.0.1 client applications, if it does not have WebSphere MQ installed.

http://www-01.ibm.com/support/docview.wss?uid=swg21440938

Still a lot of steps compared to (the unsupported method of) just copying some jar files around.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » com.ibm.disthub2.impl.client.SessionConfig
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.