While using the VMware SDK API to log in, I’m occasionally encountering a java.lang.IllegalStateException. I’m unsure of the cause. Can anyone provide assistance or insights on this issue?
Code for login:
vimPort.login(serviceContent.getSessionManager(), userName, password, null);
Exception Trace:
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.bind.v2.util.XmlFactory.createTransformerFactory(XmlFactory.java:191) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.createTransformerHandler(JAXBContextImpl.java:738) at com.sun.xml.bind.v2.runtime.unmarshaller.DomLoader$State.<init>(DomLoader.java:75) at com.sun.xml.bind.v2.runtime.unmarshaller.DomLoader.startElement(DomLoader.java:118) at com.sun.xml.bind.v2.runtime.unmarshaller.ProxyLoader.startElement(ProxyLoader.java:60) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:577) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:556) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:246) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:180) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:415) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:386) at com.sun.xml.ws.message.stream.StreamMessage.readPayloadAsJAXB(StreamMessage.java:299) at com.sun.xml.ws.api.message.MessageWrapper.readPayloadAsJAXB(MessageWrapper.java:161) at com.sun.xml.ws.fault.SOAPFaultBuilder.create(SOAPFaultBuilder.java:523) at com.sun.xml.ws.client.sei.StubHandler.readResponse(StubHandler.java:222) at com.sun.xml.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:176) at com.sun.xml.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:263) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:62) at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:131) at com.sun.proxy.$Proxy53.login(Unknown Source)
To replicate the IllegalStateException, I have experimented with a single VMWARE connection to retrieve metrics using multi-threading, and I close the connection prior to fetching the metrics using VimPortType.
dharma sakthi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.