Bug 32386

Summary: Creating new HSSFWorkbook under WebStart not possible
Product: POI Reporter: Michael Gertz <michael_gertz>
Component: HSSFAssignee: POI Developers List <dev>
Severity: blocker    
Priority: P1    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   

Description Michael Gertz 2004-11-25 10:11:26 UTC
Creating a new HSSFWorkbook while started the JavaApp in WebStart-Environment, 
the SecurityManager is blocking this Request. Following StackTrace appears:

java.security.AccessControlException: access denied 
(java.util.PropertyPermission user.name read)

	at java.security.AccessControlContext.checkPermission(Unknown Source)

	at java.security.AccessController.checkPermission(Unknown Source)

	at java.lang.SecurityManager.checkPermission(Unknown Source)

	at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)

	at java.lang.System.getProperty(Unknown Source)

	at org.apache.poi.hssf.model.Workbook.createWriteAccess

	at org.apache.poi.hssf.model.Workbook.createWorkbook(Workbook.java:249)

	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>

FileSaveService (javax.jnlp.FileSaveService) should be used, if available, i 
think. With current version of POI, it's not possible to create any Workbook in 
WebStart-Environment ...

greetings Michael G.
Comment 1 Michael Gertz 2004-11-25 11:59:46 UTC
The Problem can be solved, if in method 

createWriteAccess () in class org.apache.poi.hssf.model.Workbook the statement


is enveloped by try-catch. Access to "user.name" via SystemProperties is not 
allowed in WebStart-Environment. Think, it's not needed, only for document-
specific data about the user.
Comment 2 Avik Sengupta 2005-04-21 15:09:59 UTC
This has been fixed on head

*** This bug has been marked as a duplicate of 30836 ***