On Thu, Jan 13, 2011 at 10:49 PM, Samba <[email protected]> wrote:
> Hello Karl,
>
> I do get the shell prompt if i use the Shell and Shell Text UI bundles, but
> felix security bundle does not start  the permission admin and the
> conditional permission admin services. Instead  I get the following warning
>
> WARNING: Unable to start Felix Extension Activator
> (java.nio.channels.UnresolvedAddressException)
>
> If i dump the stack at the point where the exception occurs, I get the
> following
>
>  at java.lang.Thread.dumpStack(Thread.java:522)
>   at
> java.nio.channels.UnresolvedAddressException.<init>(UnresolvedAddressException.java:55)
>   at gnu.java.nio.SocketChannelImpl.connect(SocketChannelImpl.java:160)
>   at gnu.java.net.PlainSocketImpl.connect(PlainSocketImpl.java:281)
>   at java.net.Socket.connect(Socket.java:454)
>   at java.net.Socket.connect(Socket.java:414)
>   at
> gnu.java.net.protocol.http.HTTPConnection.getSocket(HTTPConnection.java:721)
>   at
> gnu.java.net.protocol.http.HTTPConnection.getOutputStream(HTTPConnection.java:802)
>   at gnu.java.net.protocol.http.Request.dispatch(Request.java:292)
>   at
> gnu.java.net.protocol.http.HTTPURLConnection.connect(HTTPURLConnection.java:219)
>   at
> gnu.java.net.protocol.http.HTTPURLConnection.getHeaderField(HTTPURLConnection.java:582)
>   at java.net.URLConnection.getHeaderFieldInt(URLConnection.java:426)
>   at java.net.URLConnection.getContentLength(URLConnection.java:302)
>   at
> gnu.java.net.loader.RemoteURLLoader.getResource(RemoteURLLoader.java:79)
>   at java.net.URLClassLoader.findClass(URLClassLoader.java:528)
>   at java.lang.ClassLoader.loadClass(ClassLoader.java:341)
>   at java.lang.ClassLoader$1.loadClass(ClassLoader.java:1112)
>   at java.lang.ClassLoader.loadClass(ClassLoader.java:293)
>   at
> org.apache.felix.framework.ExtensionManager.startExtensionBundle(ExtensionManager.java:381)
>   at org.apache.felix.framework.Felix.installBundle(Felix.java:2610)
>   at org.apache.felix.framework.Felix.installBundle(Felix.java:2429)
>   at
> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:121)
>   at
> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:107)
>   at
> org.apache.felix.main.AutoProcessor.processAutoDeploy(AutoProcessor.java:173)
>   at org.apache.felix.main.AutoProcessor.process(AutoProcessor.java:78)
>   at org.apache.felix.main.Main.main(Main.java:291)
>   at java.lang.reflect.VMMethod.invoke(Native Method)
>   at java.lang.reflect.Method.invoke(Method.java:327)
>   at jamvm.java.lang.JarLauncher.main(JarLauncher.java:50)
>
> It seems like the framework.security also relies on the url handlers being
> enabled.

No, not security but the extension bundle implementation does use urls
and that seems to fail (but shouldn't). I'll have to investigate
whether that is happening on other vm's as well - can you add that to
the jira too please?

regards,

Karl

> regards
> Samba
>
> On Thu, Jan 13, 2011 at 12:20 PM, Karl Pauls <[email protected]> wrote:
>
>> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]>
>> 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 <[email protected]> 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: [email protected]
>> >> >> > For additional commands, e-mail: [email protected]
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Karl Pauls
>> >> >> [email protected]
>> >> >>
>> >> >> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: [email protected]
>> >> >> For additional commands, e-mail: [email protected]
>> >> >>
>> >> >>
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Karl Pauls
>> >> [email protected]
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [email protected]
>> >> For additional commands, e-mail: [email protected]
>> >>
>> >>
>> >
>>
>>
>>
>> --
>> Karl Pauls
>> [email protected]
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>



-- 
Karl Pauls
[email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to