Bug 32386 - Creating new HSSFWorkbook under WebStart not possible
Summary: Creating new HSSFWorkbook under WebStart not possible
Status: RESOLVED DUPLICATE of bug 30836
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: unspecified
Hardware: PC Windows 2000
: P1 blocker (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2004-11-25 10:11 UTC by Michael Gertz
Modified: 2005-04-21 07:09 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
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 ***