[jboss-as7-dev] Setting up implicit dependency on JMS provider impl module
Andrig Miller
anmiller at redhat.com
Thu Apr 21 11:10:33 EDT 2011
----- Original Message -----
> From: "Jaikiran Pai" <jpai at redhat.com>
> To: jboss-as7-dev at lists.jboss.org
> Sent: Thursday, April 21, 2011 6:05:35 AM
> Subject: Re: [jboss-as7-dev] Setting up implicit dependency on JMS provider impl module
> Comments inline.
>
> On Wednesday 20 April 2011 06:39 PM, David M. Lloyd wrote:
> > On 04/20/2011 02:38 AM, Jaikiran Pai wrote:
> >> When testing this, it runs into this exception:
> >>
> >> 12:51:38,061 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)
> >> Caused by:
> >> java.lang.ClassNotFoundException:
> >> org.hornetq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy
> >> from [Module "deployment.test.war:main" from Service Module Loader]
> >> 12:51:38,061 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at
> >> org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:184)
> >> 12:51:38,062 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at
> >> org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:357)
> >> 12:51:38,062 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at
> >> org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:306)
> >> 12:51:38,063 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at
> >> org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:100)
> >> 12:51:38,068 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at
> >> org.hornetq.core.client.impl.ClientSessionFactoryImpl$1.run(ClientSessionFactoryImpl.java:1162)
> >> 12:51:38,069 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) ...
> >> 28 more
> >>
> >>
> >> Adding a Dependencies: org.hornetq to the .war/META-INF/MANIFEST.MF
> >> of
> >> the war and redeploying the war gets me past this issue. But
> >> shouldn't
> >> this dependency on our internal JMS provider impl module be setup
> >> automatically by one of our deployment unit processors, instead of
> >> the
> >> user having to do it?
> >
> > No we should not need the dependency at all. I think the problem
> > here
> > is HornetQ using the TCCL (from
> > org.hornetq.core.client.impl.ClientSessionFactoryImpl$1.run) to load
> > one
> > of its own classes
> > (org.hornetq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy).
> > It probably should be using its own class loader for this
> > purpose, IMO.
> >
> Yes indeed! HornetQ ClientSessionFactoryImpl uses TCCL:
>
> AccessController.doPrivileged(new PrivilegedAction<Object>()
> {
> public Object run()
> {
> ClassLoader loader =
> Thread.currentThread().getContextClassLoader();
> try
> {
> Class<?> clazz =
> loader.loadClass(connectionLoadBalancingPolicyClassName);
>
>
> So how do we fix such issues in thirdparty libraries?
>
> P.S: Is this worth a JIRA?
This is absolutely a JIRA, as HornetQ is our own code. Not really a third-party library. The HornetQ team is gearing up for getting the latest code integrated into AS 7, so this is a critical issue that should be fixed ASAP.
Just open the JIRA in the HornetQ project.
Andy
>
> -Jaikiran
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
More information about the jboss-as7-dev
mailing list