Forum Discussion

Virginia_Leandr's avatar
Virginia_Leandr
Occasional Contributor
16 years ago

Re: Getting ERROR:java.lang.Exception: java.lang.NullPointerException

Several months ago, we put together some out of the box Web Services we're providing as part of our product.  These worked perfectly with earlier version of soapUI. 

Now with the latest version of soapUI (starting at 2.5), when I try to import the web service, I get the following error:

Tue May 26 13:22:27 CDT 2009:ERROR:java.lang.Exception: java.lang.NullPointerException

The soapUI Log shows:
Tue May 26 13:22:27 CDT 2009:DEBUG:Loading Definition...
Tue May 26 13:22:27 CDT 2009:ERROR:Loading of definition failed for [http://vlw2k3sql2k5/SDEWebServices/Create%20client%20sample_SQL.asmx?WSDL]; java.lang.NullPointerException
Tue May 26 13:22:27 CDT 2009:ERROR:An error occured [java.lang.NullPointerException], see error log for details
Tue May 26 13:22:27 CDT 2009:ERROR:Error importing wsdl: java.lang.Exception: java.lang.NullPointerException
Tue May 26 13:22:27 CDT 2009:ERROR:An error occured [java.lang.NullPointerException], see error log for details
Tue May 26 13:22:27 CDT 2009:ERROR:An error occured [Error importing wsdl], see error log for details

The error log shows the following:

Tue May 26 13:22:27 CDT 2009:ERROR:com.eviware.soapui.support.SoapUIException: Error importing wsdl
  com.eviware.soapui.support.SoapUIException: Error importing wsdl
  at com.eviware.soapui.impl.WsdlInterfaceFactory.importWsdl(WsdlInterfaceFactory.java:70)
  at com.eviware.soapui.impl.WsdlInterfaceFactory.importWsdl(WsdlInterfaceFactory.java:50)
  at com.eviware.soapui.impl.actions.NewWsdlProjectAction.importWsdl(NewWsdlProjectAction.java:184)
  at com.eviware.soapui.impl.actions.NewWsdlProjectAction.perform(NewWsdlProjectAction.java:139)
  at com.eviware.soapui.impl.actions.NewWsdlProjectAction.perform(NewWsdlProjectAction.java:49)
  at com.eviware.soapui.support.action.swing.SwingActionDelegate.actionPerformed(SwingActionDelegate.java:100)
  at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
  at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
  at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
  at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
  at javax.swing.AbstractButton.doClick(Unknown Source)
  at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
  at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
  at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
  at java.awt.Component.processMouseEvent(Unknown Source)
  at javax.swing.JComponent.processMouseEvent(Unknown Source)
  at java.awt.Component.processEvent(Unknown Source)
  at java.awt.Container.processEvent(Unknown Source)
  at java.awt.Component.dispatchEventImpl(Unknown Source)
  at java.awt.Container.dispatchEventImpl(Unknown Source)
  at java.awt.Component.dispatchEvent(Unknown Source)
  at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
  at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
  at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
  at java.awt.Container.dispatchEventImpl(Unknown Source)
  at java.awt.Window.dispatchEventImpl(Unknown Source)
  at java.awt.Component.dispatchEvent(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.Exception: java.lang.NullPointerException
  at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.load(AbstractDefinitionContext.java:153)
  at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlImporter.importWsdl(WsdlImporter.java:70)
  at com.eviware.soapui.impl.WsdlInterfaceFactory.importWsdl(WsdlInterfaceFactory.java:64)
  ... 33 more
  Caused by: java.lang.NullPointerException
  at com.eviware.soapui.impl.support.definition.support.InterfaceCacheDefinitionLoader.(InterfaceCacheDefinitionLoader.java:39)
  at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext.createDefinitionLoader(WsdlContext.java:55)
  at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext.createDefinitionLoader(WsdlContext.java:30)
  at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.cacheDefinition(AbstractDefinitionContext.java:259)
  at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.access$400(AbstractDefinitionContext.java:44)
  at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:227)
  at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:45)
  at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:111)
  at java.lang.Thread.run(Unknown Source)

I'm trying to understand what is it that soapUI is expecting to find in the asmx wsdl.  I have attached our web service.  Any assistance or guidance would be greatly appreciated!

Virginia
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    hmm.. could you attach the generated WSDL for this service so we can try to reproduce the error?

    regards!

    /Ole
    eviware.com
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    sorry, I don't have an environment for deploying this asmx, so I can't generate the WSDL myself. Please attach the WSDL also so I can use the exact one you are getting the error with.

    thanks in advance!

    regards,

    /Ole
    eviware.com
  • Virginia_Leandr's avatar
    Virginia_Leandr
    Occasional Contributor
    Actually I think we figured out the problem.  soapUI is not allowing for spaces in the WSDL path name.

    For example, if I create a Web Service called "VLTest" and provide this URL it works:

    http://vlw2k3sql2k5/SDEWebServices/VLTest.asmx?WSDL

    But if I create a Web Service called "Create Client Sample_SQL" and provide this URL it does not work: 

    http://vlw2k3sql2k5/SDEWebServices/Crea ... .asmx?WSDL

    Note that the spaces get converted to %20.

    Is this a defect in soapUI 2.5 and 2.5.1?  If so, how do I go about reporting it so it can be resolved?

    Thanks!
    Virginia