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
Similar problems happen when working with JUnit, which also does a lot of its own ClassLoader work.