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 178366 - ClassCastException: Resolve$ResolveError cannot be cast to Symbol$ClassSymbol
Summary: ClassCastException: Resolve$ResolveError cannot be cast to Symbol$ClassSymbol
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Martin Krauskopf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-09 06:34 UTC by Alexandr Scherbatiy
Modified: 2009-12-18 04:21 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 Alexandr Scherbatiy 2009-12-09 06:34:08 UTC
NetBeans-JavaFX-Soma  #60

  Product Version         = NetBeans IDE 6.8 RC1 (Build 200911252200)
(#3c4d4f8d3d55)
  Operating System        = Windows XP version 5.1 running on x86
  Java; VM; Vendor        = 1.6.0_15; Java HotSpot(TM) Client VM 14.1-b02; Sun
Microsystems Inc.


Steps to reproduce:

- Copy the code to the editor:
----------------------------------------------
import javafx.stage.Stage;
import javafx.stage.Screen;



var width = Screen.primary.bounds.

Stage{

}
----------------------------------------------

- Position a cursor after 'var width = Screen.primary.bounds.' line
- Press <Ctrl+Space>
- Select bounds

The exception pops up:

java.lang.ClassCastException: com.sun.tools.mjavac.comp.Resolve$ResolveError cannot be cast to com.sun.tools.mjavac.code.Symbol$ClassSymbol
	at com.sun.tools.mjavac.comp.Attr$IdentAttributer.visitMemberSelect(Attr.java:276)
	at com.sun.tools.mjavac.comp.Attr$IdentAttributer.visitMemberSelect(Attr.java:265)
	at com.sun.tools.mjavac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1657)
	at com.sun.tools.mjavac.comp.Attr.attribIdent(Attr.java:261)
	at com.sun.tools.mjavac.main.JavaCompiler.resolveIdent(JavaCompiler.java:591)
	at com.sun.tools.mjavac.model.JavacElements.nameToSymbol(JavacElements.java:171)
	at com.sun.tools.mjavac.model.JavacElements.getPackageElement(JavacElements.java:146)
	at com.sun.tools.mjavac.model.JavacElements.getPackageElement(JavacElements.java:62)
	at org.netbeans.modules.javafx.editor.completion.environment.MemberSelectTreeEnvironment.addPackageContent(MemberSelectTreeEnvironment.java:184)
	at org.netbeans.modules.javafx.editor.completion.environment.MemberSelectTreeEnvironment.inside(MemberSelectTreeEnvironment.java:150)
	at org.netbeans.modules.javafx.editor.completion.environment.MemberSelectTreeEnvironment.inside(MemberSelectTreeEnvironment.java:67)
	at org.netbeans.modules.javafx.editor.completion.JavaFXCompletionQuery.resolveCompletion(JavaFXCompletionQuery.java:397)
	at org.netbeans.modules.javafx.editor.completion.JavaFXCompletionQuery.run(JavaFXCompletionQuery.java:344)
	at org.netbeans.modules.javafx.editor.completion.JavaFXCompletionQuery.run(JavaFXCompletionQuery.java:77)
	at org.netbeans.modules.javafx.source.parsing.LegacyUserTask.run(LegacyUserTask.java:68)
	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:129)
	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:113)
	at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:190)
Caused: org.netbeans.modules.parsing.spi.ParseException
	at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:192)
	at org.netbeans.modules.parsing.impl.TaskProcessor.runWhenScanFinished(TaskProcessor.java:221)
	at org.netbeans.modules.parsing.api.ParserManager.parseWhenScanFinished(ParserManager.java:106)
	at org.netbeans.api.javafx.source.JavaFXSource.runWhenScanFinished(JavaFXSource.java:273)
Caused: java.io.IOException
	at org.netbeans.api.javafx.source.JavaFXSource.runWhenScanFinished(JavaFXSource.java:276)
	at org.netbeans.modules.javafx.editor.completion.JavaFXCompletionQuery.query(JavaFXCompletionQuery.java:241)
	at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:218)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:602)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1084)
Comment 1 Alexandr Scherbatiy 2009-12-09 06:34:32 UTC
See exception report:
http://statistics.netbeans.org/analytics/detail.do?id=163511
Comment 2 Martin Krauskopf 2009-12-09 07:34:17 UTC
Reproducible, thanks for the catch.
Comment 3 Martin Krauskopf 2009-12-10 01:46:21 UTC
Fixed: #fd1712e52782
Comment 4 Alexandr Scherbatiy 2009-12-18 04:13:42 UTC
Verified in

Now I see another exception 171605
Comment 5 Alexandr Scherbatiy 2009-12-18 04:21:59 UTC
verified in NetBeans-JavaFX-Soma: #69