When using felix 4.2 in java SE in ubuntu, it works. Is it meaning that the felix is OK?

On 2015-1-21 23:48, Karl Pauls wrote:
Is there a specific reason you are not using the latest version of Felix? I
know we had some problems on jamvm and getting security to work there might
be tricky - anyways, it would be worthwhile to test with Felix 4.6.0 if
possible.

regards,

Karl

On Wed, Jan 21, 2015 at 9:29 AM, Jerry Wang <wangjun...@dare-tech.com>
wrote:

Hi all,
     I'm a newcomer in felix and java. The recent work is to make osgi work
in embedded system.
     But when setting security mode, I meet problem.
     I use the command "jamvm -Dorg.osgi.framework.security=osgi
-Djava.security.policy=all.policy -jar bin/felix.jar:/usr/local/
classpath/lib/classpath:/usr/local/classpath/share/classpath:/lib -Xms4M
-Xmx10M -Xss256K org.apache.felix.main.Main &", the error log appears.

"Unable to list saved bundles. (java.lang.SecurityException: 
java.security.AccessControlException:
permission (java.io.FilePermission ./felix-cache read) not granted: no
protection domains)
java.lang.SecurityException: java.security.AccessControlException:
permission (java.io.FilePermission ./felix-cache read) not granted: no
protection domains
    at org.apache.felix.framework.Felix$1.checkPermission(Felix.java:572)
    at java.lang.SecurityManager.checkRead(SecurityManager.java:569)
    at java.io.File.checkRead(File.java:1554)
    at java.io.File.exists(File.java:270)
    at org.apache.felix.framework.util.SecureAction$Actions.run(
SecureAction.java:1206)
    at java.security.AccessController.doPrivileged(
AccessController.java:195)
    at org.apache.felix.framework.util.SecureAction.fileExists(
SecureAction.java:292)
    at org.apache.felix.framework.cache.BundleCache.getArchives(
BundleCache.java:117)
    at org.apache.felix.framework.Felix.init(Felix.java:667)
    at org.apache.felix.main.Main.main(Main.java:288)
"
The content in the policy file  is "grant { permission
java.security.AllPermission; };";

And I also option "-Dpolicy.provider=gnu.java.security.PolicyFile" in
command, the problem still appeares.

I think maybe it can not find the policy file,so use the absolute path
"-Djava.security.policy=file:///data/osgi/all.policy",but it is useless.

Now I can do nothing. Pls give me some advice to make policy file work.

--

Thanks & Best Regards
Jerry Wang
************************************
Shanghai DareGlobal Technologies Co.,Ltd.
Add:2F Block B,Info Tech Building, No.1555,Kongjiang Road,Shanghai,PRC
P.C:200092
Tel:86-21-6563 5566 Ext:8603
Fax:86-21-6501 5599
E-mail:wangjun...@dare-tech.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org





--

Thanks & Best Regards
王俊杰  Jerry Wang
************************************
Shanghai DareGlobal Technologies Co.,Ltd.
Add:2F Block B,Info Tech Building, No.1555,Kongjiang Road,Shanghai,PRC
P.C:200092
Tel:86-21-6563 5566 Ext:8603
Fax:86-21-6501 5599
E-mail:wangjun...@dare-tech.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org

Reply via email to