Forum Discussion

micgar's avatar
micgar
Senior Member
10 years ago

NullPointerException when adding a custom property after adding a Data Sink

I'm currently developing a test suite in Ready! API 1.2.2, when i noticed that i wasn't able to add custom properties to anything (The project, test suite, test steps etc.). 

 

This happened after i added a Data Sink and set DataSink to Groovy.  Doing this resulted in a java.lang.NullPointerException. Creating a new Project, Test Suite, Test Case and adding a Data Sink with Groovy does not reproduce the exception. However, tracking down the error, I was able to produce a very minimal project. This project is stripped down from a much larger project, that i won't be able to share. The excessive line breaks are produced by Ready! API, thus, they were not there, when i stripped down the project. Removing the data sink makes it possible to add custom properties again. Edit: Sorry about the smileys, but they are added automatically.

<?xml version="1.0" encoding="UTF-8"?>
<con:soapui-project id="7e24385f-8a4f-4a20-890d-42a90b1b6dae" activeEnvironment="Default environment" name="NPE project" resourceRoot="${projectDir}" scriptLibrary="" soapui-version="6.0.0" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:testSuite id="5ceb7db7-d4f1-4476-9380-981d9ff7155f" name="Scenarier"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="UTIL_CreateSessions" searchProperties="true" id="5522cd35-d557-4a87-877e-7159d8471716" disabled="true">
      <con:settings>
        <con:setting id="d834a5f9-5534-4ee1-b86b-6377c41042eafileName">CreateSessions</con:setting>
      </con:settings>
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      <con:testStep type="datasink" name="DataSink" id="ad576220-bbbd-401d-b56c-5f48b322443e"><con:settings/><con:config xsi:type="con:DataSinkStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:dataSink type="Groovy"><con:configuration><script/></con:configuration></con:dataSink><con:properties/></con:config></con:testStep><con:properties>
        
        
        
        
        
        
        
        
        
        
        
      </con:properties>
      <con:reportParameters/>
    </con:testCase><con:properties/><con:reportParameters/></con:testSuite><con:requirements/><con:properties/><con:wssContainer/><con:databaseConnectionContainer/><con:oAuth2ProfileContainer/><con:reporting><con:reportTemplates/><con:xmlTemplates/><con:xmlTemplates/><con:parameters/><con:parameters/></con:reporting><con:reporting/><con:authRepository/></con:soapui-project>

 

 

The Stack Trace looks like this:

java.lang.NullPointerException
        at java.util.Arrays$ArrayList.<init>(Unknown Source)
        at java.util.Arrays.asList(Unknown Source)
        at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSinkTestStep.getPropertyExpansions(WsdlDataSinkTestStep.java:356)
        at com.eviware.soapui.model.propertyexpansion.PropertyExpansionUtils.getPropertyExpansions(PropertyExpansionUtils.java:256)
        at com.eviware.soapui.model.propertyexpansion.PropertyExpansionUtils.getPropertyExpansions(PropertyExpansionUtils.java:272)
        at com.eviware.soapui.model.propertyexpansion.PropertyExpansionUtils.getPropertyExpansions(PropertyExpansionUtils.java:272)
        at com.eviware.soapui.model.propertyexpansion.PropertyExpansionUtils.getPropertyExpansions(PropertyExpansionUtils.java:272)
        at com.eviware.soapui.model.propertyexpansion.PropertyExpansionUtils.renameProperty(PropertyExpansionUtils.java:226)
        at com.eviware.soapui.impl.wsdl.AbstractTestPropertyHolderWsdlModelItem.renameProperty(AbstractTestPropertyHolderWsdlModelItem.java:127)
        at com.eviware.soapui.impl.wsdl.panels.teststeps.support.DefaultPropertyHolderTableModel.setValueAt(DefaultPropertyHolderTableModel.java:108)
        at javax.swing.JTable.setValueAt(Unknown Source)
        at javax.swing.JTable.editingStopped(Unknown Source)
        at javax.swing.AbstractCellEditor.fireEditingStopped(Unknown Source)
        at javax.swing.DefaultCellEditor$EditorDelegate.stopCellEditing(Unknown Source)
        at javax.swing.DefaultCellEditor.stopCellEditing(Unknown Source)
        at javax.swing.JTable$GenericEditor.stopCellEditing(Unknown Source)
        at javax.swing.plaf.basic.BasicTableUI$Actions.actionPerformed(Unknown Source)
        at javax.swing.SwingUtilities.notifyAction(Unknown Source)
        at javax.swing.JComponent.processKeyBinding(Unknown Source)
        at javax.swing.JTable.processKeyBinding(Unknown Source)
        at javax.swing.JComponent.processKeyBindings(Unknown Source)
        at javax.swing.JComponent.processKeyEvent(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.KeyboardFocusManager.redispatchEvent(Unknown Source)
        at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
        at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
        at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
        at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(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.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$200(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$1.doIntersectionPrivilege(Unknown Source)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.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)

 

No RepliesBe the first to reply