Bug 2395 - LinkageError and VerifyError
Summary: LinkageError and VerifyError
Status: NEW
Alias: None
Product: Xerces-J
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.4.1
Hardware: PC Linux
: P3 normal
Target Milestone: ---
Assignee: Xerces-J Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-06-29 07:11 UTC by Dave Walend
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Walend 2001-06-29 07:11:58 UTC
I've gotten LinkageErrors and VerifyErrors while using Xerces 1.4.1 inside jEdit
3.2pre3 with jdk 1.3.1 on linux. jEdit uses its own class loader. The rules for
class equivalence inside jvms require that a class be identical and come from
the same class loader. I fixed the problem by repackaging the xerces.jar archive
without the org/xml/ and javax/ directories.

Other people could have this problem when code they've written uses its own
class loader to load xerces. They may see it more, now that jdk1.4 is supplying
jaxp code.

My repackaged xerces.jar removed:

org/xml/
org/xml/sax/
org/xml/sax/AttributeList.class
org/xml/sax/Attributes.class
org/xml/sax/ContentHandler.class
org/xml/sax/DTDHandler.class
org/xml/sax/DocumentHandler.class
org/xml/sax/EntityResolver.class
org/xml/sax/ErrorHandler.class
org/xml/sax/HandlerBase.class
org/xml/sax/InputSource.class
org/xml/sax/Locator.class
org/xml/sax/Parser.class
org/xml/sax/SAXException.class
org/xml/sax/SAXNotRecognizedException.class
org/xml/sax/SAXNotSupportedException.class
org/xml/sax/SAXParseException.class
org/xml/sax/XMLFilter.class
org/xml/sax/XMLReader.class
org/xml/sax/helpers/
org/xml/sax/helpers/AttributeListImpl.class
org/xml/sax/helpers/AttributesImpl.class
org/xml/sax/helpers/DefaultHandler.class
org/xml/sax/helpers/LocatorImpl.class
org/xml/sax/helpers/NamespaceSupport$Context.class
org/xml/sax/helpers/NamespaceSupport.class
org/xml/sax/helpers/ParserAdapter$AttributeListAdapter.class
org/xml/sax/helpers/ParserAdapter.class
org/xml/sax/helpers/ParserFactory.class
org/xml/sax/helpers/XMLFilterImpl.class
org/xml/sax/helpers/XMLReaderAdapter$AttributesAdapter.class
org/xml/sax/helpers/XMLReaderAdapter.class
org/xml/sax/helpers/XMLReaderFactory.class
org/xml/sax/ext/
org/xml/sax/ext/DeclHandler.class
org/xml/sax/ext/LexicalHandler.class
javax/
javax/xml/
javax/xml/parsers/
javax/xml/parsers/DocumentBuilder.class
javax/xml/parsers/DocumentBuilderFactory.class
javax/xml/parsers/FactoryConfigurationError.class
javax/xml/parsers/ParserConfigurationException.class
javax/xml/parsers/SAXParser.class
javax/xml/parsers/SAXParserFactory.class


One way to solve it would be to have the xerces kit include two separate .jar
files, one with the code included in jdk1.4 and one with the xerces-specific
code. I don't know that this approach is the best way, though. 

Thanks,

Dave
dfw1@cornell.edu
Comment 1 Joe Shelby 2002-02-28 16:34:18 UTC
Similar problems happen when working with JUnit, which also does a lot of its
own ClassLoader work.