Bug 282974 - [evaluation] ClassCastException from watch expression
Summary: [evaluation] ClassCastException from watch expression
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 275704 288978 289668 293897 370403 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-07-09 04:02 EDT by Bruno CLA
Modified: 2022-11-27 16:35 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno CLA 2009-07-09 04:02:37 EDT
Build ID: 20090621-0832

Steps To Reproduce:
1. Launch Tomcat
2. The debug mode switch on and open the class class.java
3. Click on Resume (F8)


More information:
Error
Thu Jul 09 09:54:10 CEST 2009
Exception processing async thread queue

java.lang.ClassCastException: org.eclipse.jdt.internal.debug.core.model.JDIClassType
	at org.eclipse.jdt.internal.debug.eval.ast.instructions.Instruction.popValue(Instruction.java:114)
	at org.eclipse.jdt.internal.debug.eval.ast.instructions.PushFieldVariable.execute(PushFieldVariable.java:50)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.Interpreter.execute(Interpreter.java:66)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine$1$EvaluationRunnable.run(ASTEvaluationEngine.java:483)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread.runEvaluation(JDIThread.java:677)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine$EvalRunnable.run(ASTEvaluationEngine.java:520)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:2751)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 1 Darin Wright CLA 2009-07-09 12:13:52 EDT
Some evaluation is being performed. Do you have any expressions in the Expressions view? Did you just select a variable? What do you mean by "class.java"? (java.lang.Class?)
Comment 2 Darin Wright CLA 2009-07-10 09:55:16 EDT
Received the following update from bug reporter. Based on this,  it looks like there is a class load breakpoint causing java.lang.Class to be opened (which is fine), and there was some Watch expression that caused the original error (class cast exception).


"Yes I have expressions in the expression view, so I deleted my expressions and relaunched the sysdeo tomcat plugin. The error is gone.
Then I added new expressions but there is no more error... I cannot reproduce the error, sorry.

No I didnt select any variable. The only thing I do is to launch the sysdeo tomcat plugin and wait for tomcat to be ready, but once Eclipse displays this:

10-juil.-2009 9:48:21 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
10-juil.-2009 9:48:21 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled


Eclipse switchs to Debug mode, opens the java.lang.Class file. The stacktrace at this moment is: 
Thread [main] (Class load: ExportManagerImpl)    
    Class<T>.getDeclaredConstructors0(boolean) line: not available [native method]    
    Class<T>.privateGetDeclaredConstructors(boolean) line: 2357    
    Class<T>.getConstructor0(Class[], int) line: 2671    
    Class<T>.getDeclaredConstructor(Class...) line: 1953    
    CglibSubclassingInstantiationStrategy(SimpleInstantiationStrategy).instantiate(RootBeanDefinition, String, BeanFactory) line: 54    
    DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).instantiateBean(String, RootBeanDefinition) line: 756    
    DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).createBeanInstance(String, RootBeanDefinition, Object[]) line: 721    
    DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).createBean(String, RootBeanDefinition, Object[]) line: 384    
    DefaultListableBeanFactory(AbstractBeanFactory).getBean(String, Class, Object[]) line: 270    
    DefaultListableBeanFactory(AbstractBeanFactory).getBean(String) line: 160    
    BeanDefinitionValueResolver.resolveReference(String, RuntimeBeanReference) line: 261    
    BeanDefinitionValueResolver.resolveValueIfNecessary(String, Object) line: 109    
    DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).applyPropertyValues(String, RootBeanDefinition, BeanWrapper, PropertyValues) line: 1099    
    DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).populateBean(String, RootBeanDefinition, BeanWrapper) line: 861    
    DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).createBean(String, RootBeanDefinition, Object[]) line: 421    
    AbstractBeanFactory$1.getObject() line: 251    
    DefaultListableBeanFactory(DefaultSingletonBeanRegistry).getSingleton(String, ObjectFactory) line: 156    
    DefaultListableBeanFactory(AbstractBeanFactory).getBean(String, Class, Object[]) line: 248    
    DefaultListableBeanFactory(AbstractBeanFactory).getBean(String) line: 160    
    DefaultListableBeanFactory.preInstantiateSingletons() line: 287    
    XmlWebApplicationContext(AbstractApplicationContext).refresh() line: 352    
    ContextLoader.createWebApplicationContext(ServletContext, ApplicationContext) line: 244    
    ContextLoader.initWebApplicationContext(ServletContext) line: 187    
    ContextLoaderListener.contextInitialized(ServletContextEvent) line: 49    
    StandardContext.listenerStart() line: 3764    
    StandardContext.start() line: 4216    
    StandardHost(ContainerBase).start() line: 1014    
    StandardHost.start() line: 736    
    StandardEngine(ContainerBase).start() line: 1014    
    StandardEngine.start() line: 443    
    StandardService.start() line: 448    
    StandardServer.start() line: 700    
    Catalina.start() line: 552    
    NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]    
    NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39    
    DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25    
    Method.invoke(Object, Object...) line: 585    
    Bootstrap.start() line: 295    
    Bootstrap.main(String[]) line: 433  
"
Comment 3 Michael Rennie CLA 2009-09-17 09:47:00 EDT
*** Bug 288978 has been marked as a duplicate of this bug. ***
Comment 4 Michael Rennie CLA 2009-09-17 09:47:51 EDT
*** Bug 289668 has been marked as a duplicate of this bug. ***
Comment 5 Michael Rennie CLA 2009-09-17 09:50:13 EDT
*** Bug 275704 has been marked as a duplicate of this bug. ***
Comment 6 Michael Rennie CLA 2013-02-28 16:36:35 EST
*** Bug 293897 has been marked as a duplicate of this bug. ***
Comment 7 Michael Rennie CLA 2013-02-28 16:37:33 EST
*** Bug 370403 has been marked as a duplicate of this bug. ***
Comment 8 Eclipse Genie CLA 2020-11-03 07:43:35 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 9 Eclipse Genie CLA 2022-11-27 16:35:25 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.