Skip to main content

XML problem with JDK6-b58 with a q-build of netbeans 5.0

13 replies [Last post]
dtrehas
Offline
Joined: 2004-03-15

Problem with xml casting in JDK6-b58 starting netbeans 5.0 q-build
netbeans-5_0-qbuild-bin-200510131600-windows-13_Oct_2005_1600.exe

This error was occured starting or closing netbeans:

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.(Unknown Source)
at org.apache.xerces.parsers.SAXParser.(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.WebActionProvider.isEjbRefAndNoJ2eeApp(WebActionProvider.java:1018)
at org.netbeans.modules.web.project.WebActionProvider.getTargetNames(WebActionProvider.java:364)
at org.netbeans.modules.web.project.WebActionProvider$1.run(WebActionProvider.java:184)
at org.netbeans.modules.web.project.WebActionProvider.invokeAction(WebActionProvider.java:212)
at org.netbeans.modules.project.ui.actions.MainProjectAction.actionPerformed(MainProjectAction.java:90)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1957)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2278)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:377)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:232)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
at java.awt.Component.processMouseEvent(Component.java:5955)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3285)
at java.awt.Component.processEvent(Component.java:5720)
at java.awt.Container.processEvent(Container.java:1960)
at java.awt.Component.dispatchEventImpl(Component.java:4365)
at java.awt.Container.dispatchEventImpl(Container.java:2018)
at java.awt.Component.dispatchEvent(Component.java:4195)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4222)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3886)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3816)
at java.awt.Container.dispatchEventImpl(Container.java:2004)
at java.awt.Window.dispatchEventImpl(Window.java:2210)
at java.awt.Component.dispatchEvent(Component.java:4195)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dtrehas
Offline
Joined: 2004-03-15

The same error occurs using netbeans 4.1 with java 6-build 57 & 58 running (not compiling) a servlet.

claudio
Offline
Joined: 2003-06-17

This looks fixed in build 59

llturro
Offline
Joined: 2003-06-11

As long as build 59 refers to beta, isn't fixed.

Openning 'details' I can see:

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.(Unknown Source)
at org.apache.xerces.parsers.SAXParser.(Unknown Source)
at org.netbeans.modules.j2ee.dd.api.web.DDProvider.parse(DDProvider.java:270)
at org.netbeans.modules.j2ee.dd.api.web.DDProvider.getDDRoot(DDProvider.java:87)
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.java:105)
at org.netbeans.modules.j2ee.deployment.config.ModuleDeploymentSupport.createRoot(ModuleDeploymentSupport.java:109)
at org.netbeans.modules.j2ee.deployment.config.ModuleDeploymentSupport.(ModuleDeploymentSupport.java:96)
at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.(ConfigSupportImpl.java:82)
at org.netbeans.modules.j2ee.deployment.devmodules.spi.J2eeModuleProvider.getConfigSupport(J2eeModuleProvider.java:75)
at org.netbeans.modules.web.project.ProjectWebModule.getContextPath(ProjectWebModule.java:94)
at org.netbeans.modules.web.project.ui.customizer.WebProjectProperties.init(WebProjectProperties.java:326)
at org.netbeans.modules.web.project.ui.customizer.WebProjectProperties.(WebProjectProperties.java:260)
at org.netbeans.modules.web.project.WebProject.getWebProjectProperties(WebProject.java:412)
at org.netbeans.modules.web.project.WebProject$ProjectOpenedHookImpl.projectOpened(WebProject.java:706)
at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:50)
at org.netbeans.modules.project.ui.OpenProjectList.notifyOpened(OpenProjectList.java:508)
at org.netbeans.modules.project.ui.OpenProjectList.getDefault(OpenProjectList.java:143)
at org.netbeans.modules.project.ui.OpenProjectsTrampolineImpl.(OpenProjectsTrampolineImpl.java:35)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:498)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at org.openide.util.lookup.MetaInfServicesLookup$P.getInstance(MetaInfServicesLookup.java:406)
at org.openide.util.lookup.AbstractLookup.lookup(AbstractLookup.java:344)
at org.openide.util.lookup.ProxyLookup.lookup(ProxyLookup.java:180)
at org.netbeans.modules.project.uiapi.Utilities.getOpenProjectsTrampoline(Utilities.java:50)
at org.netbeans.api.project.ui.OpenProjects.(OpenProjects.java:52)
at org.netbeans.api.project.ui.OpenProjects.(OpenProjects.java:47)
at org.netbeans.modules.editor.bookmarks.EditorBookmarksModule.restored(EditorBookmarksModule.java:80)
at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:357)
at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:273)
at org.netbeans.ModuleManager.enable(ModuleManager.java:898)
at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:377)
at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:311)
at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:243)
at org.netbeans.core.startup.Main.getModuleSystem(Main.java:202)
at org.netbeans.core.startup.Main.start(Main.java:363)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:90)
[catch] at java.lang.Thread.run(Thread.java:620)

and pressing 'Next >>' button:

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.(Unknown Source)
at org.apache.xerces.parsers.SAXParser.(Unknown Source)
at org.netbeans.modules.j2ee.dd.api.web.DDProvider.parse(DDProvider.java:270)
at org.netbeans.modules.j2ee.dd.api.web.DDProvider.getDDRoot(DDProvider.java:87)
at org.netbeans.modules.j2ee.ddloaders.web.DDDataObject.parseDocument(DDDataObject.java:197)
at org.netbeans.modules.j2ee.ddloaders.multiview.DDMultiViewDataObject$ModelSynchronizer.reloadModelFromData(DDMultiViewDataObject.java:243)
at org.netbeans.modules.xml.multiview.XmlMultiViewDataSynchronizer.reloadModel(XmlMultiViewDataSynchronizer.java:199)
at org.netbeans.modules.xml.multiview.XmlMultiViewDataSynchronizer$3.run(XmlMultiViewDataSynchronizer.java:69)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:471)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:904)

llturro
Offline
Joined: 2003-06-11

Moreover, EA build works perfectly with NB 5.0. I have found only a minor issue regarding tree renderings. I think someone from NB already reported it.

trembovetski
Offline
Joined: 2003-12-31

The scrolling tree bug (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6335200) was fixed in b59.

Dmitri
Java2D Team

llturro
Offline
Joined: 2003-06-11

Great! But unfortunately I couldn't test it. Since b58 NB5.0 doesn't work. It throws the above exception. So I'm switching back to b57.

I would like you to notice that this occurs in a web-app project. I'm unable to see project's properties. It raises the same exception. Otherwise, java libraries the project depends of, have not this problem. Their properties are fully editable.

aaronanderson
Offline
Joined: 2004-01-23

right, trying to follow http://www.netbeans.org/kb/articles/javaee5-hello-world.html using latest glassfish and mustang build reproduces this problem

trembovetski
Offline
Joined: 2003-12-31

Looks like the class cast exception has been already reported:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6337684

Thanks,
Dmitri
Java2D Team

llturro
Offline
Joined: 2003-06-11

Does it mean xerces library in NB conflicts with internal xerces? I'll give a try and report the results.

patricbechtel
Offline
Joined: 2004-07-06

Seeing the same thing here, even without having any xml classes around except rt.jar. So I doubt it's a problem of the external Xerces conflicting with the internal one...
Anyone tried b60 already?

llturro
Offline
Joined: 2003-06-11

The same problem with b60. And I tried removing xerces from [NB]/ide6/modules/lib/ext with no success. Definitely b60 is not a release candidate if can't execute NB5.0, is it?

claudio
Offline
Joined: 2003-06-17


I tested B60 with NetBeans beta 2, everything looks fine, and incredible fast. kudos to mustbeans and netang team.

[b]
Sorry, when tried to do editing, the reported exception was throw. :-/
[/b]

Message was edited by: claudio

llturro
Offline
Joined: 2003-06-11

Tip from Eric Hartmann:

Remove META-INF/services/org.apache.xerces.xni.parser.XMLParserConfigurationfrom entry in [JDK1.6.0]/jre/lib/resources.jar

The problem might be related to xalan endorsement