No access to Filesystem in spite of all-permissions

Hi,

I've written an application and want to start it via JWS. This is my JNLP-File:

<?xml version="1.0" encoding="UTF-8" ?>

<jnlp spec="1.0" codebase="http://foo/" href="bar.jnlp">

<information>

<title>foo</title>

<vendor>me</vendor>

<homepage href="http://foo/" />

<description>foobar</description>

<offline-allowed />

</information>

<security>

<all-permissions />

</security>

<resources>

<j2se version="1.5+" href="http://java.sun.com/products/autodl/j2se" />

<jar href="foo.jar" main="true"/>

<jar href="comm.jar"/>

<jar href="ojdbc14_10.1.0.4.jar"/>

</resources>

<application-desc />

</jnlp>

As you can see, I've set the all-permissions-element.

The application needs to access the COM-port and an Oracle-DB, so two jars are needed. I have signed these two jars and my own with "jarsigner foo.jar myalias" and they seem to by signed correctly. Here's the output of "jarsigner -verify":

V:\htdocs\jnlp>jarsigner -verify foo.jar

jar verified.

V:\htdocs\jnlp>jarsigner -verify ojdbc14_10.1.0.4.jar

jar verified.

V:\htdocs\jnlp>jarsigner -verify comm.jar

jar verified.

But when i start my app via JSW, i get the following error:

java.io.FilePermission.init(Unknown Source)

java.io.FilePermission.<init>(Unknown Source)

java.lang.SecurityManager.checkDelete(Unknown Source)

javax.comm.CommPortIdentifier.getPortIdentifierts(CommPortIdentifiert.java:70)

...

Thanks a lot for your help in advance!

Regards,

Markus

[1801 byte] By [ulma82a] at [2007-11-26 13:00:02]
# 1

I cannot see any obvious problems with the JNLP.

Does the plug-in prompt you to allow the

permissions, when the application is being installed?

Does this problem occur on a PC(s) that is installing the

application fresh, or has this only been observed on a

single (e.g. development) machine?

If the latter, I suggest you test on a fresh machine,

or if there is none immediately availabe, you might

try refreshing the current machine by

- uninstalling the local app., before trying a new test, or

- changing the location of the class cache temporarily,

for testing fresh installs.

(I suspect there is some 'sticky' setting or jar

in the PC that is failing - perhaps a refresh will

show different results)

AndrewThompson64a at 2007-7-7 16:59:53 > top of Java-index,Desktop,Deploying...
# 2
Yes, the plugin prompts me to allow the permissions, and I do.I've tried to uninstall the app before my tests (and cleared the cache), but I got the some problem again. Clearing the browser-cache also didn't help :(
ulma82a at 2007-7-7 16:59:53 > top of Java-index,Desktop,Deploying...
# 3
I am running out of ideas, but I would recommend a test run with a different (home-rolled unverified, whatever) certificate.
AndrewThompson64a at 2007-7-7 16:59:53 > top of Java-index,Desktop,Deploying...
# 4

Now I have tried it on a second machine but I still get the same error.

Then I signed all jars with a new home-rolled unverified certificate - but it didn't help.

May there be a problem with home-rolled unverified certificates? Till now I've only used those... (Since we only use this app in our intranet, we don't need an official certificate)

PS: I'm using Java 1.5.0 (update 9)

ulma82a at 2007-7-7 16:59:53 > top of Java-index,Desktop,Deploying...
# 5

I have found the solution for my problem in another post (http://forum.java.sun.com/thread.jspa?threadID=520207&messageID=2487452).

Adding these few lines before my call of getPortIdentifiers() solved my problem. Probably the unsigned windows-dll which lies in the jre-dir was the problem.

Anyhow thanks a lot for your help Andrew!

ulma82a at 2007-7-7 16:59:53 > top of Java-index,Desktop,Deploying...