We have a number of applications on an application server (Weblogic 11g) and some of these have MDB's which need to use an additional JMS provider provided by a remote ActiveMQ v5.9.0. This works fine by populating the JNDI and adding the ActiveMQ client jars ( activemq-client-5.9.0.jar, hawtbuf-1.9.jar , osgi.core-4.3.0.jar , slf4j-api-1.7.5.jar , slf4j-log4j12-1.7.5.jar, log4j-1.2.17.jar) to JVM classpath. As the applications use log4j, we needed to alter the class-loading order (for log4j) to use the application-supplied configuration - rather than the jars from the JVM classpath. Otherwise some applications were logging to the wrong location. This 'solution' is not ideal as it requires also redefining the (log4j) class-loading order for applications not impacted by the change in JMS-provider.
Rather than updating the JVM classpath, we have attempted to include the 6 ActiveMQ jars in each application (EAR's lib folder). However this results in errors accessing the remote ActiveMQ destinations. ( In Weblogic terms, the JMS Connection factory and destinations are defined in a Foreign Server - which also includes the mapping of ActiveMQ JNDI names to queues). The However this solution does not work as expected. It results in a 'ClassNotFound' i.e. javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.activemq.jndi.ActiveMQInitialContextFactory [Root exception is java.lang.ClassNotFoundException: >From analysis of classloading (via jconsole) it would seem that the above class is loaded ("org/apache/activemq/jndi/ActiveMQInitialContextFactory success (13.11 ms)" - but access to some dependency (JNDI?) fails. A more complete stack-trace contains: javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.activemq.jndi.ActiveMQInitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.apache.activemq.jndi.ActiveMQInitialContextFactory] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.<init>(InitialContext.java:197) at weblogic.deployment.jms.ForeignOpaqueReference.getReferent(ForeignOpaqueReference.java:182) Adding a jndi.properties file to a jar in the application has not helped. (We also cannot use the Weblogic-supplied 'Messaging-Bridge'). In summary, moving the ActiveMQ jars from the JVM classpath into the EARs has not resulted in the required results. Perhaps someone has succeeded in getting a similar setup working (on Weblogic 11g). Any help would be greatly appreciated. -- View this message in context: http://activemq.2283324.n4.nabble.com/client-access-to-ActiveMQ-from-Weblogic-EAR-with-embedded-ActiveMQ-client-jars-tp4712485.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.