This discussion is archived
4 Replies Latest reply: Nov 9, 2012 2:39 PM by wgkorb RSS

WLS 12c JMS & HermesJMS

wgkorb Newbie
Currently Being Moderated
Has anyone been able to get HermesJMS working with WLS 12c?

I have followed the setup instructions on various blog posts and such and have basically done the following:

1. Generated the wlfullclient.jar and created a new CLASSPATH group named "WLS12.1".
2. Added a new session using the above classpath.
3. Attempted to discover queues & topics on my WLS instance, and I get a stack trace.

-----
java.lang.NoClassDefFoundError: weblogic/management/WebLogicObjectName
     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:1356)
     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(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: weblogic.management.WebLogicObjectName
     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)
     ... 8 more
-----

I found some references to including "-Dsun.lang.ClassLoader.allowArraySyntax=true" in the options to Java, but that had no effect.

I am using HermesJMS 1.14, Oracle JDK (1.6.0_35), running on RHEL 5 x86_64.

Here is the classpath section from my hermes-config.xml:

-----
<classpathGroup id="WLS12.1">
<library noFactories="true" jar="/home/wkorb/oracle/middleware/wlserver_12.1/server/lib/wlfullclient.jar"/>
</classpathGroup>
-----

Here is the section that defines my session:

-----
<factory classpathId="WLS12.1">
<provider className="hermes.JNDIConnectionFactory">
<properties>
<property name="initialContextFactory" value="weblogic.jndi.WLInitialContextFactory"/>
<property value="t3://localhost:7001" name="providerURL"/>
<property value="javax/jms/QueueConnectionFactory" name="binding"/>
<property value="weblogic" name="securityPrincipal"/>
<property value="weblogic" name="securityCredentials"/>
</properties>
</provider>
<connection connectionPerThread="false" clientID="">
<session useConsumerForQueueBrowse="false" audit="false" transacted="true" reconnects="0" id="wls12c"/>
</connection>
<extension className="hermes.ext.weblogic.WebLogicJMSAdminFactory">
<properties/>
</extension>
</factory>
-----

Any insight or suggestions would be much appreciated.

Thanks,
Bill
  • 1. Re: WLS 12c JMS & HermesJMS
    Tom B Expert
    Currently Being Moderated
    This looks like a basic classpath issue since I doubt "weblogic/management/WebLogicObjectName" is missing from your full client jar (jar tf wlfullclient.jar to see its contents).

    Some things you can try as a work-around:

    1 - Since you apparently have a full WL install on the same file system as Hermes, you might perhaps try referencing the "weblogic.jar" instead of the full jar, as per the steps James Bayer's blog:

    https://blogs.oracle.com/jamesbayer/entry/hermes_jms_revisited_for_weblo

    2 - Another option that may work is to use the pre-built thin t3 client jar "wlthint3client.jar".

    3 - Have you put the "weblogic.jar" or some other weblogic jar directly on the system classpath of Hermes itself? Perhaps you implicitly did so by running something like setDomainEnv.sh first? If so, then this can conflict with any dynamically loaded weblogic jars. If not, perhaps you can try this as an alternative way to get the classes into the Hermes JVM - but you'll need to ensure that the "library jar" doesn't refer to a weblogic jar.

    HTH,

    Tom
  • 2. Re: WLS 12c JMS & HermesJMS
    wgkorb Newbie
    Currently Being Moderated
    Tom,

    Thanks for the ideas.

    1. I actually tried using weblogic.jar first, but when that didn't work I discovered information that suggestion wlfullclient.jar was the correct approach.

    2. I didn't know about the thin t3 client option. I just tried it, but with the same result.

    3. No, I've no WLS JARs on my system classpath. I scanned all of the JARs included with Hermes, and none of them appear to contain any WLS classes, either.

    This last suggestion gave me a few ideas to try. First, I deleted the JARs from the provider in my Hermes configuration then tried adding various JARs to my system classpath before starting Hermes:

    wlfullclient.jar - Hermes splash screen appears briefly, then Hermes crashes (no error messages anywhere that I could find).
    weblogic.jar - Hermes starts up, when I try to discover objects on my server, I get "No destinations found."
    wlthint3client.jar - Same as w/ weblogic.jar.

    For the "No destinations found" situation, I'm confused. In the WLS console I did the following:

    1. Created a JMS server.
    2. Created a JMS module.
    3. Added to resources to the module: a QueueConnectionFactory & a Queue.

    If I am indeed getting connected to the JMS service, should I not see those resources when I try to discover them?

    Thanks,
    Bill
  • 3. Re: WLS 12c JMS & HermesJMS
    Tom B Expert
    Currently Being Moderated
    For the "No destinations found" situation, I'm confused. In the WLS console I did the following:

    1. Created a JMS server.
    2. Created a JMS module.
    3. Added to resources to the module: a QueueConnectionFactory & a Queue.

    If I am indeed getting connected to the JMS service, should I not see those resources when I try to discover them?
    You may have missed a few steps during configuration that are required to make sure the Queue is active.

    Assuming non-clustered WebLogic:

    - The JMS Server target needs to be configured to specify a WL server.
    - The JMS module target needs to be set to the same WL server as the JMS server.
    - You should configure a "subdeployment" for the module that references the JMS Server.
    - You should reference the name of this subdeployment as part of configuring the Queue.
    (Using a subdeployment for setting up the association between a Queue and its JMS Server(s) isn't strictly required but is a highly recommended best practice, per http://docs.oracle.com/cd/E24329_01/web.1211/e24385/best_practice.htm#JMSAD455)

    To verify the queue is up, you should be able to see the queue on one of the console's monitoring screens, and you should also be able to write a simple thin-t3-jar JMS client that looks up the CF and Q in JNDI and sends a message. The console also provides "message management" screens that allow an admin to inject a test message and/or view messages...

    HTH,

    Tom
  • 4. Re: WLS 12c JMS & HermesJMS
    wgkorb Newbie
    Currently Being Moderated
    Tom,

    I had not done anything with subdeployments, so I think you may be correct. I will review that documentation and see if I can get this resolved. I've been using OpenMQ for several years, but this is my first foray into WLS JMS.

    Thanks,
    Bill

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points