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 147082 - FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found
Summary: FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryIm...
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Module System (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@javaee
URL:
Keywords:
Depends on:
Blocks: 146082
  Show dependency tree
 
Reported: 2008-09-12 13:57 UTC by Martin Schovanek
Modified: 2008-12-23 08:43 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
log (21.01 KB, text/plain)
2008-09-12 13:58 UTC, Martin Schovanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schovanek 2008-09-12 13:57:40 UTC
[#200820080911233422, jdk1.5.0_15]

Got this exception from web.debug qa-funtional tests (and some others), then IDE crashes. So I add -Djaxp.debug=1
ptoperty and got following output, see the log.
Comment 1 Martin Schovanek 2008-09-12 13:58:16 UTC
Created attachment 69751 [details]
log
Comment 2 Martin Schovanek 2008-09-12 14:06:36 UTC
So I greped the binary tests distro for javax.xml.parsers.SAXParserFactory providers and found only
extralibs/xerces-2.8.0.jar . But do not have a clue how it get to classpath and how it causes the problem. Or the
problem is somewhere else?
Comment 3 Jesse Glick 2008-09-12 17:35:10 UTC
xerces.jar is indeed in the functional test's CP, probably as a recursive dep from some other module. Delete it if you
do not want it there. The harness does not specifically add this library to your CP.

I don't know offhand why JAXP would fail to load the Xerces impl if it were in your CP; this could perhaps be a bug in
NbModuleSuite (IZ: xtest/nbjunit).

The workaround for issue #139048 in the Ant module could interact with JAXP but this should only apply to use of XML
factories when running Ant builds from the tested IDE, whereas your problem is during IDE startup.
Comment 4 Jesse Glick 2008-09-12 17:48:53 UTC
Regarding the hypothetical bug in NbModuleSuite - if true, this would somehow involve the special ClassLoader's it
creates, and could be reported separately if accompanied by a self-contained reproducible test case.
Comment 5 Martin Schovanek 2008-09-15 11:21:30 UTC
According to Jarda's comment in issue #139048 a similar problem was fixed at SAXFactoryImpl.java by:
http://hg.netbeans.org/core-main/rev/badd42b05bc7
but this class was removed by http://hg.netbeans.org/main/rev/0306dee3c170.
Next the FactoryConfigurationError and the commit appeared at the same time.

So I tend to suspect this commit.

Comment 6 Jesse Glick 2008-09-15 12:58:12 UTC
Need to work around a JRE bug which prevents factories from working in case xerces.jar is on the app CP: core-main
#772e850e28f2

Anyway it is probably wrong for web.debug to have xerces in its test CP; I have removed it from java.j2seproject and
java.project but other usages remain in editor, web.core, etc.
Comment 7 Quality Engineering 2008-09-17 06:03:38 UTC
Integrated into 'main-golden', will be available in build *200809170201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/772e850e28f2
User: Jesse Glick <jglick@netbeans.org>
Log: #147082: refine fix of #146082 to work around a JAXP bug.