Bug 59766 - Could not initialize SecurityManager when initializing ReadOnlySharedStringsTable in appengine
Summary: Could not initialize SecurityManager when initializing ReadOnlySharedStringsT...
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.14-FINAL
Hardware: PC other
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-27 18:23 UTC by m.asaira123
Modified: 2016-08-15 13:42 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description m.asaira123 2016-06-27 18:23:29 UTC
In appengine version 1.9.38 When executing the below code where workbookInputStream is an xlsx InputStream 

			OPCPackage container = OPCPackage.open(workbookInputStream);
			ReadOnlySharedStringsTable sharedStrings = new ReadOnlySharedStringsTable(container);

The following exception is caught


java.lang.NoClassDefFoundError: Could not initialize class com.google.apphosting.runtime.security.shared.stub.com.sun.org.apache.xerces.internal.util.SecurityManager
	at com.google.appengine.runtime.Request.process-18917f2a8ba714e6(Request.java)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at java.lang.Class.newInstance(Class.java:588)
	at org.apache.poi.util.SAXHelper.trySetXercesSecurityManager(SAXHelper.java:85)
	at org.apache.poi.util.SAXHelper.newXMLReader(SAXHelper.java:49)
	at org.apache.poi.xssf.eventusermodel.ReadOnlySharedStringsTable.readFrom(ReadOnlySharedStringsTable.java:146)
	at org.apache.poi.xssf.eventusermodel.ReadOnlySharedStringsTable.<init>(ReadOnlySharedStringsTable.java:112)
Comment 1 Nick Burch 2016-06-27 18:24:22 UTC
Can you re-try with the POI 3.15 beta 2 release candidate?
Comment 2 m.asaira123 2016-06-27 19:45:35 UTC
I tried POI 3.15 beta 3 from https://builds.apache.org/job/POI/lastSuccessfulBuild/artifact/build/dist/ which is poi-bin-3.15-beta3-20160625.tar.gz

And still getting the same error, would it matter if I try beta 2 instead if yes where can I find it ?
Comment 3 m.asaira123 2016-06-27 19:46:17 UTC
I tried POI 3.15 beta 3 from https://builds.apache.org/job/POI/lastSuccessfulBuild/artifact/build/dist/ which is poi-bin-3.15-beta3-20160625.tar.gz

And still getting the same error, would it matter if I try beta 2 instead if yes where can I find it ?
Comment 4 Nick Burch 2016-06-27 20:00:27 UTC
Hopefully fixed in r1750408. Can you try with tomorrow's nightly build, or do your own custom build from svn/git and check?
Comment 5 Ahmad Abu Rjeila 2016-06-29 08:18:59 UTC
I tried the last code which includes r1750408 commit but still the issue didn't fix.
Comment 6 Nick Burch 2016-06-29 08:25:24 UTC
Has the stacktrace changed with the r1750408 fix in?
Comment 7 Sergey Parhomenko 2016-08-15 12:16:36 UTC
We bumped into the same issue when running on Google App Engine Standard Environment, and can confirm the latest nightly build (3.15-beta4-20160815) fixes the issue for us.
Comment 8 Dominik Stadler 2016-08-15 13:42:39 UTC
Setting this to FIXED as the last comment indicates it is actually fixed. Please reopen with information about what you tried if it does still not work for you with this version.