Forum Discussion

nemowbray's avatar
nemowbray
New Contributor
4 years ago

3.8.1 Unable to generate data in data source

After installing ReadyAPI i am unable to add a new property for data generator.  When I add a new property test_id and select data source: Data Generator with property type being Guid.  When I click the green play button i get the following error: 

 

ReadyAPI Log: 

  • Thu Jun 10 19:47:48 GMT 2021: ERROR: An error occurred [Cannot invoke "com.eviware.soapui.impl.wsdl.teststeps.datasource.DataGenerator.GeneratedDataValue.getValue()" because the return value of "java.util.Map.get(Object)" is null], see error log for details

Error Log: 

  • Thu Jun 10 19:47:48 GMT 2021: ERROR: java.lang.NullPointerException: Cannot invoke "com.eviware.soapui.impl.wsdl.teststeps.datasource.DataGenerator.GeneratedDataValue.getValue()" because the return value of "java.util.Map.get(Object)" is null
  • java.lang.NullPointerException: Cannot invoke "com.eviware.soapui.impl.wsdl.teststeps.datasource.DataGenerator.GeneratedDataValue.getValue()" because the return value of "java.util.Map.get(Object)" is null
  • at com.eviware.soapui.impl.wsdl.teststeps.datasource.DataGenerator.UI.DataGeneratorDataSource.a(DataGeneratorDataSource.java:816)
  • at com.eviware.soapui.impl.wsdl.teststeps.datasource.DataGenerator.UI.DataGeneratorDataSource.next(DataGeneratorDataSource.java:554)
  • at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.c(WsdlDataSourceTestStep.java:636)
  • at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.b(WsdlDataSourceTestStep.java:615)
  • at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.a(WsdlDataSourceTestStep.java:802)
  • at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSourceTestStep.next(WsdlDataSourceTestStep.java:812)
  • at com.eviware.soapui.impl.wsdl.panels.teststeps.DataSourceDesktopPanel$TestAction.actionPerformed(DataSourceDesktopPanel.java:436)
  • at com.eviware.soapui.impl.wsdl.panels.teststeps.DataSourceDesktopPanel$TestAction.actionPerformed(DataSourceDesktopPanel.java:1)
  • at com.eviware.soapui.impl.wsdl.actions.iface.AbstractSwingAction.actionPerformed(AbstractSwingAction.java:62)
  • at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
  • at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
  • at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
  • at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
  • at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
  • at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
  • at java.desktop/java.awt.Component.processMouseEvent(Component.java:6614)
  • at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
  • at java.desktop/java.awt.Component.processEvent(Component.java:6379)
  • at java.desktop/java.awt.Container.processEvent(Container.java:2263)
  • at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4990)
  • at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
  • at java.desktop/java.awt.Component.dispatchEvent(Component.java:4822)
  • at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4919)
  • at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4548)
  • at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4489)
  • at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
  • at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2769)
  • at java.desktop/java.awt.Component.dispatchEvent(Component.java:4822)
  • at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
  • at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
  • at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
  • at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
  • at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
  • at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
  • at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
  • at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
  • at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
  • at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
  • at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
  • at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
  • at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
  • at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
  • at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
  • at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
  • at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
  • nemowbray 

    You may report the issue with Smartbear customer support.

     

    Mean while you can try below if you want UUID.

    In the Data Source drop down box, select Groovy

    And add below line.

     

    # assuming that test_id is property you have added on left side
    result['test_id'] = UUID.randomUUID().toString()	

     Please if this resolves the issue for now and let you proceed.

  • nmrao's avatar
    nmrao
    Champion Level 3

    nemowbray 

    You may report the issue with Smartbear customer support.

     

    Mean while you can try below if you want UUID.

    In the Data Source drop down box, select Groovy

    And add below line.

     

    # assuming that test_id is property you have added on left side
    result['test_id'] = UUID.randomUUID().toString()	

     Please if this resolves the issue for now and let you proceed.

    • richie's avatar
      richie
      Community Hero
      Hey nemowbray,

      If you just need unique GUIDs/UUIDs in certain fields in your payloads you can try the dynamic scripting option as follows:

      "jsonAttribute": "${=java.util.uuid.randomuuid()}"

      Using the above you wont need to use the datagenerator.

      Cant actually take credit for this as it was nmrao that showed me!😉

      Nice one


      Rich