felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hasan <ha...@trialox.org>
Subject Re: Please help in enabling security
Date Wed, 19 Nov 2008 10:36:52 GMT
Hi again,

If I put the following line in all.policy
grant { permission java.security.AllPermission; };

then I can start felix successfully.
I hope this solve my problem starting felix with security enabled.

Note, that in the slide set "Building Secure OSGi Applications"
the line reads as follows which I think is wrong:
grant { permission java.lang.AllPermission };

Regards
Hasan

Hasan wrote:
> Dear all
>
> We would like to use osgi security mechanism (conditional permission 
> admin) and thus
> are trying to enable security when invoking felix (version 1.4.0) as 
> follows
>
> $ java -Djava.security.manager -Djava.security.policy=all.policy -jar 
> bin/felix.jar
>
> There were some AccessControlException which we could fix by adapting 
> java.policy file
> In the end however, we got a NullPointerException as shown below.
>
> -- BEGIN OF FELIX ERROR MESSAGE --
> Welcome to Felix.
> =================
>
> ERROR: Unable to start system bundle. (java.lang.NullPointerException: 
> Specified service reference cannot be null.)
> java.lang.NullPointerException: Specified service reference cannot be 
> null.
>    at 
> org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:320) 
>
>    at 
> org.apache.felix.main.AutoActivator.processAutoProperties(AutoActivator.java:77) 
>
>    at org.apache.felix.main.AutoActivator.start(AutoActivator.java:55)
>    at 
> org.apache.felix.framework.util.SecureAction$Actions.run(SecureAction.java:1071) 
>
>    at java.security.AccessController.doPrivileged(Native Method)
>    at 
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:580) 
>
>    at 
> org.apache.felix.framework.Felix$SystemBundleActivator.start(Felix.java:3761) 
>
>    at 
> org.apache.felix.framework.util.SecureAction$Actions.run(SecureAction.java:1071) 
>
>    at java.security.AccessController.doPrivileged(Native Method)
>    at 
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:580) 
>
>    at org.apache.felix.framework.Felix.init(Felix.java:849)
>    at org.apache.felix.framework.Felix.start(Felix.java:881)
>    at org.apache.felix.main.Main.main(Main.java:213)
> Could not create framework: java.lang.RuntimeException: Unable to 
> start system bundle.
> java.lang.RuntimeException: Unable to start system bundle.
>    at org.apache.felix.framework.Felix.init(Felix.java:857)
>    at org.apache.felix.framework.Felix.start(Felix.java:881)
>    at org.apache.felix.main.Main.main(Main.java:213)
>
> -- END OF FELIX ERROR MESSAGE --
>
> Any help and tips to enable security and solve this problem is highly 
> appreciated.
>
> Kind regards
> Hasan
>

-- 
--trialox ag--------------------------------------

  Hasan Hasan
  Binzm├╝hlestrasse 14
  CH-8050 Z├╝rich
  Tel: 0041-44-63 57577
  Fax: 0041-44-63 57574
  URL: http://www.trialox.ch


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


Mime
View raw message