M Page

Greenhorn
+ Follow
since Nov 30, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by M Page

I was able to find a solution to my problem.

Let me restate my problem.

I have a java application which uses POI XSSF to read and write excel 2007 workbooks to the users 'My Documents' folder.
The application functions as designed when run through eclipse, dos batch file launch or directly (double clicking on the app jar file).
It does not work correctly when launched through jnlp. The final stack trace shows it is a security issue: unable to write temporary file

The jnlp is initiated from my pc. This runs the app jar file which is located on a secured network directory.
or jnlp --> main jar

Note: I have security set to all-permissions in the jnlp.

The solution was to create another java app which, by using dos commands, launches the desired app jar.
So I have jnlp --> intermediate jar --> main jar

Mike
11 years ago
My apologies. The connection to the thread is that I tried including the jnlp in my app and it didn't solve the problem.

The permission problem seems to be in creating an excel 2007 workbook (POI XSSF) in the users My Documents folder.
And your analysis is in line with my companies IT department but I function as a 'maverick' and have to figure these
things out on my own.

I'll check my java install security settings.

It's a most annoying problem since excel 2003 workbooks (POI HSSF) don't have this problem. Most likely OOXML related.

Thanks for your help.

11 years ago
I was receiving a stack trace error
Caused by: java.lang.SecurityException: Unable to create temporary file
at java.io.File.checkAndCreate(Unknown Source)
at java.io.File.createTempFile(Unknown Source)
at java.io.File.createTempFile(Unknown Source)
at org.apache.xmlbeans.impl.common.XBeanDebug.log(XBeanDebug.java:97)
at org.apache.xmlbeans.impl.common.XBeanDebug.logException(XBeanDebug.java:116)
at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<init>(SchemaTypeSystemImpl.java:189)
... 27 more
which led me to this thread.
I added the folder/jnlp file to my jar and signed it as indicated in the thread.
I still have the problem.

The stack trace starts out as a POIXMLException indicating unable to create a temporary file.

Now I do not get this error when running my application inside of Eclipse or when I run the application jar file directly.

Any help would be appreciated.

And I have checked the POI forums. As far as I can tell all of the external jars I need are up to date.
I believe they must be since the app does work except when launched by a jnlp file.
11 years ago