VMware {code} Community
vijaybhosale
Contributor
Contributor

Getting Exception "HostCommunicationFault"

Hi,

While communicating with VC using VI SDK we are getting below exception intermittently in our java client.

AxisFault

faultCode: ServerFaultCode

faultSubcode:

faultString: An error occurred while communicating with the remote host.

faultActor:

faultNode:

faultDetail:

HostCommunicationFault:null

An error occurred while communicating with the remote host.

at sun.reflect.GeneratedConstructorAccessor180.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at java.lang.Class.newInstance0(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:104)

at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:90)

at com.vmware.vim.HostCommunication.getDeserializer(HostCommunication.java:84)

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

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

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

at org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:154)

at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:84)

at org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:464)

at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:547)

at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)

at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)

at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)

at javax.xml.parsers.SAXParser.parse(Unknown Source)

at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)

at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)

at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)

at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)

at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)

at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)

at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

at org.apache.axis.client.Call.invoke(Call.java:2767)

at org.apache.axis.client.Call.invoke(Call.java:2443)

at org.apache.axis.client.Call.invoke(Call.java:2366)

at org.apache.axis.client.Call.invoke(Call.java:1812)

at com.vmware.vim.VimBindingStub.queryPerf(VimBindingStub.java:19416)

Axis logs not having any significant information, same as the VC logs.

But subsequent other requests returned successfully on the same session.

Does this means, if we put same request again will it be successful?

Thanks,

Vijay

0 Kudos
1 Reply
Steve_Jin
Expert
Expert

I think they might be a fault thrown from the server side. The nature of the fault is about HostCommunication, see com.vmware.vim.HostCommunication.getDeserializer(HostCommunication.java:84) in your stack. Somehow the AXIS engine didn't work well to de-serialize the fault.

The VI Java API 2.0 includes a much faster, and much smaller web service engine. Give it a try and let me know if it works for you. I bet you will like it.

See the download link below.

Steve JIN, VMware Engineering

Creator of VMware Infrastructure Java API. VI Java API 2.0 --- 15 times faster than AXIS in loading, 4+ faster in deserialization; only 1/4 of the size required by AXIS. More importantly, the freedom to redistribute your applications. (Download, Samples, DocWiki, RSS Feed)

Get Connected with Other Developers in the Community?

Steve JIN Author of VMware VI and vSphere SDK; Creator of open source VI Java API (http://vijava.sf.net); Blogger at http://www.doublecloud.org
0 Kudos