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 112755 - Profiler fails if project main class moved
Summary: Profiler fails if project main class moved
Status: VERIFIED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-14 15:35 UTC by Maksim Khramov
Modified: 2007-10-04 11:32 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 Maksim Khramov 2007-08-14 15:35:16 UTC
Create new Java application project.
Rename Main class or move it to other package.
Run Profiler
Profiler fails with "java.lang.NoClassDefFoundError" message in output.

In case of simple project running the IDE asks for main class name before run.
Comment 1 Jiri Sedlacek 2007-08-15 15:31:33 UTC
java.lang.NullPointerException
        at java.io.ObjectOutputStream$BlockDataOutputStream.getUTFLength(ObjectOutputStream.java:2097)
        at java.io.ObjectOutputStream$BlockDataOutputStream.writeUTF(ObjectOutputStream.java:1968)
        at java.io.ObjectOutputStream.writeUTF(ObjectOutputStream.java:841)
        at com.sun.tools.profiler.wireprotocol.InitiateInstrumentationCommand.writeObject
(InitiateInstrumentationCommand.java:83)
        at com.sun.tools.profiler.wireprotocol.WireIO.sendComplexCommand(WireIO.java:60)
        at com.sun.tools.profiler.ProfilerClient.sendComplexCmdToServer(ProfilerClient.java:1523)
        at com.sun.tools.profiler.ProfilerClient.sendCommandAndGetResponse(ProfilerClient.java:1300)
        at com.sun.tools.profiler.ProfilerClient.startTargetApp(ProfilerClient.java:266)
        at com.sun.tools.profiler.TargetAppRunner.connectToStartedVMAndStartTA(TargetAppRunner.java:577)
        at com.sun.tools.profiler.TargetAppRunner.connectToStartedVMAndStartTA(TargetAppRunner.java:176)
        at com.sun.tools.profiler.TargetAppRunner.connectToStartedVMAndStartTA(TargetAppRunner.java:171)
        at org.netbeans.modules.profiler.NetBeansProfiler$4.doInBackground(NetBeansProfiler.java:596)
        at com.sun.tools.profiler.ui.SwingWorker$3.run(SwingWorker.java:91)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:964)
Comment 2 Jiri Sedlacek 2007-08-15 16:26:19 UTC
Actually the above exception occurs only when a Profiling Point was defined in moved/renamed class. Otherwise just the 
NoClassDefFoundError appears in Output and the profiled application is terminated.
Comment 3 Jiri Sedlacek 2007-08-21 12:15:40 UTC
Dialog is now opened before profiling to select the main class. However, the selected main class is used only for
profiling and isn't set for the Project. Filed a RFE to implement this on j2seproject side: Issue 113321.

Fixed for Beta1.
Comment 4 Maksim Khramov 2007-10-04 11:32:24 UTC
Verified in build 2007100312