Bug 502093 - Weaving agent using java.util.logging keeps LTW from working in containers
Summary: Weaving agent using java.util.logging keeps LTW from working in containers
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: LTWeaving (show other bugs)
Version: 1.8.9   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-24 07:40 EDT by Alexander Kriegisch CLA
Modified: 2016-09-24 07:40 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kriegisch CLA 2016-09-24 07:40:32 EDT
Lately I tried to run JBoss WildFly with aspectjweaver.jar on the command line as a weaving agent. But all I got was strange error messages and WildFly did not boot up. The problem is described here:
https://issues.jboss.org/browse/WFLY-895

In comments in that ticket users describe hacky workarounds and someone mentions that the problem occurs with several Java agents initialising java.util.logging.manager in a way unexpected by the container. For example, WildFly expects it to be set to org.jboss.logmanager.LogManager.

I was curious and tried to find places where aspectjweaver.jar uses java.util.logging classes. Basically I only found this one:
http://git.eclipse.org/c/aspectj/org.aspectj.git/tree/weaver5/java5-src/org/aspectj/weaver/tools/Jdk14Trace.java#n13

I thought that if this is really the only problem source, maybe it could be fixed easily by logging to console via System.out.println (ugly, I know). I think a Java agent loaded so early into the JVM should try to rely on as few resources possibly used by programs loaded later as possible.

What do you think, Andy?