felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Pauls <karlpa...@gmail.com>
Subject Re: felix +jamvm + GNU Classpath with security enabled
Date Thu, 13 Jan 2011 20:20:21 GMT
Well, that is actually more a bug in the gogo shell. It shouldn't
assume it can tostring a url and recreate it for a bundle entry -
alas, this is a mistake made pretty much all over the place so that is
the downside of disabling the urlhandlers. For now, you could try to
use the old felix shell instead of gogo (delete the gogo bundles in
the bundle dir and add the Shell and Shell Text UI bundles from:
http://felix.apache.org/site/downloads.cgi). That should give you a
working shell.

regards,

Karl

p.s.: I'll try to follow-up with a patch to the jira issue asap which
hopefully gets you working with urlhandlers enabled.

On Thu, Jan 13, 2011 at 8:58 PM, Samba <samba@teamf1.com> wrote:
> Hello Karl,
>
> After i disable urlhandlers, I seem to move forward a bit where bundle are
> getting created(I see more bundleX directories in the felix-cache directory
> now)  but the the gogo shell won't start, maybe because it is relying on the
> URL handler service.
>
> COMMAND:
> =======
> root@ubuntu:/home/samba/wurk/downloads/osgi/felix-framework-3.0.7#
> /usr/local/jamvm/bin/jamvm -Xmx256M -Dfelix.service.urlhandlers=false
> -Dorg.osgi.framework.security="osgi"
> -Dpolicy.provider=gnu.java.security.PolicyFile
> -Djava.security.policy=file:///home/samba/wurk/downloads/osgi/felix-framework-3.0.7/conf/java.policy
> -jar bin/felix.jar
>
>
> LOG:
> ===
> Read logging propreties from
> file:///home/samba/wurk/downloads/osgi/classpath-0.98/install/lib/logging.properties
> Default Policy user file  /root/.java.policy
> Default Policy file
> /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/security/java.policy
> Parsing configuration file
> file:/home/samba/wurk/downloads/osgi/felix-framework-3.0.7/conf/java.policy
> Building policy from URLs  {(http://felix.extensions:9/ <no
> certificates>)=java.security.Permissions@a7f370b8 (
>  (java.security.AllPermission *)
> )
> , (null <no certificates>)=java.security.Permissions@a7f36550 (
>  (java.security.AllPermission *)
> )
> }
> gogo: MalformedURLException: Protocol handler not found: bundle
> java.net.MalformedURLException: Protocol handler not found: bundle
>   at java.net.URL.<init>(URL.java:495)
>   at java.net.URL.<init>(URL.java:327)
>   at java.net.URI.toURL(URI.java:1004)
>   at org.apache.felix.gogo.shell.Shell.readScript(Shell.java:204)
>   at org.apache.felix.gogo.shell.Shell.source(Shell.java:187)
>   at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:107)
>   at java.lang.reflect.VMMethod.invoke(Native Method)
>   at java.lang.reflect.Method.invoke(Method.java:327)
>   at org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
>   at
> org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
>   at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:458)
>   at
> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:384)
>   at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
>   at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
>   at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
>   at
> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:79)
>   at org.apache.felix.gogo.shell.Activator.run(Activator.java:75)
>   at java.lang.Thread.run(Thread.java:745)
>
> I will also update the JIRA with this information
>
> regards,
> Samba
>
> On Thu, Jan 13, 2011 at 8:42 AM, Karl Pauls <karlpauls@gmail.com> wrote:
>
>> I justed replied to the jira but just in case: did you try disabling
>> urlhandlers?
>>
>> -Dfelix.service.urlhandlers=false
>>
>> regards,
>>
>> Karl
>>
>> On Wed, Jan 12, 2011 at 2:31 AM, Samba <samba@teamf1.com> wrote:
>> > Hi Karl,
>> >
>> > I have added the issue to Jira (
>> > https://issues.apache.org/jira/browse/FELIX-2775).
>> >
>> > regards
>> > Samba
>> >
>> >
>> > On Tue, Jan 11, 2011 at 2:23 PM, Karl Pauls <karlpauls@gmail.com> wrote:
>> >
>> >> Hi,
>> >>
>> >> this looks like a bug. Can you create a jira issue for this one?
>> >>
>> >> regards,
>> >>
>> >> Karl
>> >>
>> >> On Tue, Jan 11, 2011 at 10:58 PM, Samba <samba@teamf1.com> wrote:
>> >> > Hi All,
>> >> >
>> >> > I am new to java and OSGI. I am trying to start felix with security
>> >> enabled,
>> >> > so that i can only allow signed bundles to be installed and run in
the
>> >> OSGI
>> >> > framework. I hit the following error(See attached). It seems like the
>> >> > framework cannot find the class at runtime. I looked up the felix
>> >> framework
>> >> > source code and i find that the class has caused the error is present
>> in
>> >> the
>> >> > framework jar file.
>> >> >
>> >> > Here is  the configuration that i am running
>> >> >
>> >> > JamVM version - 1.5.4
>> >> > GNU Classpath - 0.9.8 (slightly modified to add missing methods from
>> >> apache
>> >> > harmony)
>> >> > Felix -  trunk(latest). I have also tried the stable release jar
>> >> > files(3.0.7). I get the same issue
>> >> >
>> >> > POLICY:
>> >> > grant {
>> >> >  permission java.security.AllPermission;
>> >> > }
>> >> >
>> >> > grant codeBase "http://felix.extensions:9/" {
>> >> >  permission java.security.AllPermission;
>> >> > };
>> >> >
>> >> > COMMAND:
>> >> > /usr/local/jamvm/bin/jamvm -Xmx256M
>> >> > -Djava.library.path=/home/samba/wurk/downloads/osgi/felix/main/bundle
>> >> > -Dorg.osgi.framework.security="osgi"
>> >> > -Dpolicy.provider=gnu.java.security.PolicyFile
>> >> >
>> >>
>> -Djava.security.policy=file:///home/samba/wurk/downloads/osgi/felix/main/conf/java.policy
>> >> > -jar target/org.apache.felix.main-3.1.0-
>> >> > SNAPSHOT.jar
>> >> >
>> >> > Can anyone give me a clue how i can debug this problem ?
>> >> >
>> >> > Thanks in advance for the help
>> >> >
>> >> > regards,
>> >> > Samba
>> >> >
>> >> >
>> >> > ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >> > For additional commands, e-mail: users-help@felix.apache.org
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Karl Pauls
>> >> karlpauls@gmail.com
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >> For additional commands, e-mail: users-help@felix.apache.org
>> >>
>> >>
>> >
>>
>>
>>
>> --
>> Karl Pauls
>> karlpauls@gmail.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>



-- 
Karl Pauls
karlpauls@gmail.com

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


Mime
View raw message