Thursday, May 15, 2008

How to configure HermesJMS to connect to JBoss JMS

http://www.hermesjms.com/

HermesJMS is an extensible console that helps you interact with JMS providers making it easy to browse or seach queues and topics, copy messages around and delete them. It fully integrates with JNDI letting you discover administered objects stored, create JMS sessions from the connection factories and use any destinations found. Many providers include a plugin that uses the native API to do non-JMS things like getting queue depths (and other statistics) or finding queue and topic names.

Here is a great step by step video tutorial showing you how to configure the connection to JBoss JMS.
http://hermesjms.com/confluence/display/HJMS/JBoss+Tutorial

* * *

If you follow the tutorial exactly but you still get an error like "No message, linked exception is: null" and an an exception like java.net.MalformedURLException: no protocol: Files/HermesJMS/lib.weaved/hermes-ems.jar in the hermes.log, then is mostly likely caused by the fact that you have installed the application in C:\Program Files or the like. Uninstall and then reinstall the HermesJMS in a path without spaces, if you want it in Program Files, use something like C:\Progra~1\HermesJMS - it will keep the settings, you won't have to make them all over again.

11 comments :

  1. Hi, I am trying to connect HermesJMS to JBoss and I get the following error when I try to create a new JNDI InitialContext:
    Can you explain what is going on? By the way I installed at C:\HermesJMS

    javax.jms.JMSException: Could not create InitialContext: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory
    at hermes.JNDIContextFactory.createContext(JNDIContextFactory.java:282)
    at hermes.browser.components.ContextTreeModelFactory.create(ContextTreeModelFactory.java:58)
    at hermes.browser.tasks.JNDIBrowseTask.invoke(JNDIBrowseTask.java:59)
    at hermes.browser.tasks.TaskSupport.run(TaskSupport.java:175)
    at hermes.browser.tasks.ThreadPool.run(ThreadPool.java:170)
    at java.lang.Thread.run(Thread.java:619)

    ReplyDelete
  2. hey there,

    have you followed the setup closely? I think you're missing the libraries from the JBoss libraries from the Classpath Groups from Providers tab - those jboss\client\ and jboss\lib\ jars, in your case most likely the jboss\client\jbossall-client.jar.

    HTH,
    Dan

    ReplyDelete
  3. Hi Dan,

    I am getting the same error and yes i do have the jar in my providers where we setup the classpath.

    ReplyDelete
  4. I remember I had a few problems myself when setting it up at the time, I had to double check and even delete and recreate some of the definitions. It may be some bug with the latest version as well, don't know...

    I'm in holidays right now, I would be happy to try some TeamViewer connection if you want, although I know it's very hard to meet people on different tiemzones and all.

    The only other thing I can suggest is to post your problem on HermesJMS forum - http://hermesjms.org/forum/

    ReplyDelete
  5. hi!

    i'm getting the same error too :(
    any idea?

    regards

    ReplyDelete
  6. I just configured Hermes JMS 1.4 with JBoss 4.2.3 and followed the video tutorial and I was able to connect just fine - make sure you add the libraries correctly as in the video (both client and lib)

    ReplyDelete
  7. A list of jars needed for JBoss 5.0.1 would be good. Some jars available in 4.x are not available in 5.X

    ReplyDelete
  8. I should have mentioned that the video tutorial worked for me with JBoss 4.2.3.

    I can't test it for JBoss 5 just yet, but maybe try this, see if it helps:
    https://bowerstudios.com/node/615

    ReplyDelete
  9. Same thing happened to me. I noticed in the context config, after saving, the loader property wasnt saved. After creating the context, and populating the values from the video, clicking OK. do the following: contexts -> right click the context -> edit. If loader = System, you have the same problem.

    to fix, i went into the config in c:\.hermes\hermes-config.xml and manually changed the classpathId attribute and restarted hermes

    ReplyDelete
  10. Hi team ,

    I am trying to connect to a weblogic JMS queue over a SSL connection.
    I get the following error :-
    ------------------------------------------------------------------------------------------------
    javax.jms.JMSException: Could not create InitialContext: t3s://XX.XX.XX.XX:7102: Destination XX.XX.XX.XX, 7102 unreachable; nested exception is:
    javax.net.ssl.SSLException: Received fatal alert: unexpected_message; No available router to destination
    at hermes.JNDIContextFactory.createContext(JNDIContextFactory.java:282)
    at hermes.ext.weblogic.WebLogicJMSAdminFactory.createSession(WebLogicJMSAdminFactory.java:63)
    at hermes.impl.HermesAdminAdapter.getAdmin(HermesAdminAdapter.java:64)
    at hermes.impl.HermesAdminAdapter.discoverDestinationConfigs(HermesAdminAdapter.java:82)
    at hermes.impl.DefaultHermesImpl.discoverDestinationConfigs(DefaultHermesImpl.java:1126)
    at hermes.browser.tasks.DiscoverDestinationsTask.invoke(DiscoverDestinationsTask.java:77)
    at hermes.browser.tasks.TaskSupport.run(TaskSupport.java:175)
    at hermes.browser.tasks.ThreadPool.run(ThreadPool.java:170)
    at java.lang.Thread.run(Unknown Source)
    ----------------------------------------------------------------------------------------------------

    Do you guys have any solution to this problem.

    ReplyDelete
    Replies
    1. You must have checked the usual ping, tracert on the IP address, telnet on that port, WebLogic PING to see if the service is network accessible from your machine right? https://blogs.oracle.com/wlscoherence/entry/java_net_socketexception_connection_reset

      Delete