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.
CCE appears randomly but I have steps when it appears very often: 1) go to Runtime view and add JBoss server 2) create a web application with JBoss target server 3) in editor call Run File context action 4) when the page is open in browser call View Servlet action in editor 5) close all documents in editor 6) create a new JSP file 7) repeat steps 3 to 6 several times and the following exception appears sooner or later: java.lang.ClassCastException: org.netbeans.modules.web.core.jsploader.JspServletDataObject$ServletEditorCookie cannot be cast to org.openide.windows.CloneableOpenSupport at org.netbeans.modules.java.JavaEditor$JavaEditorEnv.findCloneableOpenSupport(JavaEditor.java:1221) Build 20060817-0525, JDK1.6.0-b93, WindowsXP, JBoss4.0.4.GA.
Created attachment 33018 [details] Entire stack trace
Can you reproduce also on another target server? It does not look as the server plugin problem (I guess that this is the reason why this issue is not filed against JBoss plugin...). Aren't there some other exceptions accompanying the attached one in the messages log?
I was only able reproduce it with JBoss target server. And no other exceptions were in messages log.
I can reproduce this on linux as well. The exception appears after Run action on my configuration.
I'm able to reproduce this issue only with JBoss. I tied with Tomcat and Glassfish as well, but only when the targer server is JBoss I can see the exception very often. The behavior is strange even for Run File action. Sometimes the browser displays that the page is not accessible. Sometimes the page is displayed in the browser, but the View Servlet action displays message that the page has to be run before view servlet, but the page is displayed in the browser. The main reason why the exceptin is raised is that the classes are not loaded by the same classloader. Cannot cast an instance of "class org.netbeans.modules.web.core.jsploader.JspServletDataObject$ServletEditorCookie (loaded by instance of org.netbeans.StandardModule$OneModuleClassLoader(id=11967))" to an instance of "class org.openide.windows.CloneableOpenSupport (loaded by instance of org.netbeans.StandardModule$OneModuleClassLoader(id=12001))" The strange things is as well that when Tomcat/Glassfish are target server, then the problematic code is not called. The code is not executed sometimes with JBoss. Then the run action and view servlet are finished correctly. But if the code is executed, then the exception appears. So what is the difference between JBoss plugin and the others one?
Created attachment 39450 [details] happend with 070307 build of 551 with glassfish
Reassigning per desc6.
*** Issue 83180 has been marked as a duplicate of this issue. ***
But issue 83810 happens on GlassFish, so perhaps not a JBoss plugin problem after all.
related to issue #115104 IMO.
Well, the org.netbeans.modules.java.JavaEditor was completely rewritten, so I do not think this can happen again. If it does, please reopen and attach an up-to-date stack trace.
Verified.