Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Excel Export fires NullPointerException if file dialog is cancelled
icon13.gif  Excel Export fires NullPointerException if file dialog is cancelled [message #956121] Wed, 24 October 2012 08:55 Go to next message
Michi Classen is currently offline Michi ClassenFriend
Messages: 36
Registered: March 2012
Member
The excel export is continuable, as long as the file dialog handler has not been cancelled. Once the dialog was cancelled, the following error message is thrown:

!STACK 0
java.lang.NullPointerException
at org.eclipse.nebula.widgets.nattable.export.FileOutputStreamProvider.getOutputStream(FileOutputStreamProvider.java:40)
at org.eclipse.nebula.widgets.nattable.extension.poi.PoiExcelExporter.getOutputStream(PoiExcelExporter.java:54)
at org.eclipse.nebula.widgets.nattable.export.NatExporter.exportSingleLayer(NatExporter.java:44)
at org.eclipse.nebula.widgets.nattable.export.command.ExportCommandHandler.doCommand(ExportCommandHandler.java:33)
at org.eclipse.nebula.widgets.nattable.export.command.ExportCommandHandler.doCommand(ExportCommandHandler.java:1)
at org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler.doCommand(AbstractLayerCommandHandler.java:19)
at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.doCommand(AbstractLayer.java:152)
at org.eclipse.nebula.widgets.nattable.layer.CompositeLayer.doCommand(CompositeLayer.java:137)
at org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer.doCommand(GridLayer.java:169)
at org.eclipse.nebula.widgets.nattable.NatTable.doCommand(NatTable.java:507)

I'm using the actual software released on Eclipse.org.

Looking at bugzilla, this bug was reported on May '12:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=379923 but never solved.

Ciao,
Michi

[Updated on: Wed, 24 October 2012 13:11]

Report message to a moderator

Re: Excel Export fires NullPointerException if file dialog is cancelled [message #958801 is a reply to message #956121] Fri, 26 October 2012 08:19 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Hi,

I confirm this bug still exists. As you have found out that there is a bug open on this in bugzilla, please use bugzilla for further conversation. I commented it and assigned it to Edwin as he is most familiar with the export. But to get open bugs into our attention again, you should consider commenting the bug instead of writing in the forum, as the forum is not read that frequently by all of our members. Bugzilla will send emails on changes.

Greez,
Dirk
Re: Excel Export fires NullPointerException if file dialog is cancelled [message #963029 is a reply to message #958801] Mon, 29 October 2012 14:17 Go to previous messageGo to next message
Michi Classen is currently offline Michi ClassenFriend
Messages: 36
Registered: March 2012
Member
Ok, thanks.
Re: Excel Export fires NullPointerException if file dialog is cancelled [message #972423 is a reply to message #963029] Mon, 05 November 2012 16:11 Go to previous messageGo to next message
Edwin Park is currently offline Edwin ParkFriend
Messages: 124
Registered: July 2009
Senior Member
Fixed - apologies for the long delay in getting this resolved!

Edwin
Re: Excel Export fires NullPointerException if file dialog is cancelled [message #972486 is a reply to message #972423] Mon, 05 November 2012 17:13 Go to previous message
Michi Classen is currently offline Michi ClassenFriend
Messages: 36
Registered: March 2012
Member
Hi Edwin, thanks!

Do you have a patch of the fix or a fast instruction to solve the bug?

In addition I noticed another errorneous behavior on export. Running the export a second time, an empty excel sheet is saved and the following exception is thrown:

java.lang.IllegalArgumentException: This Style does not belong to the supplied Workbook. Are you trying to assign a style from one workbook to the cell of a differnt workbook?
at org.apache.poi.hssf.usermodel.HSSFCellStyle.verifyBelongsToWorkbook(HSSFCellStyle.java:801)
at org.apache.poi.hssf.usermodel.HSSFCell.setCellStyle(HSSFCell.java:905)
at org.apache.poi.hssf.usermodel.HSSFCell.setCellStyle(HSSFCell.java:901)
at org.eclipse.nebula.widgets.nattable.extension.poi.PoiExcelExporter.exportCell(PoiExcelExporter.java:113)
at org.eclipse.nebula.widgets.nattable.export.NatExporter.exportLayer(NatExporter.java:167)
at org.eclipse.nebula.widgets.nattable.export.NatExporter$1.run(NatExporter.java:54)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

This bug is also reported in bugzilla

https://bugs.eclipse.org/bugs/show_bug.cgi?id=390522

[Updated on: Tue, 06 November 2012 13:32]

Report message to a moderator

Previous Topic:Active cell editor issue
Next Topic:Mark same column values by the same color
Goto Forum:
  


Current Time: Thu Apr 25 18:55:11 GMT 2024

Powered by FUDForum. Page generated in 0.03343 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top