NoClassDefFoundError for Xerces when calling EditorVariables.getAllFrameworksDirs()
Post here questions and problems related to oXygen frameworks/document types.
NoClassDefFoundError for Xerces when calling EditorVariables.getAllFrameworksDirs()
In 18.1, from within an action implemented in a framework, if I call EditorVariables.getAllFrameworksDirs(), I get the following exception:
I tried adding "${oxygenHome}/lib/xercesImpl.jar" to the framework classpath, but it doesn't help. How can I configure my framework so that this will work? Alternatively, is there a better way to look up the base directory of a specific framework from Java?
Code: Select all
java.lang.NoClassDefFoundError: org/apache/xerces/parsers/SAXParser
at ro.sync.exml.options.yf.e(Unknown Source)
at ro.sync.exml.options.yf.k(Unknown Source)
at ro.sync.exml.options.v.h(Unknown Source)
at ro.sync.exml.options.yc.h(Unknown Source)
at ro.sync.exml.options.v.<init>(Unknown Source)
at ro.sync.exml.options.yc.<init>(Unknown Source)
at ro.sync.exml.options.yc.m(Unknown Source)
at ro.sync.exml.options.Options.init(Unknown Source)
at ro.sync.exml.options.Options.init(Unknown Source)
at ro.sync.exml.options.Options.getInstance(Unknown Source)
at ro.sync.exml.options.Options.getInstance(Unknown Source)
at ro.sync.util.editorvars.EditorVariables.getAdditionalFrameworksDirs(Unknown Source)
at ro.sync.util.editorvars.EditorVariables.getAllFrameworksDirs(Unknown Source)
Re: NoClassDefFoundError for Xerces when calling EditorVariables.getAllFrameworksDirs()
Hi Chris,
Oxygen has its own class loader which loads all the JAR libraries in its "lib" directory including the Xerces libraries.
Each framework's Java extensions (including actions) run in a separate class loader (which contain all the JAR libraries referenced in the "Classpath" list) which has as parent class loader the Oxygen class loader.
So the "Classpath" list for a framework should be minimal, it should refer only the JAR library containing the custom Java extension implementations, for example it must not refer to the main Oxygen JAR library or to the Xerces library as the parent class loader loads those.
Do you obtain these problems when running Oxygen using its regular startup script or command line executable or do you somehow debug Oxygen by starting it with a custom classpath (from Eclipse for example)?
Regards,
Radu
Oxygen has its own class loader which loads all the JAR libraries in its "lib" directory including the Xerces libraries.
Each framework's Java extensions (including actions) run in a separate class loader (which contain all the JAR libraries referenced in the "Classpath" list) which has as parent class loader the Oxygen class loader.
So the "Classpath" list for a framework should be minimal, it should refer only the JAR library containing the custom Java extension implementations, for example it must not refer to the main Oxygen JAR library or to the Xerces library as the parent class loader loads those.
Do you obtain these problems when running Oxygen using its regular startup script or command line executable or do you somehow debug Oxygen by starting it with a custom classpath (from Eclipse for example)?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service