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.
I get a classCastException when I try to create a new web project or open an existing one. Steps to reproduce 1. Install jdk 2. install netbeans (yes my mahcine was that clean) 3. start netbeans 4. create a new web project. - using bundled server - untick the Java 1.4 target - server neither struts nor jsf 5. click finish 6. Get invocation target exception In the log I see: Caused by: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source) at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source) at org.netbeans.modules.j2ee.dd.api.web.DDProvider.parse(DDProvider.java:264) at org.netbeans.modules.j2ee.dd.api.web.DDProvider.getDDRoot(DDProvider.java:84) at org.netbeans.modules.web.project.ProjectWebModule.getWebApp(ProjectWebModule.java:332) at org.netbeans.modules.web.project.ProjectWebModule.getDeploymentDescriptor(ProjectWebModule.java:306) at org.netbeans.modules.j2ee.deployment.config.ModuleDeploymentSupport.getDeploymentDescriptor(ModuleDeploymentSupport I am using: >System Info: Product Version = NetBeans IDE Dev (Build 200510131922) Operating System = Linux version 2.6.12-9-386 running on i386 Java; VM; Vendor = 1.6.0-ea; Java HotSpot(TM) Client VM 1.6.0-ea-b56; Sun Microsystems Inc.
Created attachment 26109 [details] Message log
It is reproducible on WinXP too, but only in 1.6.0
It doesn't appear on my second machine both are now running nb nightly 200510171800, but on slightly different JVMs The one that works mustang build 55 but the one that fails are running mustang build 56
*** Issue 68219 has been marked as a duplicate of this issue. ***
look at the issue 68219 NB5.0 (200511061800), JDK 6.0 (b59)
Sice the jdk 1.6 is Beta version I'm changing priority to P2. The issue should be definitely fixed in NetBeans 5.0 FCS.
Fixed. Used standard way to get the parser in all DDProviders. Diffs: http://j2ee.netbeans.org/source/browse/j2ee/ddapi/nbproject/project.xml?r1=1.6&r2=1.7 http://j2ee.netbeans.org/source/browse/j2ee/ddapi/src/org/netbeans/modules/j2ee/dd/api/application/DDProvider.java?r1=1.2&r2=1.3 http://j2ee.netbeans.org/source/browse/j2ee/ddapi/src/org/netbeans/modules/j2ee/dd/api/ejb/DDProvider.java?r1=1.8&r2=1.9 http://j2ee.netbeans.org/source/browse/j2ee/ddapi/src/org/netbeans/modules/j2ee/dd/api/web/DDProvider.java?r1=1.7&r2=1.8
Reopen because I rollbacked the changes. This is likely the problem of jdk1.6 <-> xerces compatibility.
This is the jdk1.6 problem. See : http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6337684
Comments on JDK bug from JDK team : ----------- Test case relies on external classes outside JAXP/J2SE contract which is not supported. Closing this bug. If the user desires to over-ride the implmentation inside JDK, endorsed mechanism should be used. ----------- I think it will be very nice to have workarround on our side.
Or, Milane, would it be possible to think of a different test case than you provided in the JDK bug? Perhaps something without using jre/lib/ext? Are we really relying on some special behavior of JDK 1.5 that is not guaranteed by the Java specification?
Another JDK bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6338444 Thread on java.net Forum: http://forums.java.net/jive/thread.jspa?messageID=29880
Fixed temporally for Netbeans. Until we get rid of jdk1.4, we should keep 2 different aproaches in the area of XML validation against XML schema. Diffs: http://j2ee.netbeans.org/source/browse/j2ee/ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDUtils.java?r1=1.4&r2=1.5 http://j2ee.netbeans.org/source/browse/j2ee/ddapi/src/org/netbeans/modules/j2ee/dd/api/web/DDProvider.java?r1=1.10&r2=1.11 http://j2ee.netbeans.org/source/browse/j2ee/ddapi/src/org/netbeans/modules/j2ee/dd/api/application/DDProvider.java?r1=1.5&r2=1.6 http://j2ee.netbeans.org/source/browse/j2ee/ddapi/src/org/netbeans/modules/j2ee/dd/api/ejb/DDProvider.java?r1=1.11&r2=1.12
*** Issue 69380 has been marked as a duplicate of this issue. ***
Workaround can perhaps be removed; cf. comments in issue #66967.
v. build 200608190000