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 215667 - NoClassDefFoundError: Could not initialize class org.apache.xerces.impl.xs.traversers.XSAttributeChecker
Summary: NoClassDefFoundError: Could not initialize class org.apache.xerces.impl.xs.tr...
Status: RESOLVED WORKSFORME
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-18 07:29 UTC by johnny_bit
Modified: 2012-08-04 15:26 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 170703


Attachments
stacktrace (3.14 KB, text/plain)
2012-07-18 07:29 UTC, johnny_bit
Details

Note You need to log in before you can comment on or make changes to this bug.
Description johnny_bit 2012-07-18 07:29:44 UTC
Build: NetBeans IDE 7.1.2 (Build 20120427-unknown-revn)
VM: OpenJDK Client VM, 20.0-b12, OpenJDK Runtime Environment, 1.6.0_24-b24
OS: Linux

User Comments:
GUEST: ?????????????

johnny_bit: I wanted to open one of my PHP projetcs that was closed du to the same problem.

johnny_bit: I was opening up netbeans when this popped. This also caused 5 of 6 open projects to be closed.

GUEST: some problem with net beans .suddenly crashing down

GUEST: ??6.9.1???




Stacktrace: 
java.lang.NoClassDefFoundError: Could not initialize class org.apache.xerces.impl.xs.traversers.XSAttributeChecker
   at org.apache.xerces.impl.xs.traversers.XSDHandler.createTraversers(XSDHandler.java:0)
   at org.apache.xerces.impl.xs.traversers.XSDHandler.prepareForTraverse(XSDHandler.java:0)
   at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:0)
   at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:0)
   at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:0)
   at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:0)
Comment 1 johnny_bit 2012-07-18 07:29:47 UTC
Created attachment 122138 [details]
stacktrace
Comment 2 Jaroslav Tulach 2012-07-21 06:19:55 UTC
Most of problems start with:

java.lang.NoSuchFieldError: fGlobalAttrDeclsExt
	at org.apache.xerces.impl.xs.SchemaGrammar$Schema4Annotations.<init>(Unknown Source)
	at org.apache.xerces.impl.xs.SchemaGrammar$Schema4Annotations.<clinit>(Unknown Source)
	at org.apache.xerces.impl.xs.SchemaGrammar.<clinit>(Unknown Source)
	at org.apache.xerces.impl.xs.traversers.XSAttributeChecker.<clinit>(Unknown Source)
	at org.apache.xerces.impl.xs.traversers.XSDHandler.createTraversers(Unknown Source)
	at org.apache.xerces.impl.xs.traversers.XSDHandler.prepareForTraverse(Unknown Source)
	at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)

Then there is one 

java.lang.VerifyError: (class: org/apache/xerces/impl/xpath/regex/RegexParser, method: decodeEscaped signature: ()I) Unsorted lookup switch
	at org.apache.xerces.impl.xpath.regex.RegularExpression.setPattern(Unknown Source)
	at org.apache.xerces.impl.xpath.regex.RegularExpression.setPattern(Unknown Source)
	at org.apache.xerces.impl.xpath.regex.RegularExpression.<init>(Unknown Source)
	at org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl.applyFacets(Unknown Source)
	at org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl.applyFacets1(Unknown Source)
	at org.apache.xerces.impl.dv.xs.SchemaDVFactoryImpl.createBuiltInTypes(Unknown Source)
	at org.apache.xerces.impl.dv.xs.SchemaDVFactoryImpl.<clinit>(Unknown Source)

Some of the reports are on IcedTea which may explain why the parser is loaded from org.apache. But I am not sure whether the parser is loaded from JDK or from our own packaged xerces library. Can our XML gurus look at the issue?
Comment 3 Svata Dedic 2012-08-02 13:43:39 UTC
I probably need more detailed info. I used a fresh 7.1.2 installation, run on OpenJDK  (OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)), then on JDK 1.7 -- no error appeared. Some of the reports show various errors as if the classfile was damaged somehow (verifier errors, truncated classfile), 

I can see that reports from johnny_bit use some custom-built NB installation ? 

Anyway, please provide exact steps how to get the error, provide build numbers of JDK + netbeans, or even download links so I can create matching environment. My system is Linx Ubuntu 64bit, can test on Linux JDKs.
Comment 4 johnny_bit 2012-08-04 09:43:09 UTC
You see - the problems were random, no steps to reproduce what so ever. I filled reports whether the error appeared. Usually IDE restart was sufficient to fix problem at hand.

About JDK and Netbeans: I use versions provided by Gentoo Linux. Now I am at NB 7.2.
Comment 5 Svata Dedic 2012-08-04 15:26:56 UTC
OK, please copy your IDE log, there are exact version numbers of both JDK and the IDE + activated modules. If the error happens because of some specific library present (or not present) in your environment, the log would be helful