Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] WebLogic 9.2 + AspectJ = boom?

I’ve give it a whirl on Monday – I’m going to pretend to not work this weekend.  Thanks for all the help – I’ll let you know how things turn out.

 

Mike

 

From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Andy Clement
Sent: February-07-09 3:55 PM
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] WebLogic 9.2 + AspectJ = boom?

 

Hi Michael,

Thanks for the log.  This is the most relevant bit and seeing a bit more of the stack reminded me of a problem we saw a while ago...

'java.lang.com.cryptologic.bsg.model.communication.BsgResponseMessage' in repository java.lang.ClassNotFoundException: java.lang.com.cryptologic.bsg.model.communication.BsgResponseMessage not found - unable to determine URL
java.lang.ClassNotFoundException: java.lang.com.cryptologic.bsg.model.communication.BsgResponseMessage not found - unable to determine URL
        at org.aspectj.apache.bcel.util.ClassLoaderRepository.loadClass(ClassLoaderRepository.java:268)
        at org.aspectj.weaver.bcel.BcelWorld.lookupJavaClass(BcelWorld.java:308)

The mechanism we use for caching at the lowest level relies on a particular classloader behaviour and if that behaviour isn't working quite right then you see a message like that 'unable to determine URL'.  I've previously seen it on an SAP netweaver setup.

The behaviour we rely on is:

          url = "" + ".class");

If this is misbehaving, there is a way to revert to another (slightly less optimal) strategy that does not rely on this call.

To change, you need to add a configuration setting for the loadtime weaver to your weaver options section of aop.xml.

<weaver options="-Xset:bcelRepositoryCaching=false"/>

(Merge that -Xset option into whatever options you already specify)

I dont know why the particular classloader on this setup is not behaving (when it is in another configuration)...

This setting will be fine to include even on the deployment of the app into the currently working environment.

Andy.

2009/2/7 Michael Laccetti <michael@xxxxxxxxxxxx>

I've attached the log; if the ML doesn't allow it, I'll stick it in pastebin or something else.  I just looked through the stack – apparently it looks for com.cryptologic... before it looks for java.lang.com...; it just cannot find it.  Could this have something to do with the WebLogic classloader?

 

The biggest problem with the clusters is the fact that we are performing UAT on the application with a third party, so taking the cluster down, or re-deploying the application requires a lot of synchronization, etc, etc.  If I can figure out what is going wrong so that I only have to fix one thing, then it'll be a lot easier.  (And if this happens when we deploy to production?  Ugh.)

 

Mike

 

From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Andy Clement
Sent: February-06-09 5:05 PM


To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] WebLogic 9.2 + AspectJ = boom?

 

I had a look over the aspect - looks good to me :)  Given that it runs fine on one cluster and not another - I'm not really suspecting the aspect.  I really would like to see the rest of that stack trace for the classnotfound - to confirm who was trying to find the type.  If you did turn on AspectJ trace - did you get some trace out then?  According to http://www.eclipse.org/aspectj/doc/released/pdguide/trace.html it should go to stderr?

I would also try turning on verbose mode for the load time weaver, that includes other information that may tell us what is happening.  That is as simple as editing aop.xml and modifying the weaver section to include <weaver options="-verbose"/>

I guess we just need to find the difference between your two clusters. I will dig into that code that adds java.lang as I believe it is wrong to prefix anything that is already qualified and causes confusion when it comes out as a secondary symptom like this.

Andy.

2009/2/6 Michael Laccetti <michael@xxxxxxxxxxxx>

I'm pretty confident – the Aspect and classes referenced by it are all packed in a common jar that is deployed in WEB-INF/lib (in turn part of an EAR).  The reason I am curious is the fact that the EAR deploys perfectly on one 9.2 cluster, but not another.

 

I've pastebin'd some code – you can see the aspect in all of its hideous glory here: http://papernapkin.org/pastebin/view/4337/

 

(Yes, I'm a noob with AOP.  Try not to burn me too much.)

 

Mike

 

From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Andy Clement
Sent: February-06-09 12:43 PM
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] WebLogic 9.2 + AspectJ = boom?

 

Hi Mike,

Are you confident that 'com.cryptologic.bsg.model.communication.BsgResponseMessage' is on the classpath and accessible to the weaver?  Sometimes, as a 'last resort' AspectJ tries some of the imported prefixes on the front of types it is having trouble finding - to see if it can locate it.  A default imported prefix is 'java.lang'.  It might be that code which has added the rogue prefix, but the underlying symptom is likely to be that it couldn't find the 'com.cryptologic.bsg.model.communication.BsgResponseMessage' type.

With the failure, is there an ajcore.* file produced containing more information?

How is the BsgResponseMessage referenced? Are you binding it in a pointcut?  Is that an annotation style pointcut '@Pointcut' or a code style pointcut 'pointcut'?

cheers,
Andy.

2009/2/6 Michael Laccetti <michael@xxxxxxxxxxxx>

I deployed our application to a WebLogic 9.2 cluster, and ran into some problems.  In our development environment, everything worked okay, but in staging...  Not so much.  We use the same JDK, and the Spring Agent for LTW.  The application deploys okay, and the REST services function as expected, but the AOP stuff is non-operational.  There was no errors or warnings, so I turned on AspectJ logging.  Now, I see the following in the logs:

19:43:21.127 [ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)' E Unable to find class 'java.lang.com.cryptologic.bsg.model.communication.BsgResponseMessage' in repository java.lang.ClassNotFoundException: java.lang.com.cryptologic.bsg.model.communication.BsgResponseMessage not found - unable to determine URL

I'm not sure where the "java.lang" part is coming from - this isn't prepended on the development environment, since it works properly.  Anybody have a clue as to what is going on?

Mike
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users

 


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users

 


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users

 


Back to the top