Software Development Kit (SDK) and API Discussions
Software Development Kit (SDK) and API Discussions
Hello,
Could you help on this error plz?
when trying to send a request i get this:
Caused by: java.lang.IllegalStateException: Unable to determine StAX implementation: class __redirected.__XMLInputFactory at com.netapp.nmsdk.common.xml.JaxpContext$Stax.detectStaxImplementation(JaxpContext.java:161) at com.netapp.nmsdk.common.xml.JaxpContext$Stax.<init>(JaxpContext.java:70) at com.netapp.nmsdk.common.xml.JaxpContext$Stax.<init>(JaxpContext.java:44) at com.netapp.nmsdk.common.xml.JaxpContext.<clinit>(JaxpContext.java:35)
After trying again, the error changes and i get this:
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.netapp.nmsdk.common.xml.JaxpContext at com.netapp.nmsdk.client.XmlApiInvocation.writeRequest(XmlApiInvocation.java:81) at com.netapp.nmsdk.client.ApiInvocation.invoke(ApiInvocation.java:109) at com.netapp.nmsdk.client.XmlApiInvocation.invoke(XmlApiInvocation.java:42) at com.netapp.nmsdk.client.ApiRunner.run(ApiRunner.java:135) at com.netapp.nmsdk.client.ApiRunner.run(ApiRunner.java:105) at com.netapp.nmsdk.client.ApiIteratorSupport$GetIterStyleIterator.retrieveNextBatch(ApiIteratorSupport.java:182) at com.netapp.nmsdk.client.ApiIteratorSupport$ApiIterator.retrieveNextBatchIfNecessary(ApiIteratorSupport.java:125) at com.netapp.nmsdk.client.ApiIteratorSupport$ApiIterator.hasNext(ApiIteratorSupport.java:102)
the JaxpContext is there (in com.netapp.nmsdk.client) but i dont have the source code to check what it needs.
Can you list the necessary dependencies to other libraries? I am curretnly using the following.
nmsdk-runtime 5.6
ontap-api 8.3.1
commons-lang 2.6
commons-io 2.4
commons-codec 1.8
Thank you!
Solved! See The Solution
I have responded to @Nexica privately, but for the community's knowledge, this has been created as a bug. Please let me know if you have any questions.
Andrew
We investigated and found the problem:
This is happening when using WildFly 10.1.0 Final, which uses a Proxy Implementation of WOODSTOX and cannot be detected as a valid implementation of StaxImplementation in JaxpContext. The problem lies on these lines:
public static enum StaxImplementation { WOODSTOX{ @Override boolean isInstance(XMLInputFactory xmlInputFactory) { try { return Class.forName("com.ctc.wstx.stax.WstxInputFactory", true, Thread.currentThread().getContextClassLoader()).isInstance(xmlInputFactory); } catch (ClassNotFoundException e) { return false; } }
And the solution we tried is this one:
public static enum StaxImplementation { WOODSTOX { @Override boolean isInstance(XMLInputFactory xmlInputFactory) { try { try { if ((xmlInputFactory.getProperty("org.codehaus.stax2.implVersion") == null)) { return Class.forName("com.ctc.wstx.stax.WstxInputFactory",true,
Thread.currentThread().getContextClassLoader()) .isInstance(xmlInputFactory); } } catch (IllegalArgumentException e) { return Class.forName("com.ctc.wstx.stax.WstxInputFactory", true, Thread.currentThread().getContextClassLoader()).isInstance(xmlInputFactory); } return true; } catch (ClassNotFoundException e) { return false; } }
reference: https://github.com/jamesagnew/hapi-fhir/issues/551
We would appreciate if you could solve this issue in the next release.
Thank you
I have responded to @Nexica privately, but for the community's knowledge, this has been created as a bug. Please let me know if you have any questions.
Andrew