I got a solution for my problem, if I modify the common policy file in JVM directory, instead of changing in my policy file (into my program directory), and there I write:
grant {
permission java.security.AllPermission;
};
then If I launch Equinox with security parameters I do not get any exception
at all.
Java
-Djava.security.manager=org.eclipse.osgi.framework.internal.core.FrameworkSe
curityManager
-Djava.security.policy=policy -jar org.eclipse.osgi_3.4.0.v20080107.jar
-console
Why do I have to modify in the JVR directory policy file instead of doing in
my policy file?
I mean , If I like to fix some permissions for my bundle I should not write
them in JVR Policy file but in my policy file.
Thanks in advance
De: [email protected] [mailto:[email protected]]
En nombre de Thomas Watson
Enviado el: viernes, 24 de abril de 2009 16:59
Para: Equinox development mailing list
Asunto: Re: [equinox-dev] Problem with security in Equinox
This works for me. What VM are you using? I suggest you open a bug with
details on your OS and java version etc.
Tom
Inactive hide details for "David Conde" ---04/24/2009 07:17:52
AM---Hi,"David Conde" ---04/24/2009 07:17:52 AM---Hi,
From:
"David Conde" <[email protected]>
To:
<[email protected]>
Date:
04/24/2009 07:17 AM
Subject:
[equinox-dev] Problem with security in Equinox
_____
Hi,
I have been looking for documentation about make secure a bundle running on
Equinox Framework without using Eclipse.
I have tried to put ON the security features of Equinox typing the next
commands:
java
-Djava.security.manager=org.eclipse.osgi.framework.internal.core.FrameworkSe
curityManager
-Djava.security.policy=policy -jar org.eclipse.osgi_3.4.0.v20080107.jar
-console
Previously I created text file called policy in which I had written :
grant {
permission java.security.AllPermission;
};
But when I do this I got the next Exception:
Errror occurred during initialization of VM
java.lang.ExceptionInInitializerError
at java.lang.System.setSecurityManager0(Unknown Source)
at java.lang.System.setSecurityManager(Unknown Source)
at sun.misc.Launcher.<init>(Unknown Source)
at sun.misc.Launcher.<clinit>(Unknown Source)
at java.lang.ClassLoader.initSystemClassLoader(Unknown Source)
at java.lang.ClassLoader.getSystemClassLoader(Unknown Source)
Caused by: java.security.AccessControlException: access denied
(java.security.Se
curityPermission getProperty.networkaddress.cache.ttl)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at org.eclipse.osgi.framework.internal.core.FrameworkSecurityManager.int
ernalCheckPermission(FrameworkSecurityManager.java:119)
at org.eclipse.osgi.framework.internal.core.FrameworkSecurityManager$Che
ckPermissionAction.run(FrameworkSecurityManager.java:84)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.FrameworkSecurityManager.che
ckPermission(FrameworkSecurityManager.java:90)
at org.eclipse.osgi.framework.internal.core.FrameworkSecurityManager.che
ckPermission(FrameworkSecurityManager.java:219)
at java.security.Security.getProperty(Unknown Source)
at sun.net.InetAddressCachePolicy$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.InetAddressCachePolicy.<clinit>(Unknown Source)
at java.lang.System.setSecurityManager0(Unknown Source)
at java.lang.System.setSecurityManager(Unknown Source)
at sun.misc.Launcher.<init>(Unknown Source)
at sun.misc.Launcher.<clinit>(Unknown Source)
at java.lang.ClassLoader.initSystemClassLoader(Unknown Source)
I do not have any idea about why I got this exception, I have looked for
that in Internet but there was no result
Any idea about this problem?
Thank you in advance
David
_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev
<<image001.gif>>
<<image003.png>>
<<image004.png>>
_______________________________________________ equinox-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/equinox-dev
