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 197290

Summary: ClassCastException: org.netbeans.modules.php.editor.model.impl.FileScopeImpl cannot be cast to org.netbeans.modules.php.editor.model.NamespaceScope
Product: php Reporter: Exceptions Reporter <exceptions_reporter>
Component: EditorAssignee: Petr Pisl <ppisl>
Status: VERIFIED FIXED    
Severity: normal CC: cryszana, mmirilovic, pjiricka, vriha
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 177917
Attachments: stacktrace

Description Exceptions Reporter 2011-03-31 15:37:46 UTC
Build: NetBeans IDE Dev (Build 201103300400)
VM: Java HotSpot(TM) Client VM, 19.1-b02, Java(TM) SE Runtime Environment, 1.6.0_24-b07
OS: Linux

User Comments:
cryszana: Working with Symfony AppKernel

cryszana: Working with Twig <http://www.twig-project.org/>

GUEST: During project scanning.




Stacktrace: 
java.lang.ClassCastException: org.netbeans.modules.php.editor.model.impl.FileScopeImpl cannot be cast to org.netbeans.modules.php.editor.model.NamespaceScope
   at org.netbeans.modules.php.editor.model.impl.ClassScopeImpl.<init>(ClassScopeImpl.java:102)
   at org.netbeans.modules.php.editor.model.impl.ModelElementFactory.create(ModelElementFactory.java:82)
   at org.netbeans.modules.php.editor.model.impl.ModelBuilder.build(ModelBuilder.java:104)
   at org.netbeans.modules.php.editor.model.impl.ModelVisitor.visit(ModelVisitor.java:404)
   at org.netbeans.modules.php.editor.parser.astnodes.ClassDeclaration.accept(ClassDeclaration.java:90)
   at org.netbeans.modules.php.editor.parser.astnodes.visitors.DefaultVisitor.scan(DefaultVisitor.java:54)
Comment 1 Exceptions Reporter 2011-03-31 15:37:50 UTC
Created attachment 107411 [details]
stacktrace
Comment 2 Petr Pisl 2011-04-01 08:05:26 UTC
This should be integrated into NB 7.0. Although I can not reproduce, it looks like it can happen often.
Comment 3 Marian Mirilovic 2011-04-01 08:13:31 UTC
So the changeset is http://hg.netbeans.org/web-main/rev/8dd80b76b1a7

Lada, if you will be able to verify this in continuous build, would be great.

Petr, even if we will not verify it, please integrate the fix into release70 TODAY. Thanks in advance.
Comment 4 Petr Pisl 2011-04-01 08:52:20 UTC
Yes I will integrate today after the lunch probably.
Comment 5 Quality Engineering 2011-04-02 08:49:35 UTC
Integrated into 'main-golden', will be available in build *201104020400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/8dd80b76b1a7
User: Petr Pisl <ppisl@netbeans.org>
Log: #197290 - ClassCastException: org.netbeans.modules.php.editor.model.impl.FileScopeImpl cannot be cast to org.netbeans.modules.php.editor.model.NamespaceScope
Comment 6 Petr Pisl 2011-04-04 07:31:59 UTC
The commit is in release70 as well.
Comment 7 Vladimir Riha 2011-04-04 09:05:09 UTC
I'm not able to reproduce it, verified