poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40505] New: - HSSFWorkbook
Date Thu, 14 Sep 2006 06:20:33 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40505>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40505

           Summary: HSSFWorkbook
           Product: POI
           Version: unspecified
          Platform: All
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: e_christov@hotmail.com


Hallo,

i have written the following code trying to access excel files (read and write):

URL url = new URL("file:/c:/Arbeit/Termine.xls");
URLConnection uc = url.openConnection();
POIFSFileSystem fis = new POIFSFileSystem(uc.getInputStream());
HSSFWorkbook hssfworkbook = new HSSFWorkbook(fis);

When using it in an java application it works fine. 
Then I put this line of code within an appplet, then I had signed the applet 
(in order to be allowed to read and write files on the hard disk). 
Unfortunately the last line of code, namely "HSSFWorkbook hssfworkbook = new 
HSSFWorkbook(fis);" still throw the following exception:
java.lang.ExceptionInInitializerError
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Class.java:141)
  at org.apache.poi.hssf.record.RecordFactory.class$(RecordFactory.java:50)
  at org.apache.poi.hssf.record.RecordFactory.<clinit>(RecordFactory.java:48)
  at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:163)
  .........
Caused by: java.security.AccessControlException: access denied 
(java.util.PropertyPermission poi.deserialize.escher read)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
at java.security.AccessController.checkPermission(AccessController.java:401)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1276)
at java.lang.System.getProperty(System.java:573)
at
org.apache.poi.hssf.record.AbstractEscherHolderRecord.<clinit>(AbstractEscherHolderRecord.java:40)
	... 19 more

I have solved the problem as I wrote the following line of code into the 
java.policy file: 
permission java.util.PropertyPermission "poi.deserialize.escher", "read";

Now it works fine, but when another person in the web use my applet I can't 
assume that he (or she) has the same line of code in the java.policy file.

My question: how should I handle this kind of error, without having to write 
into the java.policy file. Is this a HSSFWorkbook-bug?

Thanks

Evgeniy Hristov

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


Mime
View raw message