Return-Path: Delivered-To: apmail-incubator-felix-dev-archive@www.apache.org Received: (qmail 29611 invoked from network); 29 Jan 2007 13:41:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Jan 2007 13:41:21 -0000 Received: (qmail 19877 invoked by uid 500); 29 Jan 2007 13:41:27 -0000 Delivered-To: apmail-incubator-felix-dev-archive@incubator.apache.org Received: (qmail 19840 invoked by uid 500); 29 Jan 2007 13:41:26 -0000 Mailing-List: contact felix-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: felix-dev@incubator.apache.org Delivered-To: mailing list felix-dev@incubator.apache.org Received: (qmail 19828 invoked by uid 99); 29 Jan 2007 13:41:26 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jan 2007 05:41:26 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of chris.custine@gmail.com designates 64.233.162.232 as permitted sender) Received: from [64.233.162.232] (HELO nz-out-0506.google.com) (64.233.162.232) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jan 2007 05:41:18 -0800 Received: by nz-out-0506.google.com with SMTP id j2so1220389nzf for ; Mon, 29 Jan 2007 05:40:57 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=YAE2V9MBp7QWlCGQeH9TjnVxJoiByamdRlNBzb8gDyTMnukKLOpbD9ssn3QNT3+TG463zfnAuArTW8QDQhUmmeaS2HkzYFR0lobJ10nJpx8UsF6wohEVOziwPUbkxLzvcAdvXYgS96kZAhdRmN77UykCg/aIzdEcoTiK//u3BII= Received: by 10.64.181.12 with SMTP id d12mr9792715qbf.1170078057782; Mon, 29 Jan 2007 05:40:57 -0800 (PST) Received: by 10.65.75.1 with HTTP; Mon, 29 Jan 2007 05:40:57 -0800 (PST) Message-ID: <43b026c70701290540o570309a4v4cb2bae0009282a6@mail.gmail.com> Date: Mon, 29 Jan 2007 08:40:57 -0500 From: "Chris Custine" To: felix-dev@incubator.apache.org Subject: Re: bundleContext.installBundle() In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_106617_4011889.1170078057712" References: <43b026c70701282048k3fad0243geb3db38d4f40531e@mail.gmail.com> <487a994c0701290039r5208e4edi73ed1551bd88858d@mail.gmail.com> <487a994c0701290101y304447e2wb35b68c7f2f2b907@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_106617_4011889.1170078057712 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Outstanding guys! I love it when something gets fixed while I sleep ;-) Thanks, Chris On 1/29/07, Felix Meschberger wrote: > > Thanks alot. > > Regards > Felix > > On 1/29/07, Karl Pauls wrote: > > > The problem is, that no matter the URLStreamHandler, if there is no > > > scheme - either from the context or the url string - the URL > > > constructor fails. And this - at least in my case - is the situation > > > here ... > > > > Interesting. I was missing the case where we have an invalid scheme. > > Should be fixed now. > > > > regards, > > > > Karl > > > > > Regards > > > Felix > > > > > > On 1/29/07, Karl Pauls wrote: > > > > Hello, > > > > > > > > this is really strange since we do pass in a fake URLHandler but > with > > > > an empty context. Maybe that is what causing the trouble. Anyways, > I'm > > > > going to remove this asap (it was a temporary placeholder anyways). > > > > > > > > regards, > > > > > > > > Karl > > > > > > > > On 1/29/07, Felix Meschberger wrote: > > > > > Hi, > > > > > > > > > > This seems to have only been introduced lately into Felix. I use > the > > > > > same API call and just put a name there. To fix, I just prepend > the > > > > > string "inputstream:" (not a good name after all :-) ), which > works. > > > > > > > > > > The API spec just says, the location is "used as the identity of > the > > > > > bundle". That is each bundle has its unique location name. The > > > > > BundleContext.installBundle(String location) spec says, that the > > > > > bundle is retrieved from the named location in a Framework > dependent > > > > > manner and that the location string is "typically in the form of a > > > > > URL". > > > > > > > > > > All in all, I can live with the situation of the location string > to be > > > > > an URL. On the other hand as the spec does not require it, Felix > > > > > should probably handle the case of a missing scheme name properly > when > > > > > creating the code source URL. Perhaps with something like this : > > > > > > > > > > URL dummy = new URL(null, "location:", fakeHandler); // > might by Constant > > > > > URL codeSource = new URL(dummy, locationString, > fakeHandler); > > > > > > > > > > Regards > > > > > Felix > > > > > > > > > > On 1/29/07, Chris Custine wrote: > > > > > > Need a little insight from others here... When installing a > bundle from an > > > > > > InputStream using the form: > > > > > > > > > > > > bundleContext.installBundle(String location, InputStream is) > > > > > > > > > > > > does the location String have to be a valid URL string? I have > a couple of > > > > > > scenarios where existing code running on Equinox and > Knopflerfish handles > > > > > > this fine, but in Felix we are using that String to create a > valid URL > > > > > > object for the CodeSource constructor at Felix.java:2921 so we > get a > > > > > > MalformedURLException at SecureAction.java:161 > > > > > > > > > > > > I am just trying to figure out if it is pure luck that Equinox > and KF work > > > > > > with bogus location Strings (only when installing from > InputStream) or if it > > > > > > is something that we need to look at in Felix. I have run into > this twice > > > > > > this week, once with a client's code and once in Spring-OSGi > test harness. > > > > > > > > > > > > Chris > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > Karl Pauls > > > > karlpauls@gmail.com > > > > > > > > > > > > > -- > > Karl Pauls > > karlpauls@gmail.com > > > ------=_Part_106617_4011889.1170078057712--