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 34725

Summary: ClassNotFoundException during ant build
Product: projects Reporter: paulbrickell <paulbrickell>
Component: AntAssignee: issues@projects <issues>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P3    
Version: 3.x   
Hardware: PC   
OS: Windows ME/2000   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 34204    
Bug Blocks:    

Description paulbrickell 2003-07-02 12:44:29 UTC
I have an ant build script that employs the 
com.sun.tools.xjc.XJCTask task for generating JAXB classes. 
When I execute this script from the command line using the 
latest stable ant release I have no problem. However when I 
run this script within the IDE I get a fault dialog 
detailing a ClassNotFoundException.

My IDE log is as follows

*********** Exception occurred ************ at Wed Jul 02 
12:10:35 BST 2003
javax.xml.parsers.FactoryConfigurationError: Provider 
org.netbeans.core.xml.NbSAXParserFactoryImpl not found
	at javax.xml.parsers.SAXParserFactory.newInstance
(SAXParserFactory.java:93)
	at 
com.sun.tools.xjc.reader.internalizer.DOMForest.<init>
(DOMForest.java:80)
	at com.sun.tools.xjc.GrammarLoader.buildDOMForest
(GrammarLoader.java:295)
	at com.sun.tools.xjc.GrammarLoader.loadXMLSchema
(GrammarLoader.java:346)
	at com.sun.tools.xjc.GrammarLoader.load
(GrammarLoader.java:125)
	at com.sun.tools.xjc.GrammarLoader.load
(GrammarLoader.java:71)
	at com.sun.tools.xjc.XJCTask._doXJC
(XJCTask.java:325)
	at com.sun.tools.xjc.XJCTask.doXJC(XJCTask.java:277)
	at com.sun.tools.xjc.XJCTask.execute
(XJCTask.java:221)
	at org.apache.tools.ant.Task.perform(Task.java:319)
	at org.apache.tools.ant.Target.execute
(Target.java:309)
	at org.apache.tools.ant.Target.performTasks
(Target.java:336)
	at org.apache.tools.ant.Project.executeTarget
(Project.java:1306)
	at org.apache.tools.ant.Project.executeTargets
(Project.java:1250)
	at 
org.apache.tools.ant.module.run.TargetExecutor.run
(TargetExecutor.java:331)
[catch] at org.netbeans.core.execution.RunClassThread.run
(RunClassThread.java:118)
==>
java.lang.ClassNotFoundException: 
org.netbeans.core.xml.NbSAXParserFactoryImpl
	at 
org.apache.tools.ant.AntClassLoader.findClassInComponents
(AntClassLoader.java:1076)
	at org.apache.tools.ant.AntClassLoader.findClass
(AntClassLoader.java:1037)
	at org.apache.tools.ant.AntClassLoader.loadClass
(AntClassLoader.java:926)
	at java.lang.ClassLoader.loadClass
(ClassLoader.java:262)
	at javax.xml.parsers.FactoryFinder.newInstance
(FactoryFinder.java:93)
	at javax.xml.parsers.FactoryFinder.find
(FactoryFinder.java:129)
	at javax.xml.parsers.SAXParserFactory.newInstance
(SAXParserFactory.java:87)
	at 
com.sun.tools.xjc.reader.internalizer.DOMForest.<init>
(DOMForest.java:80)
	at com.sun.tools.xjc.GrammarLoader.buildDOMForest
(GrammarLoader.java:295)
	at com.sun.tools.xjc.GrammarLoader.loadXMLSchema
(GrammarLoader.java:346)
	at com.sun.tools.xjc.GrammarLoader.load
(GrammarLoader.java:125)
	at com.sun.tools.xjc.GrammarLoader.load
(GrammarLoader.java:71)
	at com.sun.tools.xjc.XJCTask._doXJC
(XJCTask.java:325)
	at com.sun.tools.xjc.XJCTask.doXJC(XJCTask.java:277)
	at com.sun.tools.xjc.XJCTask.execute
(XJCTask.java:221)
	at org.apache.tools.ant.Task.perform(Task.java:319)
	at org.apache.tools.ant.Target.execute
(Target.java:309)
	at org.apache.tools.ant.Target.performTasks
(Target.java:336)
	at org.apache.tools.ant.Project.executeTarget
(Project.java:1306)
	at org.apache.tools.ant.Project.executeTargets
(Project.java:1250)
	at 
org.apache.tools.ant.module.run.TargetExecutor.run
(TargetExecutor.java:331)
[catch] at org.netbeans.core.execution.RunClassThread.run
(RunClassThread.java:118)
Comment 1 Jesse Glick 2003-07-03 15:36:50 UTC
[BTW: next time please attach stack traces and logs etc. as Issuezilla
attachments, not pasted into the description field where they
word-wrap and make it hard to find the actual comments - thanks.]

Already fixed in the dev builds for NB 4.0; this class is gone. That
leaves open the question of what to do in NB 3.5.

I think some workaround could be possible in the Ant module, or in the
NetBeans core. I am not sure if there is any workaround possible as a
user (i.e. without patching NetBeans sources).

I could have sworn that someone else had this exact same problem, but
now I can't find that issue report.
Comment 2 paulbrickell 2003-07-04 22:20:12 UTC
Sorry for the bad form reporting the issue (first time 
user). My workaround is to execute the script from the 
command line, so this is really non-critical. Looking 
forqard to 4.0.
Comment 3 Jesse Glick 2003-07-08 04:10:24 UTC
See also issue #29528, also with XJC.
Comment 4 Marian Mirilovic 2005-07-13 13:23:05 UTC
closed