Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 365702

Summary: Useless warning on javax.* types
Product: [Tools] AspectJ Reporter: Yoann Antoviaque <yoann.antoviaque>
Component: LTWeavingAssignee: aspectj inbox <aspectj-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Yoann Antoviaque CLA 2011-12-06 05:40:21 EST
Build Identifier: M20100909-0800

Using aspectj to add monitoring on oracle database driver we do not need to weave javax.* types, therefore do not set weaveJavaxPackages to true.
Still, we get "[JClassLoader@65b60280] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified" each time the application server is started.

After looking at the source, it seems that org.aspectj.weaver.tools.WeavingAdaptor.weaveClass() calls couldWeave() before accept() therefore couldWeave prints the warning even if no javax class should have been woven.

I think these calls should be made in reverse order or the warning changed to info...

Reproducible: Always

Steps to Reproduce:
1. setup lt weaving agent on jonas or probably any other application server without weaveJavaxPackages set to true and no aspect on javax.* classes
2. start server
3. check application server startup log