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 69951 - ClassCastException in Wireprotocol
Summary: ClassCastException in Wireprotocol
Status: VERIFIED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords:
: 73373 76858 80190 80866 (view as bug list)
Depends on:
Blocks: 73536
  Show dependency tree
 
Reported: 2005-12-06 15:43 UTC by Jiri Sedlacek
Modified: 2007-04-03 14:35 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 Jiri Sedlacek 2005-12-06 15:43:47 UTC
Got this exception when starting Profile Project on TomcatServletExample on 
SJSAS 8.1 PE, CPU, Entire Application. Live results window was opened and 
focused and Refresh automatically was on:

java.lang.ClassCastException: 
com.sun.tools.profiler.wireprotocol.DumpResultsResponse
	at com.sun.tools.profiler.ProfilerClient.connectToServer
(ProfilerClient.java:1321)
	at com.sun.tools.profiler.ProfilerClient.establishConnectionWithServer
(ProfilerClient.java:134)
	at com.sun.tools.profiler.TargetAppRunner.connectToStartedVMAndStartTA
(TargetAppRunner.java:577)
	at com.sun.tools.profiler.TargetAppRunner.connectToStartedVMAndStartTA
(TargetAppRunner.java:171)
	at com.sun.tools.profiler.TargetAppRunner.connectToStartedVMAndStartTA
(TargetAppRunner.java:166)
	at org.netbeans.modules.profiler.NetBeansProfiler.connectToStartedApp
(NetBeansProfiler.java:528)
[catch] at org.netbeans.modules.profiler.j2ee.J2EEProfilerSPI$3.run
(J2EEProfilerSPI.java:527)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 iformanek 2005-12-07 15:00:01 UTC
Hmm, from digging through the code this is very much impossible. The monitoring 
thread, that refreshes the live results (that cause the DumResultsResponse to 
be received) is nto started until after the connectToServer method finishes. 
Are you able to reproduce? Can you get threads dump of the profiled VM when 
this happens? Do you remember the stape that lead to this (i.e. previous 
profiling finishing in some non-standard way)?
Comment 2 Jiri Sedlacek 2005-12-07 15:11:53 UTC
I've seen this two times, but I'm not able to reproduce it. I've just played 
with webapp profiling, several times profiled CPU and watched live results, no 
problems when finishing previous profiling session. I'll try to provide more 
info if I see this again.
Comment 3 iformanek 2005-12-07 19:00:15 UTC
Closing for now, please reopen when you get this again.
Comment 4 Jiri Sedlacek 2006-01-02 14:09:59 UTC
Seen again: profiled memory alloc, stopped profiling and tried to start memory 
liveness:

*********** Exception occurred ************ at 2:58 PM on Jan 2, 2006
java.lang.ClassCastException: 
com.sun.tools.profiler.wireprotocol.VMPropertiesResponse
        at com.sun.tools.profiler.ProfilerClient.forceObtainedResultsDump
(ProfilerClient.java:530)
        at 
org.netbeans.modules.profiler.LiveResultsWindow.callForceObtainedResultsDump
(LiveResultsWindow.java:332)
        at org.netbeans.modules.profiler.LiveResultsWindow.access$600
(LiveResultsWindow.java:55)
        at org.netbeans.modules.profiler.LiveResultsWindow$5.run
(LiveResultsWindow.java:356)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:471)
[catch] at org.openide.util.RequestProcessor$Processor.run
(RequestProcessor.java:904)
*********** Exception occurred ************ at 2:58 PM on Jan 2, 2006
java.lang.ClassCastException: 
com.sun.tools.profiler.wireprotocol.DumpResultsResponse
        at com.sun.tools.profiler.ProfilerClient.connectToServer
(ProfilerClient.java:1321)
        at com.sun.tools.profiler.ProfilerClient.establishConnectionWithServer
(ProfilerClient.java:134)
        at com.sun.tools.profiler.TargetAppRunner.connectToStartedVMAndStartTA
(TargetAppRunner.java:577)
        at com.sun.tools.profiler.TargetAppRunner.connectToStartedVMAndStartTA
(TargetAppRunner.java:171)
        at com.sun.tools.profiler.TargetAppRunner.connectToStartedVMAndStartTA
(TargetAppRunner.java:166)
        at org.netbeans.modules.profiler.NetBeansProfiler.connectToStartedApp
(NetBeansProfiler.java:532)
        at org.netbeans.modules.profiler.ant.NBProfileDirectTask$1.run
(NBProfileDirectTask.java:266)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
[catch] at java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:163)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 5 Maros Sandor 2006-01-30 15:31:13 UTC
I got this exception while the profiler was starting up (performance profiling,
one root method, java core classes filtered). The last profiled process was
still running (because of Issue #72013). Exception raised when I switched
between the zombie and current output tab.
Comment 6 Jiri Sedlacek 2006-03-08 11:24:43 UTC
*** Issue 73373 has been marked as a duplicate of this issue. ***
Comment 7 Jiri Sedlacek 2006-03-08 11:26:05 UTC
Increasing priority as it occurs more frequently.
Comment 8 ehucka 2006-05-25 14:21:27 UTC
*** Issue 76858 has been marked as a duplicate of this issue. ***
Comment 9 Tomas Hurka 2006-07-13 15:40:44 UTC
Fix in progress...
Comment 10 Tomas Hurka 2006-07-13 18:40:02 UTC
*** Issue 80190 has been marked as a duplicate of this issue. ***
Comment 11 Tomas Hurka 2006-07-13 21:56:09 UTC
Fixed in trunk.
Comment 12 Tomas Hurka 2006-07-20 12:28:56 UTC
Fix merged to release55 branch
Comment 13 Tomas Hurka 2006-07-22 15:09:53 UTC
*** Issue 80866 has been marked as a duplicate of this issue. ***
Comment 14 Jiri Sedlacek 2007-04-03 14:35:41 UTC
Haven't seen since the fix.