Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 68942 - XMLUtil.write fails during the IDE startup because SAXFactoryImpl cannot be found
XMLUtil.write fails during the IDE startup because SAXFactoryImpl cannot be f...
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: -- Other --
5.x
PC Windows XP
: P2 (vote)
: 5.x
Assigned To: Jaroslav Tulach
issues@platform
:
: 68993 69345 69845 (view as bug list)
Depends on: 70576
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-18 16:33 UTC by jxt
Modified: 2008-12-22 10:56 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Test module. (4.15 KB, application/x-compressed)
2005-12-02 22:01 UTC, Jan Lahoda
Details
A working patch. (1.57 KB, patch)
2005-12-05 16:14 UTC, Jan Lahoda
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jxt 2005-11-18 16:33:00 UTC
I downloaded and installed NB 5 beta 2. At startup it offered to import 4.1 
settings. I said okay. Then an IllegalStateException occurred.

A bit later, another IllegalStateException occurred, when closing a project.

Hereis the log file:

-------------------------------------------------------------------------------
>Log Session: Friday, November 18, 2005 11:23:28 AM EST
>System Info: 
  Product Version         = NetBeans IDE 5.0 Beta 2 (Build 200511141730)
  Operating System        = Windows XP version 5.1 running on x86
  Java; VM; Vendor; Home  = 1.5.0_05; Java HotSpot(TM) Client VM 1.5.0_05-b05; 
Sun Microsystems Inc.; D:\common\java\jdk1.5.0_05\jre
  System Locale; Encoding = en_US (nb); Cp1252
  Home Dir.; Current Dir. = C:\Documents and Settings\jxt; 
d:\common\java\netbeans-5.0beta2
  Installation; User Dir. = D:\common\java\netbeans-5.0beta2
\nb5.0;D:\common\java\netbeans-5.0beta2\ide6;D:\common\java\netbeans-5.0beta2
\enterprise2;D:\common\java\netbeans-5.0beta2\harness;D:\common\java\netbeans-
5.0beta2\platform6; C:\Documents and Settings\jxt\.netbeans\5.0beta2
  Boot & Ext. Classpath   = D:\common\java\jdk1.5.0_05
\jre\lib\rt.jar;D:\common\java\jdk1.5.0_05
\jre\lib\i18n.jar;D:\common\java\jdk1.5.0_05
\jre\lib\sunrsasign.jar;D:\common\java\jdk1.5.0_05
\jre\lib\jsse.jar;D:\common\java\jdk1.5.0_05
\jre\lib\jce.jar;D:\common\java\jdk1.5.0_05
\jre\lib\charsets.jar;D:\common\java\jdk1.5.0_05
\jre\classes;D:\common\java\jdk1.5.0_05
\jre\lib\ext\comm.jar;D:\common\java\jdk1.5.0_05
\jre\lib\ext\dnsns.jar;D:\common\java\jdk1.5.0_05
\jre\lib\ext\localedata.jar;D:\common\java\jdk1.5.0_05
\jre\lib\ext\sunjce_provider.jar;D:\common\java\jdk1.5.0_05
\jre\lib\ext\sunpkcs11.jar
  Application Classpath   = D:\common\java\netbeans-5.0beta2\platform6
\lib\boot.jar;D:\common\java\netbeans-5.0beta2\platform6\lib\org-openide-
modules.jar;D:\common\java\netbeans-5.0beta2\platform6\lib\org-openide-
util.jar;D:\common\java\jdk1.5.0_05\lib\dt.jar;D:\common\java\jdk1.5.0_05
\lib\tools.jar
  Startup Classpath       = D:\common\java\netbeans-5.0beta2\platform6
\core\core.jar;D:\common\java\netbeans-5.0beta2\platform6\core\org-openide-
filesystems.jar;D:\common\java\netbeans-5.0beta2\nb5.0\core\org-netbeans-
upgrader.jar;D:\common\java\netbeans-5.0beta2\nb5.0
\core\locale\core_nb.jar;D:\common\java\netbeans-5.0beta2\ide6\core\org-
netbeans-modules-utilities-cli.jar
-------------------------------------------------------------------------------
[USER] Import: Old version: 4.1. Importing from C:\Documents and 
Settings\jxt\.netbeans\4.1 to C:\Documents and Settings\jxt\.netbeans\5.0beta2
LibraryDeclarationHandlerImpl: Cannot create library: J2MEUnit of unknown 
type: j2me
ERROR:  'Provider org.netbeans.core.startup.SAXFactoryImpl could not be 
instantiated: java.lang.NullPointerException'
FATAL ERROR:  'Could not compile stylesheet'
*********** Exception occurred ************ at 11:23 AM on Nov 18, 2005
java.io.IOException: javax.xml.transform.TransformerConfigurationException: 
Could not compile stylesheet
	at org.openide.xml.XMLUtil.write(XMLUtil.java:396)
	at org.netbeans.spi.project.support.ant.AntProjectHelper$2.run
(AntProjectHelper.java:279)
	at org.openide.filesystems.EventControl.runAtomicAction
(EventControl.java:96)
	at org.openide.filesystems.FileSystem.runAtomicAction
(FileSystem.java:450)
	at org.netbeans.spi.project.support.ant.AntProjectHelper.saveXml
(AntProjectHelper.java:275)
	at org.netbeans.spi.project.support.ant.AntProjectHelper.save
(AntProjectHelper.java:530)
	at org.netbeans.spi.project.support.ant.AntProjectHelper.access$100
(AntProjectHelper.java:64)
	at org.netbeans.spi.project.support.ant.AntProjectHelper$1.save
(AntProjectHelper.java:102)
	at 
org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.saveProject
(AntBasedProjectFactorySingleton.java:195)
	at org.netbeans.api.project.ProjectManager$8.run
(ProjectManager.java:537)
	at org.openide.util.Mutex.writeAccess(Mutex.java:324)
	at org.netbeans.api.project.ProjectManager.saveProject
(ProjectManager.java:530)
[catch] at 
org.netbeans.modules.web.project.classpath.WebProjectClassPathExtender$4.run
(WebProjectClassPathExtender.java:272)
	at org.openide.util.Mutex.leave(Mutex.java:762)
	at org.openide.util.Mutex.readAccess(Mutex.java:197)
	at org.netbeans.spi.project.support.ant.ProjectProperties$PP.fireChange
(ProjectProperties.java:321)
	at org.netbeans.spi.project.support.ant.ProjectProperties$PP.put
(ProjectProperties.java:186)
	at org.netbeans.spi.project.support.ant.ProjectProperties.putProperties
(ProjectProperties.java:99)
	at org.netbeans.spi.project.support.ant.AntProjectHelper$9.run
(AntProjectHelper.java:643)
	at org.openide.util.Mutex.writeAccess(Mutex.java:288)
	at org.netbeans.spi.project.support.ant.AntProjectHelper.putProperties
(AntProjectHelper.java:641)
	at org.netbeans.modules.web.project.UpdateHelper$2.run
(UpdateHelper.java:128)
	at org.openide.util.Mutex.writeAccess(Mutex.java:352)
	at org.netbeans.modules.web.project.UpdateHelper.putProperties
(UpdateHelper.java:124)
	at org.netbeans.modules.web.project.WebProject$7.run
(WebProject.java:630)
	at org.openide.util.Mutex.writeAccess(Mutex.java:288)
	at 
org.netbeans.modules.web.project.WebProject$ProjectOpenedHookImpl.projectOpened
(WebProject.java:616)
	at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened
(ProjectOpenedHook.java:50)
	at org.netbeans.modules.project.ui.OpenProjectList.notifyOpened
(OpenProjectList.java:518)
	at org.netbeans.modules.project.ui.OpenProjectList.getDefault
(OpenProjectList.java:143)
	at 
org.netbeans.modules.project.ui.OpenProjectsTrampolineImpl.getOpenProjectsAPI
(OpenProjectsTrampolineImpl.java:39)
	at org.netbeans.api.project.ui.OpenProjects.getOpenProjects
(OpenProjects.java:68)
	at org.netbeans.modules.editor.bookmarks.EditorBookmarksModule.restored
(EditorBookmarksModule.java:81)
	at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:360)
	at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:276)
	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:244)
	at org.netbeans.core.startup.Main.getModuleSystem(Main.java:206)
	at org.netbeans.core.startup.Main.start(Main.java:377)
	at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:90)
	at java.lang.Thread.run(Thread.java:595)
Caused by: javax.xml.transform.TransformerConfigurationException: Could not 
compile stylesheet
	at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplate
s(TransformerFactoryImpl.java:824)
	at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransfor
mer(TransformerFactoryImpl.java:619)
	at org.openide.xml.XMLUtil.write(XMLUtil.java:381)
	... 42 more
ERROR:  'Provider org.netbeans.core.startup.SAXFactoryImpl could not be 
instantiated: java.lang.NullPointerException'
FATAL ERROR:  'Could not compile stylesheet'
*********** Exception occurred ************ at 11:23 AM on Nov 18, 2005
java.io.IOException: javax.xml.transform.TransformerConfigurationException: 
Could not compile stylesheet
	at org.openide.xml.XMLUtil.write(XMLUtil.java:396)
	at org.netbeans.spi.project.support.ant.AntProjectHelper$2.run
(AntProjectHelper.java:279)
	at org.openide.filesystems.EventControl.runAtomicAction
(EventControl.java:96)
	at org.openide.filesystems.FileSystem.runAtomicAction
(FileSystem.java:450)
	at org.netbeans.spi.project.support.ant.AntProjectHelper.saveXml
(AntProjectHelper.java:275)
	at org.netbeans.spi.project.support.ant.AntProjectHelper.save
(AntProjectHelper.java:530)
	at org.netbeans.spi.project.support.ant.AntProjectHelper.access$100
(AntProjectHelper.java:64)
	at org.netbeans.spi.project.support.ant.AntProjectHelper$1.save
(AntProjectHelper.java:102)
	at 
org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.saveProject
(AntBasedProjectFactorySingleton.java:195)
	at org.netbeans.api.project.ProjectManager$8.run
(ProjectManager.java:537)
	at org.openide.util.Mutex.writeAccess(Mutex.java:324)
	at org.netbeans.api.project.ProjectManager.saveProject
(ProjectManager.java:530)
[catch] at org.netbeans.modules.web.project.WebProject$7.run
(WebProject.java:634)
	at org.openide.util.Mutex.writeAccess(Mutex.java:288)
	at 
org.netbeans.modules.web.project.WebProject$ProjectOpenedHookImpl.projectOpened
(WebProject.java:616)
	at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened
(ProjectOpenedHook.java:50)
	at org.netbeans.modules.project.ui.OpenProjectList.notifyOpened
(OpenProjectList.java:518)
	at org.netbeans.modules.project.ui.OpenProjectList.getDefault
(OpenProjectList.java:143)
	at 
org.netbeans.modules.project.ui.OpenProjectsTrampolineImpl.getOpenProjectsAPI
(OpenProjectsTrampolineImpl.java:39)
	at org.netbeans.api.project.ui.OpenProjects.getOpenProjects
(OpenProjects.java:68)
	at org.netbeans.modules.editor.bookmarks.EditorBookmarksModule.restored
(EditorBookmarksModule.java:81)
	at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:360)
	at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:276)
	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:244)
	at org.netbeans.core.startup.Main.getModuleSystem(Main.java:206)
	at org.netbeans.core.startup.Main.start(Main.java:377)
	at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:90)
	at java.lang.Thread.run(Thread.java:595)
Caused by: javax.xml.transform.TransformerConfigurationException: Could not 
compile stylesheet
	at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplate
s(TransformerFactoryImpl.java:824)
	at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransfor
mer(TransformerFactoryImpl.java:619)
	at org.openide.xml.XMLUtil.write(XMLUtil.java:381)
	... 30 more
*********** Exception occurred ************ at 11:23 AM on Nov 18, 2005
java.lang.IllegalStateException: Cannot generate build scripts from a modified 
project
	at org.netbeans.spi.project.support.ant.GeneratedFilesHelper$6.run
(GeneratedFilesHelper.java:421)
	at org.openide.util.Mutex.readAccess(Mutex.java:234)
	at 
org.netbeans.spi.project.support.ant.GeneratedFilesHelper.getBuildScriptState
(GeneratedFilesHelper.java:418)
	at 
org.netbeans.modules.web.project.WebProject$ProjectOpenedHookImpl.projectOpened
(WebProject.java:675)
	at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened
(ProjectOpenedHook.java:50)
[catch] at org.netbeans.modules.project.ui.OpenProjectList.notifyOpened
(OpenProjectList.java:518)
	at org.netbeans.modules.project.ui.OpenProjectList.getDefault
(OpenProjectList.java:143)
	at 
org.netbeans.modules.project.ui.OpenProjectsTrampolineImpl.getOpenProjectsAPI
(OpenProjectsTrampolineImpl.java:39)
	at org.netbeans.api.project.ui.OpenProjects.getOpenProjects
(OpenProjects.java:68)
	at org.netbeans.modules.editor.bookmarks.EditorBookmarksModule.restored
(EditorBookmarksModule.java:81)
	at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:360)
	at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:276)
	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:244)
	at org.netbeans.core.startup.Main.getModuleSystem(Main.java:206)
	at org.netbeans.core.startup.Main.start(Main.java:377)
	at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:90)
	at java.lang.Thread.run(Thread.java:595)
Turning on modules:
	org.openide.util [6.5.1 200511141730]
	org.openide.modules [6.4.1 200511141730]
	org.openide.awt [6.6.1 200511141730]
	org.openide.dialogs [6.3.1 200511141730]
	org.openide.nodes [6.6.1 200511141730]
	org.openide.windows [6.4.1 200511141730]
	org.netbeans.swing.tabcontrol [1.5.1 200511141730]
	org.openide.filesystems [6.3.1 200511141730]
	org.openide.options [6.3.1 200511141730]
	org.openide.text [6.8.1 200511141730]
	org.openide.explorer [6.4.1 1 200511141730]
	org.openide.actions [6.4.1 200511141730]
	org.openide.loaders [5.8.1 200511141730]
	org.netbeans.modules.editor.util/1 [1.7.1 200511141730]
	org.netbeans.modules.editor.mimelookup/1 [1.2.1 200511141730]
	org.netbeans.modules.editor.fold/1 [1.4.1 200511141730]
	org.netbeans.modules.editor.lib/1 [1.8.1.1 1 200511141730]
	org.netbeans.modules.queries/1 [1.6.1 200511141730]
	org.openidex.util/3 [3.8.1 200511141730]
	org.netbeans.modules.editor.settings/1 [1.3.1 200511141730]
	org.netbeans.modules.editor.settings.storage/1 [1.3.1 200511141730]
	org.netbeans.modules.editor/3 [1.25.1.1 200511141730]
	org.netbeans.modules.projectapi/1 [1.8.1 200511141730]
	org.netbeans.modules.classfile/1 [1.16.1 200511141730]
	org.netbeans.api.progress/1 [1.3.1 200511141730]
	org.openide.io [1.8.1 200511141730]
	org.openide.execution [1.7.1 200511141730]
	org.netbeans.api.java/1 [1.9.1 200511141730]
	org.netbeans.modules.java.platform/1 [1.6.1 200511141730]
	org.netbeans.modules.projectuiapi/1 [1.12.1.5 5 200511141730]
	org.netbeans.modules.project.ant/1 [1.11.1 200511141730]
	org.netbeans.modules.project.libraries/1 [1.12.1 200511141730]
	org.netbeans.modules.java.j2seplatform/1 [1.5.1.2 2 200511141730]
	org.netbeans.bootstrap/1 [2.2.1 200511141730]
	org.netbeans.api.xml/1 [1.11.1 200511141730]
	org.netbeans.spi.navigator/1 [1.1.1 200511141730]
	org.netbeans.core.output2/1 [1.6.1.1 1 200511141730]
	org.netbeans.modules.xml.core/2 [1.10.1.4 4 200511141730]
	org.netbeans.modules.xml.catalog/2 [1.9.1.4.4 4 200511141730]
	org.netbeans.modules.java.editor.lib/1 [1.3.1 200511141730]
	org.netbeans.api.web.webmodule [1.5.1 200511141730]
	org.netbeans.modules.schema2beans/1 [1.13.1 200511141730]
	org.netbeans.libs.xerces/1 [1.7.1 2.6.2 200511141730]
	org.netbeans.modules.j2ee.dd/1 [1.6.1.2 2 200511141730]
	javax.jmi.reflect/1 [1.6.1 200511141730]
	org.netbeans.jmi.javamodel/2 [1.20.1 200511141730]
	org.netbeans.modules.editor.completion/1 [1.5.1 200511141730]
	org.netbeans.api.mdr/1 [1.3.1 200511141730]
	javax.jmi.model/1 [1.6.1 200511141730]
	org.netbeans.modules.jmiutils/1 [1.4.1.2 2 200511141730]
	org.netbeans.modules.mdr/1 [1.4.1.2.2 2 200511141730]
	org.netbeans.modules.javacore/1 [1.16.1.2.2 200511141730]
	org.jdesktop.layout/1 [1.2.1 0.9 200511141730]
	org.netbeans.libs.formlayout/1 [1.1.1 1 200511141730]
	org.netbeans.modules.options.api/0 [1.1.1 200511141730]
	org.netbeans.core.startup/1 [1.4.1 200511141730]
	org.netbeans.swing.plaf [1.4.1 200511141730]
	org.netbeans.core/2 [3.1.1.1 200511141730]
	org.netbeans.core.execution/1 [1.8.1 200511141730]
	org.apache.tools.ant.module/3 [3.23.1.1 1 200511141730]
	org.netbeans.modules.favorites/1 [1.10.1 200511141730]
	org.netbeans.core.ui/1 [1.8.1 200511141730]
	org.netbeans.modules.masterfs/1 [1.6.1 200511141730]
	org.netbeans.modules.projectui [1.6.1.5 200511141730]
	org.openide.src [1.7.1 200511141730]
	org.netbeans.modules.editor.errorstripe.api/1 [2.1.1.1 1 200511141730]
	org.netbeans.modules.java/1 [1.24.1.2.2.2 2 200511141730]
	org.netbeans.modules.java.project/1 [1.7.1 200511141730]
	org.netbeans.modules.editor.codetemplates/1 [1.1.1 200511141730]
	org.netbeans.modules.java.editor/1 [1.3.1 200511141730]
	org.netbeans.modules.j2ee.common/1 [1.3.1 200511141730]
	org.netbeans.modules.web.jsf/1 [1.1.1.1 1 200511141730]
	org.netbeans.modules.javahelp/1 [2.7.1 200511141730]
	org.netbeans.modules.db/0 [1.14.1.3 3 200511141730]
	org.netbeans.modules.db.core [1.1.1 200511141730]
	org.netbeans.modules.db.sql.editor [1.1.1.3 200511141730]
	org.netbeans.libs.commons_logging/1 [1.2.1 1.0.4 200511141730]
	org.netbeans.modules.servletapi24/1 [2.5.1 2.4 200511141730]
	org.netbeans.modules.web.jspparser/2 [2.4.1 200511141730]
	org.netbeans.modules.editor.structure/1 [1.10.1.1 1 200511141730]
	org.netbeans.modules.xml.text/2 [1.10.1.4.4 4 200511141730]
	org.netbeans.modules.editor.plain.lib/1 [1.2.1 200511141730]
	org.netbeans.modules.html.editor.lib/1 [1.3.1 200511141730]
	org.netbeans.modules.html.editor/1 [1.3.1 200511141730]
	org.netbeans.modules.web.core.syntax/1 [1.21.1.4 200511141730]
	org.netbeans.modules.web.struts/1 [1.1.1.1 1 200511141730]
	org.netbeans.modules.apisupport.ant [2.28.1 200511141730]
	org.netbeans.modules.ant.browsetask [1.10.1 200511141730]
	org.netbeans.spi.viewmodel/2 [1.8.1 200511141730]
	org.netbeans.api.debugger/1 [1.6.1 200511141730]
	org.netbeans.api.debugger.jpda/2 [2.3.1 200511141730]
	org.netbeans.modules.debugger.jpda/2 [1.15.1 200511141730]
	org.netbeans.spi.debugger.ui/1 [2.7.1 200511141730]
	org.netbeans.modules.debugger.jpda.ui/1 [1.4.1 200511141730]
	org.netbeans.modules.debugger.jpda.ant [1.6.1 200511141730]
	org.netbeans.modules.xml.tax/2 [1.10.1.4.4 4 200511141730]
	org.netbeans.core.multiview/1 [1.7.1 200511141730]
	org.netbeans.modules.junit/2 [2.18.1 200511141730]
	org.netbeans.modules.apisupport.project [1.10.1.5.4 5 200511141730]
	org.netbeans.modules.servletapi/1 [1.8.1 200511141730]
	org.netbeans.modules.httpserver/2 [2.4.1.42 42 200511141730]
	org.netbeans.modules.j2eeapis/1 [1.5.1 200511141730]
	org.netbeans.modules.utilities/1 [1.20.1 200511141730]
	org.netbeans.modules.utilities.project/1 [1.4.1 200511141730]
	org.netbeans.modules.settings/1 [1.9.1 200511141730]
	org.netbeans.modules.j2eeserver/4 [1.12.1 200511141730]
	org.netbeans.modules.xml.tools/2 [1.10.1.4.4.4 4 200511141730]
	org.netbeans.modules.websvc.clientapi [1.3.1 200511141730]
	org.netbeans.modules.j2ee.dd.webservice [1.2.1 200511141730]
	org.netbeans.modules.websvc.websvcapi [1.3.1 200511141730]
	org.netbeans.modules.websvc.registry [1.2.1 200511141730]
	org.netbeans.modules.websvc.core [1.4.1.1.4.4 1 200511141730]
	org.netbeans.modules.j2ee.api.ejbmodule [1.3.1 200511141730]
	org.netbeans.modules.websvc.dev/1 [1.4.1.1 200511141730]
	org.netbeans.modules.editor.plain/1 [1.2.1 200511141730]
	org.netbeans.modules.dbschema/1 [1.6.1.3.3 3 200511141730]
	org.netbeans.modules.editor.hints/1 [1.8.1.1 1 200511141730]
	org.netbeans.modules.java.hints/1 [1.9.1.1 1 200511141730]
	org.netbeans.spi.palette/0 [1.4.1 200511141730]
	org.netbeans.modules.refactoring/1 [1.14.1.3.2 3 200511141730]
	org.netbeans.modules.form/2 [1.18.1 1 200511141730]
	org.netbeans.modules.properties/1 [1.16.1 200511141730]
	org.netbeans.modules.i18n/1 [1.19.1 200511141730]
	org.netbeans.modules.i18n.form/2 [1.17.1 200511141730]
	org.netbeans.modules.clazz/1 [1.18.1 200511141730]
	org.netbeans.modules.web.monitor/1 [1.14.1 200511141730]
	org.netbeans.modules.xml.multiview/1 [1.3.1.2 2 200511141730]
	org.netbeans.modules.web.core/1 [1.24.1.42.2 42 200511141730]
	org.netbeans.tasklistapi/1 [1.19.1.7 7 200511141730]
	org.netbeans.modules.tasklist.core/2 [1.36.1.16.7 16 200511141730]
	org.netbeans.modules.suggestions_framework/2 [1.14.1.9.16.7 9 
200511141730]
	org.netbeans.modules.tasklist.docscan/2 [1.22.1.9.16.7 200511141730]
	org.netbeans.modules.jmxri/1 [1.1.1 1 200511141730]
	org.netbeans.modules.j2ee.jboss4/1 [1.3.1 200511141730]
	org.netbeans.modules.editor.bookmarks/1 [1.2.1 200511141730]
	org.netbeans.modules.beans/1 [1.16.1 200511141730]
	org.netbeans.modules.editor.errorstripe/2 [2.1.1.1.1 1 200511141730]
	org.netbeans.modules.tomcat5/1 [1.6.1 200511141730]
	org.netbeans.modules.j2ee.sun.dd/1 [1.4.1 200511141730]
	org.netbeans.modules.j2ee.weblogic9/1 [1.3.1 200511141730]
	org.netbeans.modules.ant.freeform/1 [1.9.1 200511141730]
	org.netbeans.modules.java.freeform/1 [1.4.1 200511141730]
	org.netbeans.modules.j2ee.ejbfreeform [1.5.1 200511141730]
	org.netbeans.lib.cvsclient/1 [1.13.1 200511141730]
	org.netbeans.modules.j2ee.refactoring/1 [1.4.1.42.1 200511141730]
	org.netbeans.core.windows/2 [2.6.1.1 200511141730]
	org.netbeans.modules.web.examples/1 [1.4.1 200511141730]
	org.netbeans.modules.diff/1 [1.14.1.42 42 200511141730]
	org.netbeans.modules.versioning/1 [1.2.1.1 1 200511141730]
	org.netbeans.libs.jsch/1 [1.3.1 0.1.23 200511141730]
	org.netbeans.modules.versioning.system.cvss/1 [1.6.1.1.42.1 1 
200511141730]
	org.netbeans.modules.web.freeform [1.3.1 200511141730]
	org.netbeans.modules.xsl/1 [1.10.1.4 200511141730]
	org.netbeans.modules.html/1 [1.18.1 200511141730]
	org.netbeans.modules.web.debug/1 [2.7.1 200511141730]
	org.netbeans.upgrader [4.4.1 200511141730]
	org.netbeans.modules.css/2 [1.10.1 200511141730]
	org.netbeans.modules.j2ee.ant [1.6.1 200511141730]
	org.netbeans.modules.j2ee.genericserver [1.3.1 200511141730]
	org.netbeans.modules.ant.debugger/1 [1.6.1.1 200511141730]
	org.netbeans.modules.image/1 [1.16.1 200511141730]
	org.netbeans.modules.j2ee.blueprints/1 [1.8.1 200511141730]
	org.netbeans.modules.j2ee.platform/1 [1.2.1 200511141730]
	org.netbeans.modules.extbrowser/1 [1.8.1 200511141730]
	org.netbeans.modules.j2ee.ejbcore [1.3.1 200511141730]
	org.netbeans.modules.j2ee.ejbjarproject [1.3.1 200511141730]
	org.netbeans.modules.java.examples/1 [1.4.1 200511141730]
	org.netbeans.modules.autoupdate/1 [2.15.1 200511141730]
	org.netbeans.modules.options.editor/1 [1.1.1 200511141730]
	org.netbeans.modules.web.project [1.3.1 200511141730]
	org.netbeans.modules.j2ee.earproject [1.4.1 200511141730]
	org.netbeans.modules.defaults/1 [1.1.1 200511141730]
	org.netbeans.modules.java.j2seproject [1.5.1.42 42 200511141730]
	org.netbeans.modules.tomcat5.bundled/1 [1.5.1 200511141730]
	org.netbeans.modules.j2ee.debug/1 [1.2.1 200511141730]
	org.netbeans.modules.updatecenters/1 [1.5.1 200511141730]
	org.netbeans.modules.j2ee.sun.appsrv/1 [1.2.1 1 200511141730]
	org.netbeans.modules.j2ee.sun.ddui/1 [1.5.1 200511141730]
	org.netbeans.modules.j2ee.sun.appsrv81/1 [1.0.1.1.1.4 1 200511141730]
	org.netbeans.modules.usersguide/1 [1.18.1 200511141730]
	org.netbeans.modules.ant.grammar/1 [1.13.1 200511141730]
	org.netbeans.modules.javadoc/1 [1.17.1 200511141730]
	org.netbeans.modules.j2ee.ddloaders/1 [1.5.1.2.2.4 200511141730]
	org.netbeans.modules.java.navigation/1 [1.1.1 200511141730]
	org.netbeans.modules.websvc.jaxrpc16/1 [1.1.1 200511141730]
	org.netbeans.modules.properties.syntax/1 [1.16.1 200511141730]
	org.netbeans.modules.xml.schema/1 [1.10.1.4 200511141730]
	org.netbeans.modules.web.jstl11/1 [2.5.1 1.1.2 200511141730]
	org.netbeans.modules.apisupport.refactoring [1.1.1.5 200511141730]
	org.netbeans.modules.welcome/1 [1.9.1 200511141730]
	org.netbeans.core.ide/1 [1.8.1 200511141730]
	org.netbeans.modules.apisupport.feedreader/1 [1.1.1 200511141730]
Using 'jar:file:/D:/common/java/jdk1.5.0_05/jre/lib/rt.jar!/' pre-parsed 
database!
*********** Exception occurred ************ at 11:26 AM on Nov 18, 2005
java.lang.IllegalArgumentException: Attempt to remove nonexistent path 
ClassPath[Entry[jar:file:/D:/common/java/jdk1.5.0_05/jre/lib/rt.jar!/], Entry
[jar:file:/D:/common/java/jdk1.5.0_05/jre/lib/i18n.jar!/], Entry
[jar:file:/D:/common/java/jdk1.5.0_05/jre/lib/sunrsasign.jar!/], Entry
[jar:file:/D:/common/java/jdk1.5.0_05/jre/lib/jsse.jar!/], Entry
[jar:file:/D:/common/java/jdk1.5.0_05/jre/lib/jce.jar!/], Entry
[jar:file:/D:/common/java/jdk1.5.0_05/jre/lib/charsets.jar!/], Entry
[file:/D:/common/java/jdk1.5.0_05/jre/classes/], Entry
[jar:file:/D:/common/java/jdk1.5.0_05/jre/lib/ext/comm.jar!/], Entry
[jar:file:/D:/common/java/jdk1.5.0_05/jre/lib/ext/dnsns.jar!/], Entry
[jar:file:/D:/common/java/jdk1.5.0_05/jre/lib/ext/localedata.jar!/], Entry
[jar:file:/D:/common/java/jdk1.5.0_05/jre/lib/ext/sunjce_provider.jar!/], Entry
[jar:file:/D:/common/java/jdk1.5.0_05/jre/lib/ext/sunpkcs11.jar!/]]
	at org.netbeans.api.java.classpath.GlobalPathRegistry.unregister
(GlobalPathRegistry.java:205)
	at 
org.netbeans.modules.web.project.WebProject$ProjectOpenedHookImpl.projectClosed
(WebProject.java:786)
	at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectClosed
(ProjectOpenedHook.java:53)
[catch] at org.netbeans.modules.project.ui.OpenProjectList.notifyClosed
(OpenProjectList.java:532)
	at org.netbeans.modules.project.ui.OpenProjectList.close
(OpenProjectList.java:292)
	at org.netbeans.modules.project.ui.actions.CloseProject.actionPerformed
(CloseProject.java:58)
	at 
org.netbeans.modules.project.ui.actions.LookupSensitiveAction.actionPerformed
(LookupSensitiveAction.java:100)
	at javax.swing.AbstractButton.fireActionPerformed
(AbstractButton.java:1849)
	at javax.swing.AbstractButton$Handler.actionPerformed
(AbstractButton.java:2169)
	at javax.swing.DefaultButtonModel.fireActionPerformed
(DefaultButtonModel.java:420)
	at javax.swing.DefaultButtonModel.setPressed
(DefaultButtonModel.java:258)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick
(BasicMenuItemUI.java:1000)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased
(BasicMenuItemUI.java:1041)
	at java.awt.AWTEventMulticaster.mouseReleased
(AWTEventMulticaster.java:231)
	at java.awt.Component.processMouseEvent(Component.java:5488)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
	at java.awt.Component.processEvent(Component.java:5253)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3955)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3803)
	at java.awt.LightweightDispatcher.retargetMouseEvent
(Container.java:4212)
	at java.awt.LightweightDispatcher.processMouseEvent
(Container.java:3892)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1774)
	at java.awt.Component.dispatchEvent(Component.java:3803)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Marian Mirilovic 2005-11-20 21:55:51 UTC
*** Issue 68993 has been marked as a duplicate of this issue. ***
Comment 2 Jan Lahoda 2005-11-21 16:51:33 UTC
Re the IllegalArgumentException during closing the project: it is probably
consequence of the exception at the start.

Jesse, the exception starts with:
java.io.IOException: javax.xml.transform.TransformerConfigurationException: 
Could not compile stylesheet
	at org.openide.xml.XMLUtil.write(XMLUtil.java:396)
	at org.netbeans.spi.project.support.ant.AntProjectHelper$2.run
(AntProjectHelper.java:279)

Do you have any idea?
Comment 3 jxt 2005-11-21 16:55:53 UTC
I'm not sure if this message was to me or not. My name is Johnny, not Jesse, 
but nevermind that.

> Do you have any idea?

None. I have never touched a "StyleSheet" in NetBeans. Didn't even know there 
was such a thing.
Comment 4 Jan Lahoda 2005-11-21 17:08:30 UTC
Well, the question was for jglick, but thanks for the answer anyway :-).
Comment 5 Jan Lahoda 2005-12-02 22:00:21 UTC
I have probably found the root of the problem.

First of all, a reproducible test case (verified on Linux+JDK1.5.0_05):
1. Download the attached archive.
2. Unpack it into a NetBeans checkout, under contrib, and build.
3. Start the IDE.
4. The IOException very similar to the one above is printed to the console.

All the module does is that it writes an XML using XMLUtil.write in
ModuleInstall.restored (which is what happened to the reported, according to the
stack trace).

AFAIK, the problem may occur only if project data are written during the IDE
startup.

The problem is as follows:
1. the XMLUtil.write uses XMLUtil.class.getClassLoader as the context
classloader as a workaround for issue #66563 (see XMLUtil.java:379).
2. Class SAXFactoryImpl class *cannot* be loaded by this classloader (this class
is in startup "module" (core.jar), which is not on the same classpath as
org-openide-util.jar).
3. System property "javax.xml.parsers.SAXParserFactory" is set to
"org.netbeans.core.startup.SAXFactoryImpl".
4. javax.xml.parsers.FactoryFinder at line 145 (in JDK1.5.0_05) reads this
property and tries to resolve the SAXFactoryImpl class, but it can not (point 2).
5. This (after some try-catches, etc.) leads into the excpetions above.

Reason why this is reproducible only during startup is that when the IDE is
fully started, the TopSecurityManager is registered and denies access to
"javax.xml.parsers.SAXParserFactory" property if
"org.netbeans.core.startup.SAXFactoryImpl" cannot be resolved by the context
classloader.

Jarda, Jesse any idea how to solve the problem?
Comment 6 Jan Lahoda 2005-12-02 22:01:37 UTC
Created attachment 27510 [details]
Test module.
Comment 7 Jan Lahoda 2005-12-02 22:09:05 UTC
One more note: when the TopSecurityManager denies the access to
"javax.xml.parsers.SAXParserFactory", the javax.xml.parsers.FactoryFinder
handles the situation correctly.
Comment 8 Jaroslav Tulach 2005-12-03 08:32:45 UTC
I am not sure why this is assigned to me. Nejedlak work on the XML tricks, I just 
watched... 
Comment 9 Jan Lahoda 2005-12-03 12:17:10 UTC
Well, feel free to reassign as necessary.

I assigned it to you because I think it is more classloading/startup sequence
problem than an XML problem. But maybe it is for Jesse who did the workaround
for issue #66563, I do not know.
Comment 10 Jesse Glick 2005-12-03 19:28:28 UTC
Maybe we should stop using the system property
"javax.xml.parsers.SAXParserFactory", and get rid of the hack in TSM. Surely
there is some other way to register our preferred factory as a default, e.g.
overriding ClassLoader.findResources for the context loader.

For that matter, I'm not really clear on what SAXFactoryImpl is actually for.
What happens if you just delete it? The Javadoc is not very illuminating.
Comment 11 Jesse Glick 2005-12-03 19:29:13 UTC
Seems that Petr is the only one who can really evaluate this.
Comment 12 Jan Lahoda 2005-12-05 09:45:11 UTC
*** Issue 69845 has been marked as a duplicate of this issue. ***
Comment 13 Jan Lahoda 2005-12-05 10:52:55 UTC
I think this should be *somehow* resolved for NB5.0. In the very worst case, we
can remove the workaround for issue #66563 (though I would prefer a better
solution).
Comment 14 Petr Nejedly 2005-12-05 15:25:58 UTC
The consequences of removing our factory: There will be startup time and
footprint regression, we'll load two implementations of xerces during startup.
It needs to be remeasured if it is still the case/problem. CCing Radim

Re. registering our factory in a different way: We tried several ways before and
thanks to some problems and incompatibilities between JDKs (1.4, 1.5), we went
with this ugly hack finally, which worked pretty well before Jesse's change. 
Comment 15 Jan Lahoda 2005-12-05 16:13:26 UTC
After an offline discussion, the proposal is to use SAXFactoryImpl's classloader
as the context classloader rather than the XMLUtil's. I am attaching a working
patch and reassigning to Jarda as agreed.
Comment 16 Jan Lahoda 2005-12-05 16:14:34 UTC
Created attachment 27555 [details]
A working patch.
Comment 17 Jesse Glick 2005-12-05 18:52:54 UTC
Several problems with the proposed patch; most serious being use of Lookup here,
when there is no guarantee for standalone apps & unit tests that Lookup contains
a ClassLoader instance; and hardcoding of info about core. Suggest simpler and
more general:

ClassLoader target = XMLUtil.class.getClassLoader();
String impl = System.getProperty("javax.xml.parsers.SAXParserFactory");
if (impl != null) { // #68942 workaround
    try {
        target = orig.loadClass(impl).getClassLoader();
    } catch (ClassNotFoundException e) {
        // ignore
    }
}
Thread.currentThread().setContextClassLoader(target);

Still, would prefer to think about some longer-term solution which would let us
remove this system property, and make our parser optimization safer and more
transparent to other parts of the system. Perhaps XML parsing code in core
should call some utility method to find the same SAXParserFactory as would be
produced by the xerces module (if that module can be found in the usual
location). Or perhaps it is possible for core to (normally) avoid *any* XML
parsing before the context class loader is set - I think we just need to check
Modules/*.xml files, and these already use a simple hand-written parser for the
optimistic case (no strange formatting).
Comment 18 Jan Lahoda 2005-12-05 20:54:49 UTC
Re: dependency on core: agreed.
Re: Lookup.getDefault().lookup(ClassLoader.class) == null: we (me and Petr) were
considering this, using our patch this leads to use
XMLUtil.class.getClassLoader() (the NPE should be catched and ignored).
Moreover, I would be carefull with using the current context classloader, as it
may already be set to something special/strange (or no? I am not familiar with
this stuff). So maybe:
ClassLoader global = (ClassLoader) Lookup.getDefault().lookup(ClassLoader.class);

global = global != null ? global : orig;

would work best.
Comment 19 Jaroslav Tulach 2005-12-06 15:41:18 UTC
/cvs/openide/util/arch.xml,v  <--  arch.xml 
new revision: 1.4; previous revision: 1.3 
done 
Checking in openide/util/src/org/openide/xml/XMLUtil.java; 
/cvs/openide/util/src/org/openide/xml/XMLUtil.java,v  <--  XMLUtil.java 
new revision: 1.8; previous revision: 1.7 
done 
RCS 
file: /cvs/openide/util/test/unit/src/org/openide/xml/XMLUtil68942Test.java,v 
done 
Checking in openide/util/test/unit/src/org/openide/xml/XMLUtil68942Test.java; 
/cvs/openide/util/test/unit/src/org/openide/xml/XMLUtil68942Test.java,v  <--  
XMLUtil68942Test.java 
initial revision: 1.1 
done 
Checking in openide/util/test/unit/src/org/openide/xml/XMLUtilTest.java; 
/cvs/openide/util/test/unit/src/org/openide/xml/XMLUtilTest.java,v  <--  
XMLUtilTest.java 
new revision: 1.7; previous revision: 1.6 
done 
Checking in core/startup/src/org/netbeans/core/startup/DOMFactoryImpl.java; 
/cvs/core/startup/src/org/netbeans/core/startup/DOMFactoryImpl.java,v  <--  
DOMFactoryImpl.java 
new revision: 1.2; previous revision: 1.1 
done 
Checking in core/startup/src/org/netbeans/core/startup/SAXFactoryImpl.java; 
/cvs/core/startup/src/org/netbeans/core/startup/SAXFactoryImpl.java,v  <--  
SAXFactoryImpl.java 
new revision: 1.2; previous revision: 1.1 
done 
 
Comment 20 Jesse Glick 2005-12-06 22:43:31 UTC
Any particular reason you hardcoded a dep on core impl rather than using my
suggested

String impl = System.getProperty("javax.xml.parsers.SAXParserFactory");

?

Also, why the no-op change to XMLUtilTest.java?
Comment 21 Jan Lahoda 2005-12-07 16:16:08 UTC
I confirm that the patch solves the problem for me. I will change it to use the
property rather than a hardcoded classname.
Comment 22 Jaroslav Tulach 2005-12-07 18:50:57 UTC
Sorry, I have not noticed the comment with property. Bad thing on it is that 
the test and arch document will need changes, which was 70% of work... 
Comment 23 Radko Najman 2005-12-09 14:15:20 UTC
*** Issue 69345 has been marked as a duplicate of this issue. ***
Comment 24 Jan Lahoda 2005-12-19 08:52:22 UTC
Seems to be not so simple to use the system property instead of the hardcoded
class name (there are some problems in tests). I have filled issue #70576 to
cover this.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo