users@glassfish.java.net

Re: Upgrading from 3.1.1 -> 3.1.2 - weld/com.sun.messaging issues?

From: Sahoo <sanjeeb.sahoo_at_oracle.com>
Date: Thu, 19 Jan 2012 22:26:50 +0530

Hi Robert,

Have you embedded imqjmsra.jar or some such imq library in your bundle?
What packages is your bundle exporting then? The fact that Weld is able
to load com.sun.messaging.jmq.jmsclient.JMSXAQueueSessionImpl, but not
its dependency like com.sun.messaging.jms.ra.ManagedConnection makes me
think that your bundle is perhaps exporting
com.sun.messaging.jmq.jmsclient package but not
com.sun.messaging.jms.ra. If this is not the correct guess, I am afraid
you have to give us a more concrete example to find out what's going on.

Thanks,
Sahoo
On Thursday 19 January 2012 08:54 PM, Robert Weeks wrote:
> Hello -
>
> I was just experimenting on getting our bundles/apps to run in the latest 3.1.2 - and saw an issue that first arose when we were trying to upgrade weld to 1.1.4 in GlassFish 3.1.1 to help another issue we were having.
>
> When deploying one of our apps there, came across an issue with weld and classloading of certain com.sun.messaging libraries - some of which come from imqjmsra it seems - but we didn't have this issue in 3.1.1 at all.
>
> Since seeing the same issue in 3.1.1 with the weld update - I am wondering if anyone else is seeing issues like this as well. Seems some of the jms embedded libs aren't available to weld/cdi anymore?
>
> The bundle in question does have ejb's in it (timer, mdb, singleton) as well as utilizes some of the imq libraries for JMX monitoring of remote destinations.
>
> Some of the issues we are seeing:
>
> [#|2012-01-19T10:03:10.591-0500|INFO|glassfish3.1.2|org.jboss.weld.ClassLoading|_ThreadID=18;_ThreadName=Thread-3;|WELD-000119 Not generating any bean definitions from com.sun.messaging.jmq.jmsclient.JMSXAQueueSessionImpl because of underlying class loading error|#]
>
> [#|2012-01-19T10:03:10.592-0500|INFO|glassfish3.1.2|org.jboss.weld.ClassLoading|_ThreadID=18;_ThreadName=Thread-3;|catching
> org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class com.sun.messaging.jmq.jmsclient.JMSXAQueueSessionImpl
> at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:152)
> at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:86)
> at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:115)
> at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:171)
> at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:336)
> ...
> Caused by: org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class com.sun.messaging.jmq.jmsclient.XAQueueSessionImpl
> at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:152)
> at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:139)
> ...
> Caused by: org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class com.sun.messaging.jmq.jmsclient.XASessionImpl
> at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:152)
> ...
> Caused by: org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class com.sun.messaging.jmq.jmsclient.UnifiedSessionImpl
> at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:152)
> at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:139)
> at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:118)
> Caused by: java.lang.NoClassDefFoundError: Lcom/sun/messaging/jms/ra/ManagedConnection;
> at java.lang.Class.getDeclaredFields0(Native Method)
> at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
> at java.lang.Class.getDeclaredFields(Class.java:1743)
> ...
>
> and so on.
>
> Thanks for any insight.
>
>
>
>
>
> Robert Weeks
> Lead Developer - Framework and UI
> EXTENSION, INC.
> Email: rweeks_at_ext-inc.com
> Office: 260-797-0200 x4228
> General: 877-207-3753
> www.OpenTheRedBox.com
>