Invalid JAXP Implementation

Hello,

I’ve developed artifacts for a SOAP webservice using the wsimport command in Java (JRE/JDK 1.8). These are packaged into a module and can be called from within Ignition. If the response is OK (i.e. not an Exception), I get the expected response in Ignition. However, if I try to test a SOAP exception, I get the error:
java.lang.IllegalStateException: java.lang.IllegalStateException: You are running with invalid JAXP api or implementation. JAXP api/implementation of version 1.3.1 (included in JDK6) or higher is required. In case you are using ant, make sure ant 1.7.0 or higher is used - older versions of ant contain JAXP api/impl version 1.2 (in xml-apis.jar). If you want to keep using older ant versions, you have to configure it to use higher the JAXP api/impl versions.

This works fine if I execute this in a non-Ignition Jython environment via Eclipse.

Any help resolving this would be appreciated.

Full stacktrace below.

Java Traceback:


	at org.python.core.Py.JavaError(Py.java:495)

	at org.python.core.Py.JavaError(Py.java:488)

	at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:188)

	at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:204)

	at org.python.core.PyObject.__call__(PyObject.java:404)

	at org.python.core.PyObject.__call__(PyObject.java:408)

	at org.python.core.PyMethod.__call__(PyMethod.java:124)

	at org.python.pycode._pyx29.APIVersion$1(<module:shared.custom.GetVersion>:19)

	at org.python.pycode._pyx29.call_function(<module:shared.custom.GetVersion>)

	at org.python.core.PyTableCode.call(PyTableCode.java:165)

	at org.python.core.PyBaseCode.call(PyBaseCode.java:166)

	at org.python.core.PyFunction.__call__(PyFunction.java:338)

	at org.python.pycode._pyx28.f$0(<buffer>:11)

	at org.python.pycode._pyx28.call_function(<buffer>)

	at org.python.core.PyTableCode.call(PyTableCode.java:165)

	at org.python.core.PyCode.call(PyCode.java:18)

	at org.python.core.Py.runCode(Py.java:1275)

	at org.python.core.Py.exec(Py.java:1319)

	at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:215)

	at org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter.java:89)

	at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java:70)

	at com.inductiveautomation.ignition.designer.gui.tools.jythonconsole.JythonConsole$InterpreterWorker.doInBackground(JythonConsole.java:476)

	at com.inductiveautomation.ignition.designer.gui.tools.jythonconsole.JythonConsole$InterpreterWorker.doInBackground(JythonConsole.java:464)

	at javax.swing.SwingWorker$1.call(Unknown Source)

	at java.util.concurrent.FutureTask.run(Unknown Source)

	at javax.swing.SwingWorker.run(Unknown Source)

	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

	at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.IllegalStateException: You are running with invalid JAXP api or implementation. JAXP api/implementation of version 1.3.1 (included in JDK6) or higher is required. In case you are using ant, make sure ant 1.7.0 or higher is used - older versions of ant contain JAXP api/impl version 1.2 (in xml-apis.jar). If you want to keep using older ant versions, you have to configure it to use higher the JAXP api/impl versions.

	at com.sun.xml.internal.bind.v2.util.XmlFactory.createTransformerFactory(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.createTransformerHandler(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.DomLoader$State.<init>(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.DomLoader.startElement(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.ProxyLoader.startElement(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unknown Source)

	at com.sun.xml.internal.ws.message.stream.StreamMessage.readPayloadAsJAXB(Unknown Source)

	at com.sun.xml.internal.ws.api.message.MessageWrapper.readPayloadAsJAXB(Unknown Source)

	at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.create(Unknown Source)

	at com.sun.xml.internal.ws.client.sei.StubHandler.readResponse(Unknown Source)

	at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(Unknown Source)

	at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(Unknown Source)

	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)

	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)

	at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown Source)

	at com.sun.proxy.$Proxy61.getAPIVersion(Unknown Source)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.lang.reflect.Method.invoke(Unknown Source)

	at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)

	... 26 more

Caused by: java.lang.AbstractMethodError: javax.xml.transform.TransformerFactory.setFeature(Ljava/lang/String;Z)V

	... 53 more

Traceback (most recent call last):
  File "<buffer>", line 8, in <module>
  File "<buffer>", line 8, in <module>
  File "<module:shared.custom>", line 12, in APIVersion
  File "<module:shared.custom.GetVersion>", line 12, in APIVersion
	at com.sun.xml.internal.bind.v2.util.XmlFactory.createTransformerFactory(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.createTransformerHandler(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.DomLoader$State.<init>(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.DomLoader.startElement(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.ProxyLoader.startElement(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unknown Source)

	at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unknown Source)

	at com.sun.xml.internal.ws.message.stream.StreamMessage.readPayloadAsJAXB(Unknown Source)

	at com.sun.xml.internal.ws.api.message.MessageWrapper.readPayloadAsJAXB(Unknown Source)

	at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.create(Unknown Source)

	at com.sun.xml.internal.ws.client.sei.StubHandler.readResponse(Unknown Source)

	at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(Unknown Source)

	at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(Unknown Source)

	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)

	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)

	at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown Source)

	at com.sun.proxy.$Proxy61.getAPIVersion(Unknown Source)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.lang.reflect.Method.invoke(Unknown Source)


java.lang.IllegalStateException: java.lang.IllegalStateException: You are running with invalid JAXP api or implementation. JAXP api/implementation of version 1.3.1 (included in JDK6) or higher is required. In case you are using ant, make sure ant 1.7.0 or higher is used - older versions of ant contain JAXP api/impl version 1.2 (in xml-apis.jar). If you want to keep using older ant versions, you have to configure it to use higher the JAXP api/impl versions.

What version of Java, what version of Ignition?

Can you upload your module so we can look at the full set of dependencies it includes?

Hi Kevin,

Thanks for the response. I can’t attach files, but here’s the module uploaded to OneDrive: https://vincienergies-my.sharepoint.com/:u:/g/personal/sahil_jain_vinci-energies_net/EbN63TyzTGxGgE0SULSPHLoB_vyRTCF8gV1e5ya0aMG-Aw?e=lQahnu

I can upload the source code too, if that would help.

I am using Java 1.8.0_201-b09 and Ignition 7.9.10. JRE and JDK are both installed, and JDK is set to the default.

The error above occurs only when the service throws a SOAP Fault exception (which suggests the issue occurs when it tries to deserialise the exception response XML).

If the service returns a valid non-Exception response, the response is parsed and returned correctly.

Sorry, I don’t really have any insight into what’s wrong.

It seems others have encountered this before: https://stackoverflow.com/questions/18493541/invalid-jaxp-api-when-unmarshaling-jaxb

Does it also happen when you make the SOAP call in a gateway-scoped script, or just client/designer?

It happens when in both client and gateway scoped scripts. No luck on my end either resolving this.

Continuing the discussion from Invalid JAXP Implementation:

Hi @sahil.jain

I am facing the same issue, can you please share your experience how exactly you were able to solve this problem

I never managed to resolve this issue. In my particular case, I ended up using the suds python package instead with a custom handler for managing SSL connection.