This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 130444 - Netbeans Profiler with aspectj5 doesn't work
Summary: Netbeans Profiler with aspectj5 doesn't work
Status: RESOLVED DUPLICATE of bug 107545
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-18 18:25 UTC by xigua
Modified: 2008-03-19 21:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description xigua 2008-03-18 18:25:47 UTC
I am trying out the Netbeans 6 profiler 1.6.2 with an webapp deployed to Weblogic 9.2. Our application uses AspectJ5
(1.5.4) and I got thousands of "AspectJ5 does not weave hotswapped class" exception during startup. For example:

<Mar 18, 2008 1:20:29 PM EDT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM)
Client VM Version 1.5.0_12-b04 from Sun Microsystems Inc.>
java.lang.Exception: AspectJ5 does not weave hotswapped class (sun/misc/Signal$1)
        at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:55)
        at sun.instrument.TransformerManager.transform(TransformerManager.java:122)
        at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:155)
        at org.netbeans.lib.profiler.server.system.Classes.doRedefineClasses(Native Method)
        at org.netbeans.lib.profiler.server.system.Classes.redefineClasses(Classes.java:142)
        at org.netbeans.lib.profiler.server.ProfilerInterface.instrumentMethodGroupNow(ProfilerInterface.java:1077)
        at org.netbeans.lib.profiler.server.ProfilerInterface.getAndInstrumentClasses(ProfilerInterface.java:633)
        at org.netbeans.lib.profiler.server.ProfilerInterface.classLoadHook(ProfilerInterface.java:871)
        at sun.misc.Signal.dispatch(Signal.java:189)

From the stack trace, it seemed to me that Netbeans profiler is also using a aspectj5 agent for load time weaving. 

In our startup script, the aspectJ and netbeans agents are configured as following:

@REM ============== ASPECTJ Startup Option =================
set ASPECTJ_OPTION=-javaagent:c:\tools\aspectj1.5.4\lib\aspectjweaver.jar
@REM =======================================================

SET JAVA_OPTIONS=-agentpath:"C:\Program Files\NetBeans
6.0\profiler2\lib\deployed\jdk15\windows\profilerinterface.dll=\"C:\Program Files\NetBeans 6.0\profiler2\lib\"",5140
%JAVA_OPTIONS%

Then I commented out our aspectJ agent and the startup was fine, the profiler was attached and the application seemed
started up fine. however, my application doesn't work correctly any more.

PS: In our webapp, we also uses spring 2.0.1 where some other AOP stuff is used as well.
Comment 1 xigua 2008-03-18 18:29:28 UTC
Platform: Windows XP Pro
Java vm: Sun 1.5.0_12
Comment 2 J Bachorik 2008-03-19 21:26:20 UTC

*** This issue has been marked as a duplicate of 107545 ***