XMLReaderFactory in Mendix5.10

2
Hi everyone, I have an java action which creates XMLReader as follows final XMLReader parser = XMLReaderFactory.createXMLReader(); (at line 50 of ParseXmlDocument_JavaAction.java) In Mendix 5.9, it works well. However, I updated the project to 5.10. And now: -The first time I call the action, I got an error: com.mendix.core.CoreException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.sun.org.apache.xerces.internal.impl.dv.DVFactoryException: DTD factory class com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory. at com.mendix.core.component.InternalCore.execute(InternalCore.java:274) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.sun.org.apache.xerces.internal.impl.dv.DVFactoryException: DTD factory class com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory. at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:217) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.sun.org.apache.xerces.internal.impl.dv.DVFactoryException: DTD factory class com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory. at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:43) Caused by: com.sun.org.apache.xerces.internal.impl.dv.DVFactoryException: DTD factory class com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory. at com.sun.org.apache.xerces.internal.impl.dv.DTDDVFactory.getInstance(DTDDVFactory.java:67) at com.sun.org.apache.xerces.internal.impl.dv.DTDDVFactory.getInstance(DTDDVFactory.java:49) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.<init>(XML11Configuration.java:578) at com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration.<init>(XIncludeAwareParserConfiguration.java:130) at com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration.<init>(XIncludeAwareParserConfiguration.java:91) at com.sun.org.apache.xerces.internal.parsers.SAXParser.<init>(SAXParser.java:111) at com.sun.org.apache.xerces.internal.parsers.SAXParser.<init>(SAXParser.java:96) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at java.lang.Class.newInstance(Class.java:374) at org.xml.sax.helpers.NewInstance.newInstance(NewInstance.java:84) at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:228) at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:191) at dom.actions.ParseXmlDocument_JavaAction.executeAction(ParseXmlDocument_JavaAction.java:50) at dom.actions.ParseXmlDocument_JavaAction.executeAction(ParseXmlDocument_JavaAction.java:27) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:53) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:291) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:276) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:204) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:37) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:199) at com.mendix.core.component.InternalCore.execute(InternalCore.java:262) at com.mendix.modules.microflowengine.actions.actioncall.JavaAction.execute(JavaAction.scala:42) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:193) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:148) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:53) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:291) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:276) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:204) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:37) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:199) at com.mendix.core.component.InternalCore.executeSync(InternalCore.java:235) at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SubMicroflowAction.scala:33) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:193) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:148) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:53) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:291) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:276) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:204) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:37) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:199) at com.mendix.core.component.InternalCore.executeSync(InternalCore.java:235) at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SubMicroflowAction.scala:33) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:193) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:148) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:53) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:291) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:276) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:204) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:37) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:199) at com.mendix.core.component.InternalCore.execute(InternalCore.java:262) at com.mendix.webui.actions.client.ExecuteAction.execute(ExecuteAction.java:135) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply$mcV$sp(ClientRequestHandler.scala:300) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:293) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:293) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2$$anon$1.execute(ActionDispatching.scala:158) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:37) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(ActionDispatching.scala:160) at scala.util.Try$.apply(Try.scala:191) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(ActionDispatching.scala:154) at akka.actor.Actor$class.aroundReceive(Actor.scala:465) at com.mendix.core.session.Worker.aroundReceive(ActionDispatching.scala:147) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) at akka.actor.ActorCell.invoke(ActorCell.scala:487) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) at akka.dispatch.Mailbox.run(Mailbox.scala:220) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) -The second time, it works well. Does anyone have the same problem and have solution for this issue. Best regards,
asked
1 answers
1

Change it to:

XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
answered