Forum Discussion

iangfox1965's avatar
iangfox1965
Occasional Contributor
16 years ago

NullPointerException when adding REST Request to a Test Case

I have one particular REST request to add to a Test Case but, for reasons unknown, when I add it a NullPointerException is generated. I have other REST requests which I can add to Test Cases ok. Below is the stack trace:

Tue Mar 02 11:52:42 GMT 2010:ERROR:java.lang.NullPointerException
  java.lang.NullPointerException
  at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.ensureUniqueName(WsdlTestCase.java:300)
  at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.insertTestStep(WsdlTestCase.java:479)
  at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.ensureUniqueName(WsdlTestCase.java:300)
  at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.addTestStep(WsdlTestCase.java:401)
  at com.eviware.soapui.impl.wsdl.actions.testcase.AddWsdlTestStepAction.perform(AddWsdlTestStepAction.java:48)
  at com.eviware.soapui.impl.wsdl.actions.testcase.AddWsdlTestStepAction.perform(AddWsdlTestStepAction.java:29)
  at com.eviware.soapui.support.action.swing.SwingActionDelegate.actionPerformed(SwingActionDelegate.java:101)
  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.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)

17 Replies

  • iangfox1965's avatar
    iangfox1965
    Occasional Contributor
    Hi Ole,

    Thanks for looking into this. It seems like something I can work around by having my different methods under a single resource.

    Your support is much appreciated.

    Cheers
    Ian
  • hjim's avatar
    hjim
    New Contributor
    Hi,

    I also have the same problem as this post.
    As suggested, I installed recent build, Date 2010/06/21 06:08 and tested.
    But the result is the same which has "NullPointerException..." when adding REST Request to a Test Case.

    Could you help me?

    Thanks,
    HyunJung
  • Hi,

    do you get this with the 3.6beta version nightly build also? If so, can you attach your project so we can try to reproduce?

    thanks in advance!

    regards,

    /Ole
    eviware.com
  • hjim's avatar
    hjim
    New Contributor
    Hi,

    Thanks for your reply.
    I've installed soapUI 3.6-beta1 and tested it but I still have the same problem.

    I attatched project file which I am using.

    Thanks in advance,
    HyunJung
  • Hi,

    this was due to a bug in the WADL importer that created multiple resources with the same path in some situations, which would result in this error. The upcoming nightly build fixes this in the WADL importer, but you will either need to reimport the WADL or update your REST Service by moving methods for duplicate resources to the first of those duplicates and deleting the remaining ones.

    We're very sorry for the hassle!

    regards,

    /Ole
    eviware.com