Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Hard crash when attempting to write from Spreadsheet component
Hi,
I'm new to the component and just experimenting. I'm trying to edit and save a spreadsheet and get a hard crash when trying to write the spreadsheet.
Here's the code (nothing special, I think)
@Override
public void buttonClick(ClickEvent event) {
try {
spreadsheet1.write(fileName);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
fileName is the name used to open the spreadsheet originally.
I'm running this in Eclipse Luna, Java 1.6, Vaadin 7.5, Mac OSX, Tomcat 6. I get a popup saying that Bootstrap has quit unexpectedly. In the Eclipse console I get only:
Invalid memory access of location 0x10c609ca0 rip=0x102f3b65b
The file is an .xlsx with multiple sheets and some intricate formatting.
I've traced the crash as far as the bolded line below in POIXMLDocument
public POIXMLProperties getProperties() {
if(properties == null) {
try {
properties = new POIXMLProperties(pkg);
} catch (Exception e){
throw new POIXMLException(e);
}
}
return properties;
}
I'll go back and try with a simpler spreadsheet, but I'd really like to know what's going on here before I build up anything around the component.
Thanks,
Bill
I am facing the same problem can you please explain how did you solve it.
I was really, really disappointed not to have any support from Vaadin about this and more or less dropped the project. It's been a while and I don't remember much, but I found this code, which did work (though it's ugly) as far as I recall.
buttonSave.attach();
buttonSave.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
try {
// Overwriting seems to be a problem -- delete it first
new File(fileName).delete();
spreadsheet1.write(fileName);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
}