Ala Varos
Ala Varos

Reputation: 1725

Unable to configure HermesJMS with WebSphere MQ 8 in a RedHat Enterprise Linux

I'm trying to configure HermesJMS v1.14 with WebSphereMQ v8.0, but I can not. I've seen several tutorials, and I've followed them, although none were exactly these versions.

This is what I've done. I've downloaded this trial version MQ V8.0 Trial for Multiplatform Multilingual eAssembly. I've installed it following these instructions http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.ins.doc/q008640_.htm?lang=en.

Then, I open HermesJMS and set the provider like first part of demo_mq.html (outdated link removed), but the libraries are:

Then I click on Scan, this is important, because this step is supposed to load all the classes of the jars, which we have to use later.

Then I create the session, using the Loader I've just configured and, when you change the Loader, the combo with the Classes should refresh with the Connection Factories, in particular I have to use com.ibm.mq.jms.MQQueueConnectionFactory, but it doesn't appear, seems like the previous step of scanning doesn't work.

I've looked into the jars, and I know the class MQQueueConnectionFactory is inside com.ibm.mq.jar.

So, is there any step I forgot? Do I need other libraries?

Don't hesitate to ask for more information.

Thanks in advance.

UPDATE:

Adding more information based on T.Rob answer

You didn't mention having applied the Fix Pack. There are a number of Java fixes in 8.0.0.1-3 that might make your setup more interesting and which you'd want to avoid.

Yes, I used it, I forgot mention that, sorry.

The same page also explains that the setmqjmsenv program can be used to set up the environment

I didn't mention this, I used setmqenv to configure PATH environment variable.

SOLUTION to this 1st problem:

I already solved it, but I think there is no "procedure" to do that, I found this in this web http://talksoa.blogspot.com.es/2013/12/configure-hermes-jms-to-connect.html

Wait, found a solution. You must first select the classpath group name, in the case above its WMQ7, from the drop down in the middle pane next to the 'Loader:' Then go back up to the first pane and select IBM WebSphereMQ under plugin

I did something like this and voila! The class appears. Now I'm trying to configure the properties:

And, when I do Right button -> Discover I get the following error:

ERROR hermes.browser.tasks.HermesBrowserTaskListener - MQJE001: Completion Code '2', Reason '2035'.

I've looking for this error and it seems to be an authority error, so I've done:

setmqaut -m MY.QUEUE.MANAGER -t qmgr -g <myUser> +all

myUser is a user which I added to mqm group.

Hope you can help me.

Thanks.

Upvotes: 3

Views: 4993

Answers (4)

deanej
deanej

Reputation: 1

Instead of making client check optional on the connect - typically, the answer given to everything always seems to be turn off all security and authentication - edit the session to add a user ID and password. This, typically, will need to be the user ID you logon to the system on which the queue manager runs and its accompanying password. (I.e. the one you used as the principal in your setmqaut command.)

Edit the session, check the box next to "user:" at the bottom and add the user and password, apply and away you go.

Hope this helps.

Upvotes: 0

titou10
titou10

Reputation: 2977

If you are open to use another tool than HermesJMS, then you can give a try to JMSToolbox (from sourceforge) It is way easier to use than HermesJMS (OK my advice is biaised, I'm the author of JMSToolbox..lol)

Upvotes: 0

Ala Varos
Ala Varos

Reputation: 1725

Thanks to @Umapathy and @T.Rob.

I could fing the log. I answer my own question to anyone who have the same problem. This is my error file:

AMQ5540: Application 'hermes.browser.HermesBrowser' did not supply a user ID and password

EXPLANATION: The queue manager is configured to require a user ID and password, but none was supplied.

ACTION: Ensure that the application provides a valid user ID and password, or change the queue manager configuration to OPTIONAL to allow applications to connect which have not supplied a user ID and password.

And then I found this Websphere MQ v8 - MQRC_NOT_AUTHORIZED - 2035

So I did:

ALTER AUTHINFO(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) AUTHTYPE(IDPWOS) CHCKCLNT(OPTIONAL)

And now I can connect.

Thanks for your help!

Upvotes: 0

T.Rob
T.Rob

Reputation: 31832

Then, I open HermesJMS and set the provider like first part of http://www.hermesjms.com/demos/demo_mq.html, but the libraries are...

You might want to try using IBM's specification for the CLASSPATH as found in the same documentation manual that you linked above. Their page Environment variables used by IBM MQ classes for JMS explains that you need only include one jar in the CLASSPATH and the manifest pulls in the others.

The same page also explains that the setmqjmsenv program can be used to set up the environment. You can run that, then capture the environment variable settings and arrange for Hermes to inherit them through explicit settings or through the service ID used to launch it.

Also, be sure to use the IBM-provided tools to validate that the client has been properly installed and that you can connect to MQ using a known-good piece of software. It would be unfortunate to struggle away with Hermes for a week only to find out the MQ listener is on a different port or that you spelled the channel name wrong.

You didn't mention having applied the Fix Pack. There are a number of Java fixes in 8.0.0.1-3 that might make your setup more interesting and which you'd want to avoid.

I've downloaded this trial version MQ V8.0 Trial for Multiplatform Multilingual eAssembly...

If you go to the tag wiki, you will find links to MQ Advanced for Developers. It's a full-function, non-expiring, version of MQ you can have for free. The trial download will eventually expire. Hopefully not before you get Hermes talking to it, but it will expire and usually at the most inopportune moment.

There too will be some links to the Fix Packs, but you can also easily (yes, that's debatable) find these by going to IBM Fix Central and searching.

Upvotes: 1

Related Questions