I am developing an Eclipse RCP Application on my target platform. (*.target file)
I called org.eclipse.sphinx.emf.resource.ExtendedXMLLoadImpl to load an xml file(it is arxml file).
And there is a comment in this file (ExtendedXMLLoadImpl) as the following :
!! Important Note !! Requires org.apache.xerces parser (but not com.sun.org.apache.xerces parser) to be used.
I am using 2021-09 Eclipse with Open JDK 17. And there is java.xml feature in SDK, and I also added 'org.apache.xerces parser' plugin on my target platform.
The exception that I've got is the following:
java.lang.ClassCastException: class org.eclipse.sphinx.emf.resource.ExtendedErrorHandlerWrapper cannot be cast to class com.sun.org.apache.xerces.internal.xni.parser.XMLErrorHandler (org.eclipse.sphinx.emf.resource.ExtendedErrorHandlerWrapper is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @2c037e2b; com.sun.org.apache.xerces.internal.xni.parser.XMLErrorHandler is in module java.xml of loader 'bootstrap') at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.setProperty(XMLErrorReporter.java:548) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.setProperty(XML11Configuration.java:1000) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.setProperty(AbstractSAXParser.java:1956) at java.xml/com.sun.org.apache.xerces.internal.parsers.SAXParser.setProperty(SAXParser.java:177) at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.setProperty(SAXParserImpl.java:575) at org.eclipse.sphinx.emf.resource.ExtendedXMLLoadImpl.load(ExtendedXMLLoadImpl.java:181) at org.artop.aal.common.resource.impl.AutosarXMLResourceImpl.doLoad(AutosarXMLResourceImpl.java:354) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1563) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1342)
I need some help to solve this problem.
Thanks.