Hi Niclas On 3/6/07, Niclas Hedhman <[EMAIL PROTECTED]> wrote:
On Wednesday 07 March 2007 09:04, Ivo K. Koga wrote: > I just start this jnlp. This launches successfully the application, but > when I install and try to run the bundle I got the error I sent before. > > I didn´t understand the "what I do next (in detail)" question. Does this > answer the question? If not, please let me know. "the bundle" is referring to some other bundle not listed in that JNLP??
The bundle is importing some packages that I already export in the initialization of felix: In the manifest file I have: Import-Package: br.unifacs.nuperc.flavor.perfsonar.ls.bundle, javax.swing, javax.xml.rpc, org.jdom.input, org.jdom.output, org.jdom, org.apache.axis.client, javax.xml.namespace, javax.xml.parsers, org.xml.sax, org.apache.axis.message, org.w3c.dom, br.unifacs.nuperc.flavor.api.data.impl And in the configMap I have: Map configMap = new StringMap(false); configMap.put(FelixConstants.FRAMEWORK_SYSTEMPACKAGES, "org.osgi.framework; version=1.3.0," + "org.osgi.service.packageadmin; version=1.2.0," + "org.osgi.service.startlevel; version=1.0.0," + "org.osgi.service.url; version=1.0.0" +", org.jdom" +", org.jdom.input" +", org.jdom.output" +", javax.xml.rpc" ... and others); felix = new Felix(); felix.start( new MutablePropertyResolverImpl(configMap), list); I think this packages is in this declaration of the jnlp file: <jar href="lib/jdom-1.0-jdom.jar" download="eager"/> Maybe I am having this problem because I´m trying to install a bundle jar that is outside the jnlp file, but it is what I want: to install and uninstall bundles outside the host application. So i do not have control over what bundles will be installed on the OSGi framework. If I understood with the solution suggestion you sent, I have to know what bundles will be installed in my OSGi framework or am i wrong? Thanks for fast the answer! :-) Regards, Ivo Koga IIRC, Java WS will assign the AllPermissons to the jar files that is
declared in it. However, jar files outside will end up without permissions. In OSGi you can assign permissions in runtime, but I am not sure if Felix has full security support yet.
Humn, So Felix doesn´t support what I´m trying to do? If not, then I suggest that you try to create a new Policy within
the 'standard' bundles, which grants AllPermissions to your 'trusted sources'. I have only done stuff like that for testing, but look at [1] and [2] to get the idea.
Cheers
Niclas [1] https://scm.ops4j.org/repos/ops4j/projects/hansa/tests/integration/src/test/java/org/ops4j/hansa/impl/test/HansaSecurityTest.java [2] https://scm.ops4j.org/repos/ops4j/projects/hansa/test-support/src/main/java/org/ops4j/hansa/testsupport/TestPolicy.java
-- Msc. Candidate in Computer Networks at Universidade Salvador/BA/Brazil Measurement WG - RNP/Brazil