NullPointerException in ServiceV: AbstractDefinitionContext
I have a project in Ready! API, which has a Virt that I've started. When I try to access the Virt using SoapUI NG, I get the NPE below. I was originally using 1.7.0, but I have now upgraded to 1.8.0 and the problem is the same.
Mon Jul 25 13:49:20 CEST 2016:ERROR:java.lang.Exception: java.lang.NullPointerException
java.lang.Exception: java.lang.NullPointerException
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.load(AbstractDefinitionContext.java:154)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.load(AbstractDefinitionContext.java:114)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.getSchemaTypeSystem(AbstractDefinitionContext.java:379)
at com.eviware.soapui.impl.support.components.ResponseXmlDocument.getTypeSystem(ResponseXmlDocument.java:91)
at com.eviware.soapui.support.editor.views.xml.outline.support.XmlObjectTree.setContent(XmlObjectTree.java:108)
at com.eviware.soapui.support.editor.views.xml.outline.XmlOutlineEditorView$3.run(XmlOutlineEditorView.java:258)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at com.eviware.soapui.impl.support.definition.support.InterfaceCacheDefinitionLoader.<init>(InterfaceCacheDefinitionLoader.java:42)
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext.createDefinitionLoader(WsdlContext.java:53)
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext.createDefinitionLoader(WsdlContext.java:1)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.cacheDefinition(AbstractDefinitionContext.java:334)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.access$7(AbstractDefinitionContext.java:333)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:304)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.access$0(AbstractDefinitionContext.java:230)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.load(AbstractDefinitionContext.java:129)
... 19 more
This causes the following response to be returned to SoapUI:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>Server</faultcode>
<faultstring>java.lang.NullPointerException</faultstring>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
The problem was caused by a space outside the URL in the WSDL. A fix to avoid it from causing NPE will come in a maintenance release - in the mean time the workaround is to avoid spaces around URLs :-)