Forum Discussion

VincentVonk's avatar
VincentVonk
Occasional Contributor
12 years ago

4.6.4 DataSink writing to existing Excel file error

Hi,

We are currently trying to put some properties to an existing excel file with the DataSink test step. This is for us not working, we are getting an zero pointer exception.

For both the File as the Out file we use the same excel. with an existing worksheet in it.

I get the following errors in the SoapUI log:

Fri Jan 31 14:49:53 CET 2014:ERROR:An error occurred [java.lang.NullPointerException], see error log for details

And this in the error log:

Fri Jan 31 14:50:33 CET 2014:ERROR:java.lang.NullPointerException
java.lang.NullPointerException
at jxl.biff.DVParser.<init>(DVParser.java:669)
at jxl.biff.BaseCellFeatures.getDVParser(BaseCellFeatures.java:501)
at jxl.write.biff.SheetWriter.writeDataValidation(SheetWriter.java:1137)
at jxl.write.biff.SheetWriter.write(SheetWriter.java:581)
at jxl.write.biff.WritableSheetImpl.write(WritableSheetImpl.java:1558)
at jxl.write.biff.WritableWorkbookImpl.write(WritableWorkbookImpl.java:950)
at com.eviware.soapui.impl.wsdl.teststeps.datasink.ExcelDataSink.finish(SourceFile:255)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlDataSinkTestStep.finish(SourceFile:250)
at com.eviware.soapui.impl.wsdl.panels.teststeps.DataSinkDesktopPanel$TestAction.actionPerformed(SourceFile:302)
at com.eviware.soapui.impl.wsdl.panels.teststeps.DataSinkDesktopPanel$TestAction.actionPerformed(SourceFile:272)
at com.eviware.soapui.impl.wsdl.actions.iface.AbstractSwingAction.actionPerformed(AbstractSwingAction.java:73)
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.plaf.basic.BasicButtonListener.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.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)

The Excelsheet is sure to be there, when i only put the location & name in the Out File place, it will generate a new file with the property values.

I'm i doing anything wrong?

7 Replies

  • Hi,

    Generally it is good to avoid same excel file in DataSource and DataSink as excel locks it, but can you send us some screenshots so we can investigate further, it is possible that there could be a problem in configuration.

    Screenshot of the excel sheet
    TestCase steps
    DataSource and DataSink test steps.
    Flow of the testCase

    This will help me to investigate further.

    Thanks,
    Jeshtha
  • VincentVonk's avatar
    VincentVonk
    Occasional Contributor
    What i do to test it:

    DataSink step, add 2 values and then try to execute/test it (to make sure it is not a data lock / test case error.

    I have attached screenshots to this message.
  • Hi,

    Your setup looks correct. There could be an issue with your worksheet.
    Can you create a new Excel file and name a worksheet as "Output" and then try again? That will helps us narrow down to the source of the error.

    Thanks,

    Giscard
  • VincentVonk's avatar
    VincentVonk
    Occasional Contributor
    This seems indeed to be the issue, when i create a new excel document with a tab output it works. However this seems to be the only situation it works. All existing (.xls) excel files i have don't seem to work, and give back the same error message.
  • Hi again!

    Thanks for the information.

    Just to make things clear, are you using the same Excel file for the DataSource and DataSink?
    If so, I don't think they were indented to be to used with same Excel file, but the error message is not very friendly though.

    --
    Regards

    Erik
    SmartBear Sweden
  • VincentVonk's avatar
    VincentVonk
    Occasional Contributor
    Hi Erik,

    To be perfectly clear, yes we do. However, to test is I run only the DataSink step with predefined values in it, so it cant be in my opinion that the Excel file is locked by SoapUI, since we don't use this step to test it currently.

    Regards,

    Vincent
  • Hi Vincent,

    From what I could find, the error seems to point to a data validation issue. Perhaps you are attempting to write values into cells that are configured to accept a different type of data. If you copy your existing sheet into the new Excel file and then you get the same error when using the new file, it's likely a data validation issue.

    Regards,

    Giscard
    SmartBear Support