You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by galaxy <ti...@gmail.com> on 2009/06/08 07:46:48 UTC

About harmony running felix

Hi
It's about running felix in harmony .When we run felix in harmony with the
felix-cache there , it's OK.
But there will be errors when running without the felix-cache .That means
after deleting felix-cache , harmony runtime fails to install
the bundles set to be auto-installed .While with sun jdk ,it runs well .That
is to say harmony runtime is only able to find the cache dir which is
specified by
"felix.cache.rootdir" in the config.properties file (mine is
"felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle which is the
specified by "file:xxx.jar"
Also the command  "install file:XXX.jar" won't work .The erroe message is
"[1]

I did some search and found that the it's related to the urlhandler class.
I think whenever referring to the "file:xxx.jar" , the url fails to locate
the file .
I think it's ours , not the felix's problem , so I report it here.

You may try this by deleting the felix-cache directory in the working
directory and run
java -jar bin\felix.jar
with harmony's and sun's respectively .If you run sun's first and not
deleting the cache afterwards , no error .


[1]
java.net.MalformedURLException: java.lang.IllegalStateException: Stream
handler
unavailable due to: Stream handler unavailable due to: null"



-- 
regards
Tian

Re: About harmony running felix

Posted by galaxy <ti...@gmail.com>.
 Run sun runtime to install what I need first and then test it under harmony
, a awkward way .I will try to write a test case and report on jira and I
think I will do more research on this problem .

BTW I have already mailed to the felix dev mailinglist this morning to tell
them about our project and ask them if there is any rules or something else
I have fo follow , get no reply yet .

T
2009/6/8 Jimmy,Jing Lv <fi...@gmail.com>

> Good job, Tian,
>
>     So as far as I understand, it seems a problem of  RL Handler, I believe
> it's worth for you to write a standard simple testcase for it and raise a
> JIRA for the defect.
>     BTW do you have a fix or a workaround for the defect now?
>
> 2009/6/8 galaxy <ti...@gmail.com>
>
> > Hi
> > It's about running felix in harmony .When we run felix in harmony with
> the
> > felix-cache there , it's OK.
> > But there will be errors when running without the felix-cache .That means
> > after deleting felix-cache , harmony runtime fails to install
> > the bundles set to be auto-installed .While with sun jdk ,it runs well
> > .That
> > is to say harmony runtime is only able to find the cache dir which is
> > specified by
> > "felix.cache.rootdir" in the config.properties file (mine is
> > "felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle which is the
> > specified by "file:xxx.jar"
> > Also the command  "install file:XXX.jar" won't work .The erroe message is
> > "[1]
> >
> > I did some search and found that the it's related to the urlhandler
> class.
> > I think whenever referring to the "file:xxx.jar" , the url fails to
> locate
> > the file .
> > I think it's ours , not the felix's problem , so I report it here.
> >
> > You may try this by deleting the felix-cache directory in the working
> > directory and run
> > java -jar bin\felix.jar
> > with harmony's and sun's respectively .If you run sun's first and not
> > deleting the cache afterwards , no error .
> >
> >
> > [1]
> > java.net.MalformedURLException: java.lang.IllegalStateException: Stream
> > handler
> > unavailable due to: Stream handler unavailable due to: null"
> >
> >
> >
> > --
> > regards
> > Tian
> >
>
>
>
> --
>
> Best Regards!
>
> Jimmy, Jing Lv
> China Software Development Lab, IBM
>



-- 
regards
Tian

Re: About harmony running felix

Posted by "Jimmy,Jing Lv" <fi...@gmail.com>.
Good job, Tian,

     So as far as I understand, it seems a problem of  RL Handler, I believe
it's worth for you to write a standard simple testcase for it and raise a
JIRA for the defect.
     BTW do you have a fix or a workaround for the defect now?

2009/6/8 galaxy <ti...@gmail.com>

> Hi
> It's about running felix in harmony .When we run felix in harmony with the
> felix-cache there , it's OK.
> But there will be errors when running without the felix-cache .That means
> after deleting felix-cache , harmony runtime fails to install
> the bundles set to be auto-installed .While with sun jdk ,it runs well
> .That
> is to say harmony runtime is only able to find the cache dir which is
> specified by
> "felix.cache.rootdir" in the config.properties file (mine is
> "felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle which is the
> specified by "file:xxx.jar"
> Also the command  "install file:XXX.jar" won't work .The erroe message is
> "[1]
>
> I did some search and found that the it's related to the urlhandler class.
> I think whenever referring to the "file:xxx.jar" , the url fails to locate
> the file .
> I think it's ours , not the felix's problem , so I report it here.
>
> You may try this by deleting the felix-cache directory in the working
> directory and run
> java -jar bin\felix.jar
> with harmony's and sun's respectively .If you run sun's first and not
> deleting the cache afterwards , no error .
>
>
> [1]
> java.net.MalformedURLException: java.lang.IllegalStateException: Stream
> handler
> unavailable due to: Stream handler unavailable due to: null"
>
>
>
> --
> regards
> Tian
>



-- 

Best Regards!

Jimmy, Jing Lv
China Software Development Lab, IBM

Re: About harmony running felix

Posted by Karl Pauls <ka...@gmail.com>.
The patch looks good to me. Thanks.

regards,

Karl

On Wed, Jul 1, 2009 at 4:22 PM, Tim Ellison<t....@gmail.com> wrote:
> Ah, not to worry, I figured out the test case and have a fix.
>
> https://issues.apache.org/jira/browse/HARMONY-6254
>
> Please check if this fixes the problem for you.
>
> Regards,
> Tim
>
> Tim Ellison wrote:
>> Karl,
>>
>> You didn't provide a walkback (that I saw).
>>
>> Is the exception thrown on line 309 of java.net.URLStreamHandler?
>> That's the only place that I see our code assuming that the file part is
>> not null, which is an incorrect assumption since the URL code handles
>> null file parts ok.
>>
>> I searched for some way to create a URL with a null file part, but I'm
>> struggling...
>>
>> Regards,
>> Tim
>>
>> Karl Pauls wrote:
>>> I can try but I'm not sure whether I have the time. Thing is, we do
>>> pretty strange stuff in felix to support the OSGi spec in regard to
>>> URLStreamHandlers. It might very well be possible that in most cases
>>> the comment is right and the file part of a URL will not be null but
>>> an empty string however, in our case its not and that is kind of
>>> proving it wrong :-)
>>>
>>> I'll look into creating a testcase but at any rate, for now, I'm going
>>> to add a workaround in felix that catches the NPE and does the same
>>> that URLStreamHandler.toExternalForm() does in harmony just assuming
>>> that URL.getFile() might return null. Already tested it and that makes
>>> it work without any problems.
>>>
>>> regards,
>>>
>>> Karl
>>>
>>> On Tue, Jun 16, 2009 at 12:12 PM, Davanum Srinivas<da...@gmail.com> wrote:
>>>> Karl,
>>>>
>>>> Can you please JIRA-it with a stripped down test case?
>>>>
>>>> thanks,
>>>> dims
>>>>
>>>> On 06/16/2009 04:19 AM, Karl Pauls wrote:
>>>>> Thanks, I did figure that one out already. Sorry for the noise (the
>>>>> difficulty was just to get it to work with eclipse running on my mac
>>>>> and harmony inside windows on virtual box :-).
>>>>>
>>>>> I now can see what is going on and I do think it is a bug in harmony.
>>>>> I might be able to workaround it in felix for the time being but the
>>>>> issue is this:
>>>>>
>>>>> URLStreamHandler.toExternalForm() does assume that the url has a file
>>>>> part and that it is not null (there is even a comment saying so). I
>>>>> think that is not a valid assumption and in this case it is what is
>>>>> causing the problem. We do a toExternalForm on a url that has only the
>>>>> schema set (not the file part). In this case the
>>>>> URLStreamHandler.toExternalForm() is using the result of a call to
>>>>> URL.getFile() without checking whether it is null or not and
>>>>> subsequently, is throwing a NPE. That doesn't happen on sun and is the
>>>>> problem for felix.
>>>>>
>>>>> regards,
>>>>>
>>>>> Karl
>>>>>
>>>>> On Tue, Jun 16, 2009 at 5:52 AM, Nathan Beyer<nb...@gmail.com>  wrote:
>>>>>> On Mon, Jun 15, 2009 at 3:42 AM, Karl Pauls<ka...@gmail.com>  wrote:
>>>>>>> Already did. Doesn't fix it.
>>>>>>>
>>>>>>> We do quite some magic in regard to the URLHandlers inside felix so
>>>>>>> I'm not surprised that we run into some issues on harmony but this one
>>>>>>> is odd as it seems to get down to an NPE inside URL.class at a place
>>>>>>> where this just doesn't seem possible with the current trunk. Granted,
>>>>>>> due to the magic it isn't that clear that this is the real problem. It
>>>>>>> might be just a side-effect. Is there a way to hook-up harmony to the
>>>>>>> eclipse debugger (i.e., have felix run on top of harmony and connect a
>>>>>>> normal remote debugger)?
>>>>>> It should work just like any other remote process debug. Just launch
>>>>>> Felix+Harmony with the standard debug options to listen on a socket
>>>>>> and suspend on startup, then connect to it from Eclipse.
>>>>>>
>>>>>> -Nathan
>>>>>>> regards,
>>>>>>>
>>>>>>> Karl
>>>>>>>
>>>>>>> On Mon, Jun 15, 2009 at 12:24 AM, Nathan Beyer<nb...@gmail.com>  wrote:
>>>>>>>> Try out the latest milestone that just release last week -
>>>>>>>> http://harmony.apache.org/download.cgi
>>>>>>>>
>>>>>>>> 5M10 should be pretty close to trunk right now.
>>>>>>>>
>>>>>>>> -Nathan
>>>>>>>>
>>>>>>>> On Sun, Jun 14, 2009 at 3:42 PM, Karl Pauls<ka...@gmail.com>
>>>>>>>>  wrote:
>>>>>>>>> Is it possible to download a build of the current trunk somewhere? I'd
>>>>>>>>> like to look into this issue...
>>>>>>>>>
>>>>>>>>> regards,
>>>>>>>>>
>>>>>>>>> Karl
>>>>>>>>>
>>>>>>>>> On Tue, Jun 9, 2009 at 5:30 AM, Nathan Beyer<nd...@apache.org>
>>>>>>>>>  wrote:
>>>>>>>>>> That's somewhat old. I don't suppose you could to a fresh build from
>>>>>>>>>> HEAD and try again - at least a fresh build of the classlib. The
>>>>>>>>>> change I'm thinking of probably isn't in the build you're using.
>>>>>>>>>>
>>>>>>>>>> -Nathan
>>>>>>>>>>
>>>>>>>>>> On Mon, Jun 8, 2009 at 9:49 PM, galaxy<ti...@gmail.com>  wrote:
>>>>>>>>>>> It's , harmony-jre-761593,
>>>>>>>>>>>
>>>>>>>>>>> 2009/6/9 Nathan Beyer<nd...@apache.org>
>>>>>>>>>>>
>>>>>>>>>>>> On Mon, Jun 8, 2009 at 12:46 AM, galaxy<ti...@gmail.com>
>>>>>>>>>>>>  wrote:
>>>>>>>>>>>>> Hi
>>>>>>>>>>>>> It's about running felix in harmony .When we run felix in harmony
>>>>>>>>>>>>> with
>>>>>>>>>>>> the
>>>>>>>>>>>>> felix-cache there , it's OK.
>>>>>>>>>>>>> But there will be errors when running without the felix-cache
>>>>>>>>>>>>> .That means
>>>>>>>>>>>>> after deleting felix-cache , harmony runtime fails to install
>>>>>>>>>>>>> the bundles set to be auto-installed .While with sun jdk ,it runs
>>>>>>>>>>>>> well
>>>>>>>>>>>> .That
>>>>>>>>>>>>> is to say harmony runtime is only able to find the cache dir which
>>>>>>>>>>>>> is
>>>>>>>>>>>>> specified by
>>>>>>>>>>>>> "felix.cache.rootdir" in the config.properties file (mine is
>>>>>>>>>>>>> "felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle which
>>>>>>>>>>>>> is the
>>>>>>>>>>>>> specified by "file:xxx.jar"
>>>>>>>>>>>>> Also the command  "install file:XXX.jar" won't work .The erroe
>>>>>>>>>>>>> message is
>>>>>>>>>>>>> "[1]
>>>>>>>>>>>>>
>>>>>>>>>>>>> I did some search and found that the it's related to the
>>>>>>>>>>>>> urlhandler
>>>>>>>>>>>> class.
>>>>>>>>>>>>> I think whenever referring to the "file:xxx.jar" , the url fails
>>>>>>>>>>>>> to
>>>>>>>>>>>> locate
>>>>>>>>>>>>> the file .
>>>>>>>>>>>> What build of Harmony are you testing? Is it a Milestone build? A
>>>>>>>>>>>> recent fix may address this issue, but it hasn't made into a
>>>>>>>>>>>> published
>>>>>>>>>>>> build yet.
>>>>>>>>>>>>
>>>>>>>>>>>>> I think it's ours , not the felix's problem , so I report it here.
>>>>>>>>>>>>>
>>>>>>>>>>>>> You may try this by deleting the felix-cache directory in the
>>>>>>>>>>>>> working
>>>>>>>>>>>>> directory and run
>>>>>>>>>>>>> java -jar bin\felix.jar
>>>>>>>>>>>>> with harmony's and sun's respectively .If you run sun's first and
>>>>>>>>>>>>> not
>>>>>>>>>>>>> deleting the cache afterwards , no error .
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> [1]
>>>>>>>>>>>>> java.net.MalformedURLException: java.lang.IllegalStateException:
>>>>>>>>>>>>> Stream
>>>>>>>>>>>>> handler
>>>>>>>>>>>>> unavailable due to: Stream handler unavailable due to: null"
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> regards
>>>>>>>>>>>>> Tian
>>>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> regards
>>>>>>>>>>> Tian
>>>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Karl Pauls
>>>>>>>>> karlpauls@gmail.com
>>>>>>>>>
>>>>>>> --
>>>>>>> Karl Pauls
>>>>>>> karlpauls@gmail.com
>>>>>>>
>>>>>
>>>
>>>
>>
>



-- 
Karl Pauls
karlpauls@gmail.com

Re: About harmony running felix

Posted by galaxy <ti...@gmail.com>.
Sure ,Thanks

2009/7/1 Tim Ellison <t....@gmail.com>

> Ah, not to worry, I figured out the test case and have a fix.
>
> https://issues.apache.org/jira/browse/HARMONY-6254
>
> Please check if this fixes the problem for you.
>
> Regards,
> Tim
>
> Tim Ellison wrote:
> > Karl,
> >
> > You didn't provide a walkback (that I saw).
> >
> > Is the exception thrown on line 309 of java.net.URLStreamHandler?
> > That's the only place that I see our code assuming that the file part is
> > not null, which is an incorrect assumption since the URL code handles
> > null file parts ok.
> >
> > I searched for some way to create a URL with a null file part, but I'm
> > struggling...
> >
> > Regards,
> > Tim
> >
> > Karl Pauls wrote:
> >> I can try but I'm not sure whether I have the time. Thing is, we do
> >> pretty strange stuff in felix to support the OSGi spec in regard to
> >> URLStreamHandlers. It might very well be possible that in most cases
> >> the comment is right and the file part of a URL will not be null but
> >> an empty string however, in our case its not and that is kind of
> >> proving it wrong :-)
> >>
> >> I'll look into creating a testcase but at any rate, for now, I'm going
> >> to add a workaround in felix that catches the NPE and does the same
> >> that URLStreamHandler.toExternalForm() does in harmony just assuming
> >> that URL.getFile() might return null. Already tested it and that makes
> >> it work without any problems.
> >>
> >> regards,
> >>
> >> Karl
> >>
> >> On Tue, Jun 16, 2009 at 12:12 PM, Davanum Srinivas<da...@gmail.com>
> wrote:
> >>> Karl,
> >>>
> >>> Can you please JIRA-it with a stripped down test case?
> >>>
> >>> thanks,
> >>> dims
> >>>
> >>> On 06/16/2009 04:19 AM, Karl Pauls wrote:
> >>>> Thanks, I did figure that one out already. Sorry for the noise (the
> >>>> difficulty was just to get it to work with eclipse running on my mac
> >>>> and harmony inside windows on virtual box :-).
> >>>>
> >>>> I now can see what is going on and I do think it is a bug in harmony.
> >>>> I might be able to workaround it in felix for the time being but the
> >>>> issue is this:
> >>>>
> >>>> URLStreamHandler.toExternalForm() does assume that the url has a file
> >>>> part and that it is not null (there is even a comment saying so). I
> >>>> think that is not a valid assumption and in this case it is what is
> >>>> causing the problem. We do a toExternalForm on a url that has only the
> >>>> schema set (not the file part). In this case the
> >>>> URLStreamHandler.toExternalForm() is using the result of a call to
> >>>> URL.getFile() without checking whether it is null or not and
> >>>> subsequently, is throwing a NPE. That doesn't happen on sun and is the
> >>>> problem for felix.
> >>>>
> >>>> regards,
> >>>>
> >>>> Karl
> >>>>
> >>>> On Tue, Jun 16, 2009 at 5:52 AM, Nathan Beyer<nb...@gmail.com>
>  wrote:
> >>>>> On Mon, Jun 15, 2009 at 3:42 AM, Karl Pauls<ka...@gmail.com>
>  wrote:
> >>>>>> Already did. Doesn't fix it.
> >>>>>>
> >>>>>> We do quite some magic in regard to the URLHandlers inside felix so
> >>>>>> I'm not surprised that we run into some issues on harmony but this
> one
> >>>>>> is odd as it seems to get down to an NPE inside URL.class at a place
> >>>>>> where this just doesn't seem possible with the current trunk.
> Granted,
> >>>>>> due to the magic it isn't that clear that this is the real problem.
> It
> >>>>>> might be just a side-effect. Is there a way to hook-up harmony to
> the
> >>>>>> eclipse debugger (i.e., have felix run on top of harmony and connect
> a
> >>>>>> normal remote debugger)?
> >>>>> It should work just like any other remote process debug. Just launch
> >>>>> Felix+Harmony with the standard debug options to listen on a socket
> >>>>> and suspend on startup, then connect to it from Eclipse.
> >>>>>
> >>>>> -Nathan
> >>>>>> regards,
> >>>>>>
> >>>>>> Karl
> >>>>>>
> >>>>>> On Mon, Jun 15, 2009 at 12:24 AM, Nathan Beyer<nb...@gmail.com>
>  wrote:
> >>>>>>> Try out the latest milestone that just release last week -
> >>>>>>> http://harmony.apache.org/download.cgi
> >>>>>>>
> >>>>>>> 5M10 should be pretty close to trunk right now.
> >>>>>>>
> >>>>>>> -Nathan
> >>>>>>>
> >>>>>>> On Sun, Jun 14, 2009 at 3:42 PM, Karl Pauls<ka...@gmail.com>
> >>>>>>>  wrote:
> >>>>>>>> Is it possible to download a build of the current trunk somewhere?
> I'd
> >>>>>>>> like to look into this issue...
> >>>>>>>>
> >>>>>>>> regards,
> >>>>>>>>
> >>>>>>>> Karl
> >>>>>>>>
> >>>>>>>> On Tue, Jun 9, 2009 at 5:30 AM, Nathan Beyer<nd...@apache.org>
> >>>>>>>>  wrote:
> >>>>>>>>> That's somewhat old. I don't suppose you could to a fresh build
> from
> >>>>>>>>> HEAD and try again - at least a fresh build of the classlib. The
> >>>>>>>>> change I'm thinking of probably isn't in the build you're using.
> >>>>>>>>>
> >>>>>>>>> -Nathan
> >>>>>>>>>
> >>>>>>>>> On Mon, Jun 8, 2009 at 9:49 PM, galaxy<ti...@gmail.com>
>  wrote:
> >>>>>>>>>> It's , harmony-jre-761593,
> >>>>>>>>>>
> >>>>>>>>>> 2009/6/9 Nathan Beyer<nd...@apache.org>
> >>>>>>>>>>
> >>>>>>>>>>> On Mon, Jun 8, 2009 at 12:46 AM, galaxy<ti...@gmail.com>
> >>>>>>>>>>>  wrote:
> >>>>>>>>>>>> Hi
> >>>>>>>>>>>> It's about running felix in harmony .When we run felix in
> harmony
> >>>>>>>>>>>> with
> >>>>>>>>>>> the
> >>>>>>>>>>>> felix-cache there , it's OK.
> >>>>>>>>>>>> But there will be errors when running without the felix-cache
> >>>>>>>>>>>> .That means
> >>>>>>>>>>>> after deleting felix-cache , harmony runtime fails to install
> >>>>>>>>>>>> the bundles set to be auto-installed .While with sun jdk ,it
> runs
> >>>>>>>>>>>> well
> >>>>>>>>>>> .That
> >>>>>>>>>>>> is to say harmony runtime is only able to find the cache dir
> which
> >>>>>>>>>>>> is
> >>>>>>>>>>>> specified by
> >>>>>>>>>>>> "felix.cache.rootdir" in the config.properties file (mine is
> >>>>>>>>>>>> "felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle
> which
> >>>>>>>>>>>> is the
> >>>>>>>>>>>> specified by "file:xxx.jar"
> >>>>>>>>>>>> Also the command  "install file:XXX.jar" won't work .The erroe
> >>>>>>>>>>>> message is
> >>>>>>>>>>>> "[1]
> >>>>>>>>>>>>
> >>>>>>>>>>>> I did some search and found that the it's related to the
> >>>>>>>>>>>> urlhandler
> >>>>>>>>>>> class.
> >>>>>>>>>>>> I think whenever referring to the "file:xxx.jar" , the url
> fails
> >>>>>>>>>>>> to
> >>>>>>>>>>> locate
> >>>>>>>>>>>> the file .
> >>>>>>>>>>> What build of Harmony are you testing? Is it a Milestone build?
> A
> >>>>>>>>>>> recent fix may address this issue, but it hasn't made into a
> >>>>>>>>>>> published
> >>>>>>>>>>> build yet.
> >>>>>>>>>>>
> >>>>>>>>>>>> I think it's ours , not the felix's problem , so I report it
> here.
> >>>>>>>>>>>>
> >>>>>>>>>>>> You may try this by deleting the felix-cache directory in the
> >>>>>>>>>>>> working
> >>>>>>>>>>>> directory and run
> >>>>>>>>>>>> java -jar bin\felix.jar
> >>>>>>>>>>>> with harmony's and sun's respectively .If you run sun's first
> and
> >>>>>>>>>>>> not
> >>>>>>>>>>>> deleting the cache afterwards , no error .
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> [1]
> >>>>>>>>>>>> java.net.MalformedURLException:
> java.lang.IllegalStateException:
> >>>>>>>>>>>> Stream
> >>>>>>>>>>>> handler
> >>>>>>>>>>>> unavailable due to: Stream handler unavailable due to: null"
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> --
> >>>>>>>>>>>> regards
> >>>>>>>>>>>> Tian
> >>>>>>>>>>>>
> >>>>>>>>>> --
> >>>>>>>>>> regards
> >>>>>>>>>> Tian
> >>>>>>>>>>
> >>>>>>>> --
> >>>>>>>> Karl Pauls
> >>>>>>>> karlpauls@gmail.com
> >>>>>>>>
> >>>>>> --
> >>>>>> Karl Pauls
> >>>>>> karlpauls@gmail.com
> >>>>>>
> >>>>
> >>
> >>
> >
>



-- 
regards
Tian

Re: About harmony running felix

Posted by Tim Ellison <t....@gmail.com>.
Ah, not to worry, I figured out the test case and have a fix.

https://issues.apache.org/jira/browse/HARMONY-6254

Please check if this fixes the problem for you.

Regards,
Tim

Tim Ellison wrote:
> Karl,
> 
> You didn't provide a walkback (that I saw).
> 
> Is the exception thrown on line 309 of java.net.URLStreamHandler?
> That's the only place that I see our code assuming that the file part is
> not null, which is an incorrect assumption since the URL code handles
> null file parts ok.
> 
> I searched for some way to create a URL with a null file part, but I'm
> struggling...
> 
> Regards,
> Tim
> 
> Karl Pauls wrote:
>> I can try but I'm not sure whether I have the time. Thing is, we do
>> pretty strange stuff in felix to support the OSGi spec in regard to
>> URLStreamHandlers. It might very well be possible that in most cases
>> the comment is right and the file part of a URL will not be null but
>> an empty string however, in our case its not and that is kind of
>> proving it wrong :-)
>>
>> I'll look into creating a testcase but at any rate, for now, I'm going
>> to add a workaround in felix that catches the NPE and does the same
>> that URLStreamHandler.toExternalForm() does in harmony just assuming
>> that URL.getFile() might return null. Already tested it and that makes
>> it work without any problems.
>>
>> regards,
>>
>> Karl
>>
>> On Tue, Jun 16, 2009 at 12:12 PM, Davanum Srinivas<da...@gmail.com> wrote:
>>> Karl,
>>>
>>> Can you please JIRA-it with a stripped down test case?
>>>
>>> thanks,
>>> dims
>>>
>>> On 06/16/2009 04:19 AM, Karl Pauls wrote:
>>>> Thanks, I did figure that one out already. Sorry for the noise (the
>>>> difficulty was just to get it to work with eclipse running on my mac
>>>> and harmony inside windows on virtual box :-).
>>>>
>>>> I now can see what is going on and I do think it is a bug in harmony.
>>>> I might be able to workaround it in felix for the time being but the
>>>> issue is this:
>>>>
>>>> URLStreamHandler.toExternalForm() does assume that the url has a file
>>>> part and that it is not null (there is even a comment saying so). I
>>>> think that is not a valid assumption and in this case it is what is
>>>> causing the problem. We do a toExternalForm on a url that has only the
>>>> schema set (not the file part). In this case the
>>>> URLStreamHandler.toExternalForm() is using the result of a call to
>>>> URL.getFile() without checking whether it is null or not and
>>>> subsequently, is throwing a NPE. That doesn't happen on sun and is the
>>>> problem for felix.
>>>>
>>>> regards,
>>>>
>>>> Karl
>>>>
>>>> On Tue, Jun 16, 2009 at 5:52 AM, Nathan Beyer<nb...@gmail.com>  wrote:
>>>>> On Mon, Jun 15, 2009 at 3:42 AM, Karl Pauls<ka...@gmail.com>  wrote:
>>>>>> Already did. Doesn't fix it.
>>>>>>
>>>>>> We do quite some magic in regard to the URLHandlers inside felix so
>>>>>> I'm not surprised that we run into some issues on harmony but this one
>>>>>> is odd as it seems to get down to an NPE inside URL.class at a place
>>>>>> where this just doesn't seem possible with the current trunk. Granted,
>>>>>> due to the magic it isn't that clear that this is the real problem. It
>>>>>> might be just a side-effect. Is there a way to hook-up harmony to the
>>>>>> eclipse debugger (i.e., have felix run on top of harmony and connect a
>>>>>> normal remote debugger)?
>>>>> It should work just like any other remote process debug. Just launch
>>>>> Felix+Harmony with the standard debug options to listen on a socket
>>>>> and suspend on startup, then connect to it from Eclipse.
>>>>>
>>>>> -Nathan
>>>>>> regards,
>>>>>>
>>>>>> Karl
>>>>>>
>>>>>> On Mon, Jun 15, 2009 at 12:24 AM, Nathan Beyer<nb...@gmail.com>  wrote:
>>>>>>> Try out the latest milestone that just release last week -
>>>>>>> http://harmony.apache.org/download.cgi
>>>>>>>
>>>>>>> 5M10 should be pretty close to trunk right now.
>>>>>>>
>>>>>>> -Nathan
>>>>>>>
>>>>>>> On Sun, Jun 14, 2009 at 3:42 PM, Karl Pauls<ka...@gmail.com>
>>>>>>>  wrote:
>>>>>>>> Is it possible to download a build of the current trunk somewhere? I'd
>>>>>>>> like to look into this issue...
>>>>>>>>
>>>>>>>> regards,
>>>>>>>>
>>>>>>>> Karl
>>>>>>>>
>>>>>>>> On Tue, Jun 9, 2009 at 5:30 AM, Nathan Beyer<nd...@apache.org>
>>>>>>>>  wrote:
>>>>>>>>> That's somewhat old. I don't suppose you could to a fresh build from
>>>>>>>>> HEAD and try again - at least a fresh build of the classlib. The
>>>>>>>>> change I'm thinking of probably isn't in the build you're using.
>>>>>>>>>
>>>>>>>>> -Nathan
>>>>>>>>>
>>>>>>>>> On Mon, Jun 8, 2009 at 9:49 PM, galaxy<ti...@gmail.com>  wrote:
>>>>>>>>>> It's , harmony-jre-761593,
>>>>>>>>>>
>>>>>>>>>> 2009/6/9 Nathan Beyer<nd...@apache.org>
>>>>>>>>>>
>>>>>>>>>>> On Mon, Jun 8, 2009 at 12:46 AM, galaxy<ti...@gmail.com>
>>>>>>>>>>>  wrote:
>>>>>>>>>>>> Hi
>>>>>>>>>>>> It's about running felix in harmony .When we run felix in harmony
>>>>>>>>>>>> with
>>>>>>>>>>> the
>>>>>>>>>>>> felix-cache there , it's OK.
>>>>>>>>>>>> But there will be errors when running without the felix-cache
>>>>>>>>>>>> .That means
>>>>>>>>>>>> after deleting felix-cache , harmony runtime fails to install
>>>>>>>>>>>> the bundles set to be auto-installed .While with sun jdk ,it runs
>>>>>>>>>>>> well
>>>>>>>>>>> .That
>>>>>>>>>>>> is to say harmony runtime is only able to find the cache dir which
>>>>>>>>>>>> is
>>>>>>>>>>>> specified by
>>>>>>>>>>>> "felix.cache.rootdir" in the config.properties file (mine is
>>>>>>>>>>>> "felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle which
>>>>>>>>>>>> is the
>>>>>>>>>>>> specified by "file:xxx.jar"
>>>>>>>>>>>> Also the command  "install file:XXX.jar" won't work .The erroe
>>>>>>>>>>>> message is
>>>>>>>>>>>> "[1]
>>>>>>>>>>>>
>>>>>>>>>>>> I did some search and found that the it's related to the
>>>>>>>>>>>> urlhandler
>>>>>>>>>>> class.
>>>>>>>>>>>> I think whenever referring to the "file:xxx.jar" , the url fails
>>>>>>>>>>>> to
>>>>>>>>>>> locate
>>>>>>>>>>>> the file .
>>>>>>>>>>> What build of Harmony are you testing? Is it a Milestone build? A
>>>>>>>>>>> recent fix may address this issue, but it hasn't made into a
>>>>>>>>>>> published
>>>>>>>>>>> build yet.
>>>>>>>>>>>
>>>>>>>>>>>> I think it's ours , not the felix's problem , so I report it here.
>>>>>>>>>>>>
>>>>>>>>>>>> You may try this by deleting the felix-cache directory in the
>>>>>>>>>>>> working
>>>>>>>>>>>> directory and run
>>>>>>>>>>>> java -jar bin\felix.jar
>>>>>>>>>>>> with harmony's and sun's respectively .If you run sun's first and
>>>>>>>>>>>> not
>>>>>>>>>>>> deleting the cache afterwards , no error .
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> [1]
>>>>>>>>>>>> java.net.MalformedURLException: java.lang.IllegalStateException:
>>>>>>>>>>>> Stream
>>>>>>>>>>>> handler
>>>>>>>>>>>> unavailable due to: Stream handler unavailable due to: null"
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> regards
>>>>>>>>>>>> Tian
>>>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> regards
>>>>>>>>>> Tian
>>>>>>>>>>
>>>>>>>> --
>>>>>>>> Karl Pauls
>>>>>>>> karlpauls@gmail.com
>>>>>>>>
>>>>>> --
>>>>>> Karl Pauls
>>>>>> karlpauls@gmail.com
>>>>>>
>>>>
>>
>>
> 

Re: About harmony running felix

Posted by Tim Ellison <t....@gmail.com>.
Karl,

You didn't provide a walkback (that I saw).

Is the exception thrown on line 309 of java.net.URLStreamHandler?
That's the only place that I see our code assuming that the file part is
not null, which is an incorrect assumption since the URL code handles
null file parts ok.

I searched for some way to create a URL with a null file part, but I'm
struggling...

Regards,
Tim

Karl Pauls wrote:
> I can try but I'm not sure whether I have the time. Thing is, we do
> pretty strange stuff in felix to support the OSGi spec in regard to
> URLStreamHandlers. It might very well be possible that in most cases
> the comment is right and the file part of a URL will not be null but
> an empty string however, in our case its not and that is kind of
> proving it wrong :-)
> 
> I'll look into creating a testcase but at any rate, for now, I'm going
> to add a workaround in felix that catches the NPE and does the same
> that URLStreamHandler.toExternalForm() does in harmony just assuming
> that URL.getFile() might return null. Already tested it and that makes
> it work without any problems.
> 
> regards,
> 
> Karl
> 
> On Tue, Jun 16, 2009 at 12:12 PM, Davanum Srinivas<da...@gmail.com> wrote:
>> Karl,
>>
>> Can you please JIRA-it with a stripped down test case?
>>
>> thanks,
>> dims
>>
>> On 06/16/2009 04:19 AM, Karl Pauls wrote:
>>> Thanks, I did figure that one out already. Sorry for the noise (the
>>> difficulty was just to get it to work with eclipse running on my mac
>>> and harmony inside windows on virtual box :-).
>>>
>>> I now can see what is going on and I do think it is a bug in harmony.
>>> I might be able to workaround it in felix for the time being but the
>>> issue is this:
>>>
>>> URLStreamHandler.toExternalForm() does assume that the url has a file
>>> part and that it is not null (there is even a comment saying so). I
>>> think that is not a valid assumption and in this case it is what is
>>> causing the problem. We do a toExternalForm on a url that has only the
>>> schema set (not the file part). In this case the
>>> URLStreamHandler.toExternalForm() is using the result of a call to
>>> URL.getFile() without checking whether it is null or not and
>>> subsequently, is throwing a NPE. That doesn't happen on sun and is the
>>> problem for felix.
>>>
>>> regards,
>>>
>>> Karl
>>>
>>> On Tue, Jun 16, 2009 at 5:52 AM, Nathan Beyer<nb...@gmail.com>  wrote:
>>>> On Mon, Jun 15, 2009 at 3:42 AM, Karl Pauls<ka...@gmail.com>  wrote:
>>>>> Already did. Doesn't fix it.
>>>>>
>>>>> We do quite some magic in regard to the URLHandlers inside felix so
>>>>> I'm not surprised that we run into some issues on harmony but this one
>>>>> is odd as it seems to get down to an NPE inside URL.class at a place
>>>>> where this just doesn't seem possible with the current trunk. Granted,
>>>>> due to the magic it isn't that clear that this is the real problem. It
>>>>> might be just a side-effect. Is there a way to hook-up harmony to the
>>>>> eclipse debugger (i.e., have felix run on top of harmony and connect a
>>>>> normal remote debugger)?
>>>> It should work just like any other remote process debug. Just launch
>>>> Felix+Harmony with the standard debug options to listen on a socket
>>>> and suspend on startup, then connect to it from Eclipse.
>>>>
>>>> -Nathan
>>>>> regards,
>>>>>
>>>>> Karl
>>>>>
>>>>> On Mon, Jun 15, 2009 at 12:24 AM, Nathan Beyer<nb...@gmail.com>  wrote:
>>>>>> Try out the latest milestone that just release last week -
>>>>>> http://harmony.apache.org/download.cgi
>>>>>>
>>>>>> 5M10 should be pretty close to trunk right now.
>>>>>>
>>>>>> -Nathan
>>>>>>
>>>>>> On Sun, Jun 14, 2009 at 3:42 PM, Karl Pauls<ka...@gmail.com>
>>>>>>  wrote:
>>>>>>> Is it possible to download a build of the current trunk somewhere? I'd
>>>>>>> like to look into this issue...
>>>>>>>
>>>>>>> regards,
>>>>>>>
>>>>>>> Karl
>>>>>>>
>>>>>>> On Tue, Jun 9, 2009 at 5:30 AM, Nathan Beyer<nd...@apache.org>
>>>>>>>  wrote:
>>>>>>>> That's somewhat old. I don't suppose you could to a fresh build from
>>>>>>>> HEAD and try again - at least a fresh build of the classlib. The
>>>>>>>> change I'm thinking of probably isn't in the build you're using.
>>>>>>>>
>>>>>>>> -Nathan
>>>>>>>>
>>>>>>>> On Mon, Jun 8, 2009 at 9:49 PM, galaxy<ti...@gmail.com>  wrote:
>>>>>>>>> It's , harmony-jre-761593,
>>>>>>>>>
>>>>>>>>> 2009/6/9 Nathan Beyer<nd...@apache.org>
>>>>>>>>>
>>>>>>>>>> On Mon, Jun 8, 2009 at 12:46 AM, galaxy<ti...@gmail.com>
>>>>>>>>>>  wrote:
>>>>>>>>>>> Hi
>>>>>>>>>>> It's about running felix in harmony .When we run felix in harmony
>>>>>>>>>>> with
>>>>>>>>>> the
>>>>>>>>>>> felix-cache there , it's OK.
>>>>>>>>>>> But there will be errors when running without the felix-cache
>>>>>>>>>>> .That means
>>>>>>>>>>> after deleting felix-cache , harmony runtime fails to install
>>>>>>>>>>> the bundles set to be auto-installed .While with sun jdk ,it runs
>>>>>>>>>>> well
>>>>>>>>>> .That
>>>>>>>>>>> is to say harmony runtime is only able to find the cache dir which
>>>>>>>>>>> is
>>>>>>>>>>> specified by
>>>>>>>>>>> "felix.cache.rootdir" in the config.properties file (mine is
>>>>>>>>>>> "felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle which
>>>>>>>>>>> is the
>>>>>>>>>>> specified by "file:xxx.jar"
>>>>>>>>>>> Also the command  "install file:XXX.jar" won't work .The erroe
>>>>>>>>>>> message is
>>>>>>>>>>> "[1]
>>>>>>>>>>>
>>>>>>>>>>> I did some search and found that the it's related to the
>>>>>>>>>>> urlhandler
>>>>>>>>>> class.
>>>>>>>>>>> I think whenever referring to the "file:xxx.jar" , the url fails
>>>>>>>>>>> to
>>>>>>>>>> locate
>>>>>>>>>>> the file .
>>>>>>>>>> What build of Harmony are you testing? Is it a Milestone build? A
>>>>>>>>>> recent fix may address this issue, but it hasn't made into a
>>>>>>>>>> published
>>>>>>>>>> build yet.
>>>>>>>>>>
>>>>>>>>>>> I think it's ours , not the felix's problem , so I report it here.
>>>>>>>>>>>
>>>>>>>>>>> You may try this by deleting the felix-cache directory in the
>>>>>>>>>>> working
>>>>>>>>>>> directory and run
>>>>>>>>>>> java -jar bin\felix.jar
>>>>>>>>>>> with harmony's and sun's respectively .If you run sun's first and
>>>>>>>>>>> not
>>>>>>>>>>> deleting the cache afterwards , no error .
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> [1]
>>>>>>>>>>> java.net.MalformedURLException: java.lang.IllegalStateException:
>>>>>>>>>>> Stream
>>>>>>>>>>> handler
>>>>>>>>>>> unavailable due to: Stream handler unavailable due to: null"
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> regards
>>>>>>>>>>> Tian
>>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> regards
>>>>>>>>> Tian
>>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Karl Pauls
>>>>>>> karlpauls@gmail.com
>>>>>>>
>>>>>
>>>>> --
>>>>> Karl Pauls
>>>>> karlpauls@gmail.com
>>>>>
>>>
>>>
> 
> 
> 

Re: About harmony running felix

Posted by Karl Pauls <ka...@gmail.com>.
I can try but I'm not sure whether I have the time. Thing is, we do
pretty strange stuff in felix to support the OSGi spec in regard to
URLStreamHandlers. It might very well be possible that in most cases
the comment is right and the file part of a URL will not be null but
an empty string however, in our case its not and that is kind of
proving it wrong :-)

I'll look into creating a testcase but at any rate, for now, I'm going
to add a workaround in felix that catches the NPE and does the same
that URLStreamHandler.toExternalForm() does in harmony just assuming
that URL.getFile() might return null. Already tested it and that makes
it work without any problems.

regards,

Karl

On Tue, Jun 16, 2009 at 12:12 PM, Davanum Srinivas<da...@gmail.com> wrote:
> Karl,
>
> Can you please JIRA-it with a stripped down test case?
>
> thanks,
> dims
>
> On 06/16/2009 04:19 AM, Karl Pauls wrote:
>>
>> Thanks, I did figure that one out already. Sorry for the noise (the
>> difficulty was just to get it to work with eclipse running on my mac
>> and harmony inside windows on virtual box :-).
>>
>> I now can see what is going on and I do think it is a bug in harmony.
>> I might be able to workaround it in felix for the time being but the
>> issue is this:
>>
>> URLStreamHandler.toExternalForm() does assume that the url has a file
>> part and that it is not null (there is even a comment saying so). I
>> think that is not a valid assumption and in this case it is what is
>> causing the problem. We do a toExternalForm on a url that has only the
>> schema set (not the file part). In this case the
>> URLStreamHandler.toExternalForm() is using the result of a call to
>> URL.getFile() without checking whether it is null or not and
>> subsequently, is throwing a NPE. That doesn't happen on sun and is the
>> problem for felix.
>>
>> regards,
>>
>> Karl
>>
>> On Tue, Jun 16, 2009 at 5:52 AM, Nathan Beyer<nb...@gmail.com>  wrote:
>>>
>>> On Mon, Jun 15, 2009 at 3:42 AM, Karl Pauls<ka...@gmail.com>  wrote:
>>>>
>>>> Already did. Doesn't fix it.
>>>>
>>>> We do quite some magic in regard to the URLHandlers inside felix so
>>>> I'm not surprised that we run into some issues on harmony but this one
>>>> is odd as it seems to get down to an NPE inside URL.class at a place
>>>> where this just doesn't seem possible with the current trunk. Granted,
>>>> due to the magic it isn't that clear that this is the real problem. It
>>>> might be just a side-effect. Is there a way to hook-up harmony to the
>>>> eclipse debugger (i.e., have felix run on top of harmony and connect a
>>>> normal remote debugger)?
>>>
>>> It should work just like any other remote process debug. Just launch
>>> Felix+Harmony with the standard debug options to listen on a socket
>>> and suspend on startup, then connect to it from Eclipse.
>>>
>>> -Nathan
>>>>
>>>> regards,
>>>>
>>>> Karl
>>>>
>>>> On Mon, Jun 15, 2009 at 12:24 AM, Nathan Beyer<nb...@gmail.com>  wrote:
>>>>>
>>>>> Try out the latest milestone that just release last week -
>>>>> http://harmony.apache.org/download.cgi
>>>>>
>>>>> 5M10 should be pretty close to trunk right now.
>>>>>
>>>>> -Nathan
>>>>>
>>>>> On Sun, Jun 14, 2009 at 3:42 PM, Karl Pauls<ka...@gmail.com>
>>>>>  wrote:
>>>>>>
>>>>>> Is it possible to download a build of the current trunk somewhere? I'd
>>>>>> like to look into this issue...
>>>>>>
>>>>>> regards,
>>>>>>
>>>>>> Karl
>>>>>>
>>>>>> On Tue, Jun 9, 2009 at 5:30 AM, Nathan Beyer<nd...@apache.org>
>>>>>>  wrote:
>>>>>>>
>>>>>>> That's somewhat old. I don't suppose you could to a fresh build from
>>>>>>> HEAD and try again - at least a fresh build of the classlib. The
>>>>>>> change I'm thinking of probably isn't in the build you're using.
>>>>>>>
>>>>>>> -Nathan
>>>>>>>
>>>>>>> On Mon, Jun 8, 2009 at 9:49 PM, galaxy<ti...@gmail.com>  wrote:
>>>>>>>>
>>>>>>>> It's , harmony-jre-761593,
>>>>>>>>
>>>>>>>> 2009/6/9 Nathan Beyer<nd...@apache.org>
>>>>>>>>
>>>>>>>>> On Mon, Jun 8, 2009 at 12:46 AM, galaxy<ti...@gmail.com>
>>>>>>>>>  wrote:
>>>>>>>>>>
>>>>>>>>>> Hi
>>>>>>>>>> It's about running felix in harmony .When we run felix in harmony
>>>>>>>>>> with
>>>>>>>>>
>>>>>>>>> the
>>>>>>>>>>
>>>>>>>>>> felix-cache there , it's OK.
>>>>>>>>>> But there will be errors when running without the felix-cache
>>>>>>>>>> .That means
>>>>>>>>>> after deleting felix-cache , harmony runtime fails to install
>>>>>>>>>> the bundles set to be auto-installed .While with sun jdk ,it runs
>>>>>>>>>> well
>>>>>>>>>
>>>>>>>>> .That
>>>>>>>>>>
>>>>>>>>>> is to say harmony runtime is only able to find the cache dir which
>>>>>>>>>> is
>>>>>>>>>> specified by
>>>>>>>>>> "felix.cache.rootdir" in the config.properties file (mine is
>>>>>>>>>> "felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle which
>>>>>>>>>> is the
>>>>>>>>>> specified by "file:xxx.jar"
>>>>>>>>>> Also the command  "install file:XXX.jar" won't work .The erroe
>>>>>>>>>> message is
>>>>>>>>>> "[1]
>>>>>>>>>>
>>>>>>>>>> I did some search and found that the it's related to the
>>>>>>>>>> urlhandler
>>>>>>>>>
>>>>>>>>> class.
>>>>>>>>>>
>>>>>>>>>> I think whenever referring to the "file:xxx.jar" , the url fails
>>>>>>>>>> to
>>>>>>>>>
>>>>>>>>> locate
>>>>>>>>>>
>>>>>>>>>> the file .
>>>>>>>>>
>>>>>>>>> What build of Harmony are you testing? Is it a Milestone build? A
>>>>>>>>> recent fix may address this issue, but it hasn't made into a
>>>>>>>>> published
>>>>>>>>> build yet.
>>>>>>>>>
>>>>>>>>>> I think it's ours , not the felix's problem , so I report it here.
>>>>>>>>>>
>>>>>>>>>> You may try this by deleting the felix-cache directory in the
>>>>>>>>>> working
>>>>>>>>>> directory and run
>>>>>>>>>> java -jar bin\felix.jar
>>>>>>>>>> with harmony's and sun's respectively .If you run sun's first and
>>>>>>>>>> not
>>>>>>>>>> deleting the cache afterwards , no error .
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> [1]
>>>>>>>>>> java.net.MalformedURLException: java.lang.IllegalStateException:
>>>>>>>>>> Stream
>>>>>>>>>> handler
>>>>>>>>>> unavailable due to: Stream handler unavailable due to: null"
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> regards
>>>>>>>>>> Tian
>>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> regards
>>>>>>>> Tian
>>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Karl Pauls
>>>>>> karlpauls@gmail.com
>>>>>>
>>>>
>>>>
>>>> --
>>>> Karl Pauls
>>>> karlpauls@gmail.com
>>>>
>>
>>
>>
>



-- 
Karl Pauls
karlpauls@gmail.com

Re: About harmony running felix

Posted by Davanum Srinivas <da...@gmail.com>.
Karl,

Can you please JIRA-it with a stripped down test case?

thanks,
dims

On 06/16/2009 04:19 AM, Karl Pauls wrote:
> Thanks, I did figure that one out already. Sorry for the noise (the
> difficulty was just to get it to work with eclipse running on my mac
> and harmony inside windows on virtual box :-).
>
> I now can see what is going on and I do think it is a bug in harmony.
> I might be able to workaround it in felix for the time being but the
> issue is this:
>
> URLStreamHandler.toExternalForm() does assume that the url has a file
> part and that it is not null (there is even a comment saying so). I
> think that is not a valid assumption and in this case it is what is
> causing the problem. We do a toExternalForm on a url that has only the
> schema set (not the file part). In this case the
> URLStreamHandler.toExternalForm() is using the result of a call to
> URL.getFile() without checking whether it is null or not and
> subsequently, is throwing a NPE. That doesn't happen on sun and is the
> problem for felix.
>
> regards,
>
> Karl
>
> On Tue, Jun 16, 2009 at 5:52 AM, Nathan Beyer<nb...@gmail.com>  wrote:
>> On Mon, Jun 15, 2009 at 3:42 AM, Karl Pauls<ka...@gmail.com>  wrote:
>>> Already did. Doesn't fix it.
>>>
>>> We do quite some magic in regard to the URLHandlers inside felix so
>>> I'm not surprised that we run into some issues on harmony but this one
>>> is odd as it seems to get down to an NPE inside URL.class at a place
>>> where this just doesn't seem possible with the current trunk. Granted,
>>> due to the magic it isn't that clear that this is the real problem. It
>>> might be just a side-effect. Is there a way to hook-up harmony to the
>>> eclipse debugger (i.e., have felix run on top of harmony and connect a
>>> normal remote debugger)?
>> It should work just like any other remote process debug. Just launch
>> Felix+Harmony with the standard debug options to listen on a socket
>> and suspend on startup, then connect to it from Eclipse.
>>
>> -Nathan
>>> regards,
>>>
>>> Karl
>>>
>>> On Mon, Jun 15, 2009 at 12:24 AM, Nathan Beyer<nb...@gmail.com>  wrote:
>>>> Try out the latest milestone that just release last week -
>>>> http://harmony.apache.org/download.cgi
>>>>
>>>> 5M10 should be pretty close to trunk right now.
>>>>
>>>> -Nathan
>>>>
>>>> On Sun, Jun 14, 2009 at 3:42 PM, Karl Pauls<ka...@gmail.com>  wrote:
>>>>> Is it possible to download a build of the current trunk somewhere? I'd
>>>>> like to look into this issue...
>>>>>
>>>>> regards,
>>>>>
>>>>> Karl
>>>>>
>>>>> On Tue, Jun 9, 2009 at 5:30 AM, Nathan Beyer<nd...@apache.org>  wrote:
>>>>>> That's somewhat old. I don't suppose you could to a fresh build from
>>>>>> HEAD and try again - at least a fresh build of the classlib. The
>>>>>> change I'm thinking of probably isn't in the build you're using.
>>>>>>
>>>>>> -Nathan
>>>>>>
>>>>>> On Mon, Jun 8, 2009 at 9:49 PM, galaxy<ti...@gmail.com>  wrote:
>>>>>>> It's , harmony-jre-761593,
>>>>>>>
>>>>>>> 2009/6/9 Nathan Beyer<nd...@apache.org>
>>>>>>>
>>>>>>>> On Mon, Jun 8, 2009 at 12:46 AM, galaxy<ti...@gmail.com>  wrote:
>>>>>>>>> Hi
>>>>>>>>> It's about running felix in harmony .When we run felix in harmony with
>>>>>>>> the
>>>>>>>>> felix-cache there , it's OK.
>>>>>>>>> But there will be errors when running without the felix-cache .That means
>>>>>>>>> after deleting felix-cache , harmony runtime fails to install
>>>>>>>>> the bundles set to be auto-installed .While with sun jdk ,it runs well
>>>>>>>> .That
>>>>>>>>> is to say harmony runtime is only able to find the cache dir which is
>>>>>>>>> specified by
>>>>>>>>> "felix.cache.rootdir" in the config.properties file (mine is
>>>>>>>>> "felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle which is the
>>>>>>>>> specified by "file:xxx.jar"
>>>>>>>>> Also the command  "install file:XXX.jar" won't work .The erroe message is
>>>>>>>>> "[1]
>>>>>>>>>
>>>>>>>>> I did some search and found that the it's related to the urlhandler
>>>>>>>> class.
>>>>>>>>> I think whenever referring to the "file:xxx.jar" , the url fails to
>>>>>>>> locate
>>>>>>>>> the file .
>>>>>>>> What build of Harmony are you testing? Is it a Milestone build? A
>>>>>>>> recent fix may address this issue, but it hasn't made into a published
>>>>>>>> build yet.
>>>>>>>>
>>>>>>>>> I think it's ours , not the felix's problem , so I report it here.
>>>>>>>>>
>>>>>>>>> You may try this by deleting the felix-cache directory in the working
>>>>>>>>> directory and run
>>>>>>>>> java -jar bin\felix.jar
>>>>>>>>> with harmony's and sun's respectively .If you run sun's first and not
>>>>>>>>> deleting the cache afterwards , no error .
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> [1]
>>>>>>>>> java.net.MalformedURLException: java.lang.IllegalStateException: Stream
>>>>>>>>> handler
>>>>>>>>> unavailable due to: Stream handler unavailable due to: null"
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> regards
>>>>>>>>> Tian
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> regards
>>>>>>> Tian
>>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Karl Pauls
>>>>> karlpauls@gmail.com
>>>>>
>>>
>>>
>>> --
>>> Karl Pauls
>>> karlpauls@gmail.com
>>>
>
>
>

Re: About harmony running felix

Posted by Karl Pauls <ka...@gmail.com>.
Thanks, I did figure that one out already. Sorry for the noise (the
difficulty was just to get it to work with eclipse running on my mac
and harmony inside windows on virtual box :-).

I now can see what is going on and I do think it is a bug in harmony.
I might be able to workaround it in felix for the time being but the
issue is this:

URLStreamHandler.toExternalForm() does assume that the url has a file
part and that it is not null (there is even a comment saying so). I
think that is not a valid assumption and in this case it is what is
causing the problem. We do a toExternalForm on a url that has only the
schema set (not the file part). In this case the
URLStreamHandler.toExternalForm() is using the result of a call to
URL.getFile() without checking whether it is null or not and
subsequently, is throwing a NPE. That doesn't happen on sun and is the
problem for felix.

regards,

Karl

On Tue, Jun 16, 2009 at 5:52 AM, Nathan Beyer<nb...@gmail.com> wrote:
> On Mon, Jun 15, 2009 at 3:42 AM, Karl Pauls<ka...@gmail.com> wrote:
>> Already did. Doesn't fix it.
>>
>> We do quite some magic in regard to the URLHandlers inside felix so
>> I'm not surprised that we run into some issues on harmony but this one
>> is odd as it seems to get down to an NPE inside URL.class at a place
>> where this just doesn't seem possible with the current trunk. Granted,
>> due to the magic it isn't that clear that this is the real problem. It
>> might be just a side-effect. Is there a way to hook-up harmony to the
>> eclipse debugger (i.e., have felix run on top of harmony and connect a
>> normal remote debugger)?
>
> It should work just like any other remote process debug. Just launch
> Felix+Harmony with the standard debug options to listen on a socket
> and suspend on startup, then connect to it from Eclipse.
>
> -Nathan
>>
>> regards,
>>
>> Karl
>>
>> On Mon, Jun 15, 2009 at 12:24 AM, Nathan Beyer<nb...@gmail.com> wrote:
>>> Try out the latest milestone that just release last week -
>>> http://harmony.apache.org/download.cgi
>>>
>>> 5M10 should be pretty close to trunk right now.
>>>
>>> -Nathan
>>>
>>> On Sun, Jun 14, 2009 at 3:42 PM, Karl Pauls<ka...@gmail.com> wrote:
>>>> Is it possible to download a build of the current trunk somewhere? I'd
>>>> like to look into this issue...
>>>>
>>>> regards,
>>>>
>>>> Karl
>>>>
>>>> On Tue, Jun 9, 2009 at 5:30 AM, Nathan Beyer<nd...@apache.org> wrote:
>>>>> That's somewhat old. I don't suppose you could to a fresh build from
>>>>> HEAD and try again - at least a fresh build of the classlib. The
>>>>> change I'm thinking of probably isn't in the build you're using.
>>>>>
>>>>> -Nathan
>>>>>
>>>>> On Mon, Jun 8, 2009 at 9:49 PM, galaxy<ti...@gmail.com> wrote:
>>>>>> It's , harmony-jre-761593,
>>>>>>
>>>>>> 2009/6/9 Nathan Beyer <nd...@apache.org>
>>>>>>
>>>>>>> On Mon, Jun 8, 2009 at 12:46 AM, galaxy<ti...@gmail.com> wrote:
>>>>>>> > Hi
>>>>>>> > It's about running felix in harmony .When we run felix in harmony with
>>>>>>> the
>>>>>>> > felix-cache there , it's OK.
>>>>>>> > But there will be errors when running without the felix-cache .That means
>>>>>>> > after deleting felix-cache , harmony runtime fails to install
>>>>>>> > the bundles set to be auto-installed .While with sun jdk ,it runs well
>>>>>>> .That
>>>>>>> > is to say harmony runtime is only able to find the cache dir which is
>>>>>>> > specified by
>>>>>>> > "felix.cache.rootdir" in the config.properties file (mine is
>>>>>>> > "felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle which is the
>>>>>>> > specified by "file:xxx.jar"
>>>>>>> > Also the command  "install file:XXX.jar" won't work .The erroe message is
>>>>>>> > "[1]
>>>>>>> >
>>>>>>> > I did some search and found that the it's related to the urlhandler
>>>>>>> class.
>>>>>>> > I think whenever referring to the "file:xxx.jar" , the url fails to
>>>>>>> locate
>>>>>>> > the file .
>>>>>>>
>>>>>>> What build of Harmony are you testing? Is it a Milestone build? A
>>>>>>> recent fix may address this issue, but it hasn't made into a published
>>>>>>> build yet.
>>>>>>>
>>>>>>> > I think it's ours , not the felix's problem , so I report it here.
>>>>>>> >
>>>>>>> > You may try this by deleting the felix-cache directory in the working
>>>>>>> > directory and run
>>>>>>> > java -jar bin\felix.jar
>>>>>>> > with harmony's and sun's respectively .If you run sun's first and not
>>>>>>> > deleting the cache afterwards , no error .
>>>>>>> >
>>>>>>> >
>>>>>>> > [1]
>>>>>>> > java.net.MalformedURLException: java.lang.IllegalStateException: Stream
>>>>>>> > handler
>>>>>>> > unavailable due to: Stream handler unavailable due to: null"
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> > --
>>>>>>> > regards
>>>>>>> > Tian
>>>>>>> >
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> regards
>>>>>> Tian
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Karl Pauls
>>>> karlpauls@gmail.com
>>>>
>>>
>>
>>
>>
>> --
>> Karl Pauls
>> karlpauls@gmail.com
>>
>



-- 
Karl Pauls
karlpauls@gmail.com

Re: About harmony running felix

Posted by Nathan Beyer <nb...@gmail.com>.
On Mon, Jun 15, 2009 at 3:42 AM, Karl Pauls<ka...@gmail.com> wrote:
> Already did. Doesn't fix it.
>
> We do quite some magic in regard to the URLHandlers inside felix so
> I'm not surprised that we run into some issues on harmony but this one
> is odd as it seems to get down to an NPE inside URL.class at a place
> where this just doesn't seem possible with the current trunk. Granted,
> due to the magic it isn't that clear that this is the real problem. It
> might be just a side-effect. Is there a way to hook-up harmony to the
> eclipse debugger (i.e., have felix run on top of harmony and connect a
> normal remote debugger)?

It should work just like any other remote process debug. Just launch
Felix+Harmony with the standard debug options to listen on a socket
and suspend on startup, then connect to it from Eclipse.

-Nathan
>
> regards,
>
> Karl
>
> On Mon, Jun 15, 2009 at 12:24 AM, Nathan Beyer<nb...@gmail.com> wrote:
>> Try out the latest milestone that just release last week -
>> http://harmony.apache.org/download.cgi
>>
>> 5M10 should be pretty close to trunk right now.
>>
>> -Nathan
>>
>> On Sun, Jun 14, 2009 at 3:42 PM, Karl Pauls<ka...@gmail.com> wrote:
>>> Is it possible to download a build of the current trunk somewhere? I'd
>>> like to look into this issue...
>>>
>>> regards,
>>>
>>> Karl
>>>
>>> On Tue, Jun 9, 2009 at 5:30 AM, Nathan Beyer<nd...@apache.org> wrote:
>>>> That's somewhat old. I don't suppose you could to a fresh build from
>>>> HEAD and try again - at least a fresh build of the classlib. The
>>>> change I'm thinking of probably isn't in the build you're using.
>>>>
>>>> -Nathan
>>>>
>>>> On Mon, Jun 8, 2009 at 9:49 PM, galaxy<ti...@gmail.com> wrote:
>>>>> It's , harmony-jre-761593,
>>>>>
>>>>> 2009/6/9 Nathan Beyer <nd...@apache.org>
>>>>>
>>>>>> On Mon, Jun 8, 2009 at 12:46 AM, galaxy<ti...@gmail.com> wrote:
>>>>>> > Hi
>>>>>> > It's about running felix in harmony .When we run felix in harmony with
>>>>>> the
>>>>>> > felix-cache there , it's OK.
>>>>>> > But there will be errors when running without the felix-cache .That means
>>>>>> > after deleting felix-cache , harmony runtime fails to install
>>>>>> > the bundles set to be auto-installed .While with sun jdk ,it runs well
>>>>>> .That
>>>>>> > is to say harmony runtime is only able to find the cache dir which is
>>>>>> > specified by
>>>>>> > "felix.cache.rootdir" in the config.properties file (mine is
>>>>>> > "felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle which is the
>>>>>> > specified by "file:xxx.jar"
>>>>>> > Also the command  "install file:XXX.jar" won't work .The erroe message is
>>>>>> > "[1]
>>>>>> >
>>>>>> > I did some search and found that the it's related to the urlhandler
>>>>>> class.
>>>>>> > I think whenever referring to the "file:xxx.jar" , the url fails to
>>>>>> locate
>>>>>> > the file .
>>>>>>
>>>>>> What build of Harmony are you testing? Is it a Milestone build? A
>>>>>> recent fix may address this issue, but it hasn't made into a published
>>>>>> build yet.
>>>>>>
>>>>>> > I think it's ours , not the felix's problem , so I report it here.
>>>>>> >
>>>>>> > You may try this by deleting the felix-cache directory in the working
>>>>>> > directory and run
>>>>>> > java -jar bin\felix.jar
>>>>>> > with harmony's and sun's respectively .If you run sun's first and not
>>>>>> > deleting the cache afterwards , no error .
>>>>>> >
>>>>>> >
>>>>>> > [1]
>>>>>> > java.net.MalformedURLException: java.lang.IllegalStateException: Stream
>>>>>> > handler
>>>>>> > unavailable due to: Stream handler unavailable due to: null"
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> > --
>>>>>> > regards
>>>>>> > Tian
>>>>>> >
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> regards
>>>>> Tian
>>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Karl Pauls
>>> karlpauls@gmail.com
>>>
>>
>
>
>
> --
> Karl Pauls
> karlpauls@gmail.com
>

Re: About harmony running felix

Posted by Karl Pauls <ka...@gmail.com>.
Already did. Doesn't fix it.

We do quite some magic in regard to the URLHandlers inside felix so
I'm not surprised that we run into some issues on harmony but this one
is odd as it seems to get down to an NPE inside URL.class at a place
where this just doesn't seem possible with the current trunk. Granted,
due to the magic it isn't that clear that this is the real problem. It
might be just a side-effect. Is there a way to hook-up harmony to the
eclipse debugger (i.e., have felix run on top of harmony and connect a
normal remote debugger)?

regards,

Karl

On Mon, Jun 15, 2009 at 12:24 AM, Nathan Beyer<nb...@gmail.com> wrote:
> Try out the latest milestone that just release last week -
> http://harmony.apache.org/download.cgi
>
> 5M10 should be pretty close to trunk right now.
>
> -Nathan
>
> On Sun, Jun 14, 2009 at 3:42 PM, Karl Pauls<ka...@gmail.com> wrote:
>> Is it possible to download a build of the current trunk somewhere? I'd
>> like to look into this issue...
>>
>> regards,
>>
>> Karl
>>
>> On Tue, Jun 9, 2009 at 5:30 AM, Nathan Beyer<nd...@apache.org> wrote:
>>> That's somewhat old. I don't suppose you could to a fresh build from
>>> HEAD and try again - at least a fresh build of the classlib. The
>>> change I'm thinking of probably isn't in the build you're using.
>>>
>>> -Nathan
>>>
>>> On Mon, Jun 8, 2009 at 9:49 PM, galaxy<ti...@gmail.com> wrote:
>>>> It's , harmony-jre-761593,
>>>>
>>>> 2009/6/9 Nathan Beyer <nd...@apache.org>
>>>>
>>>>> On Mon, Jun 8, 2009 at 12:46 AM, galaxy<ti...@gmail.com> wrote:
>>>>> > Hi
>>>>> > It's about running felix in harmony .When we run felix in harmony with
>>>>> the
>>>>> > felix-cache there , it's OK.
>>>>> > But there will be errors when running without the felix-cache .That means
>>>>> > after deleting felix-cache , harmony runtime fails to install
>>>>> > the bundles set to be auto-installed .While with sun jdk ,it runs well
>>>>> .That
>>>>> > is to say harmony runtime is only able to find the cache dir which is
>>>>> > specified by
>>>>> > "felix.cache.rootdir" in the config.properties file (mine is
>>>>> > "felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle which is the
>>>>> > specified by "file:xxx.jar"
>>>>> > Also the command  "install file:XXX.jar" won't work .The erroe message is
>>>>> > "[1]
>>>>> >
>>>>> > I did some search and found that the it's related to the urlhandler
>>>>> class.
>>>>> > I think whenever referring to the "file:xxx.jar" , the url fails to
>>>>> locate
>>>>> > the file .
>>>>>
>>>>> What build of Harmony are you testing? Is it a Milestone build? A
>>>>> recent fix may address this issue, but it hasn't made into a published
>>>>> build yet.
>>>>>
>>>>> > I think it's ours , not the felix's problem , so I report it here.
>>>>> >
>>>>> > You may try this by deleting the felix-cache directory in the working
>>>>> > directory and run
>>>>> > java -jar bin\felix.jar
>>>>> > with harmony's and sun's respectively .If you run sun's first and not
>>>>> > deleting the cache afterwards , no error .
>>>>> >
>>>>> >
>>>>> > [1]
>>>>> > java.net.MalformedURLException: java.lang.IllegalStateException: Stream
>>>>> > handler
>>>>> > unavailable due to: Stream handler unavailable due to: null"
>>>>> >
>>>>> >
>>>>> >
>>>>> > --
>>>>> > regards
>>>>> > Tian
>>>>> >
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> regards
>>>> Tian
>>>>
>>>
>>
>>
>>
>> --
>> Karl Pauls
>> karlpauls@gmail.com
>>
>



-- 
Karl Pauls
karlpauls@gmail.com

Re: About harmony running felix

Posted by Nathan Beyer <nb...@gmail.com>.
Try out the latest milestone that just release last week -
http://harmony.apache.org/download.cgi

5M10 should be pretty close to trunk right now.

-Nathan

On Sun, Jun 14, 2009 at 3:42 PM, Karl Pauls<ka...@gmail.com> wrote:
> Is it possible to download a build of the current trunk somewhere? I'd
> like to look into this issue...
>
> regards,
>
> Karl
>
> On Tue, Jun 9, 2009 at 5:30 AM, Nathan Beyer<nd...@apache.org> wrote:
>> That's somewhat old. I don't suppose you could to a fresh build from
>> HEAD and try again - at least a fresh build of the classlib. The
>> change I'm thinking of probably isn't in the build you're using.
>>
>> -Nathan
>>
>> On Mon, Jun 8, 2009 at 9:49 PM, galaxy<ti...@gmail.com> wrote:
>>> It's , harmony-jre-761593,
>>>
>>> 2009/6/9 Nathan Beyer <nd...@apache.org>
>>>
>>>> On Mon, Jun 8, 2009 at 12:46 AM, galaxy<ti...@gmail.com> wrote:
>>>> > Hi
>>>> > It's about running felix in harmony .When we run felix in harmony with
>>>> the
>>>> > felix-cache there , it's OK.
>>>> > But there will be errors when running without the felix-cache .That means
>>>> > after deleting felix-cache , harmony runtime fails to install
>>>> > the bundles set to be auto-installed .While with sun jdk ,it runs well
>>>> .That
>>>> > is to say harmony runtime is only able to find the cache dir which is
>>>> > specified by
>>>> > "felix.cache.rootdir" in the config.properties file (mine is
>>>> > "felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle which is the
>>>> > specified by "file:xxx.jar"
>>>> > Also the command  "install file:XXX.jar" won't work .The erroe message is
>>>> > "[1]
>>>> >
>>>> > I did some search and found that the it's related to the urlhandler
>>>> class.
>>>> > I think whenever referring to the "file:xxx.jar" , the url fails to
>>>> locate
>>>> > the file .
>>>>
>>>> What build of Harmony are you testing? Is it a Milestone build? A
>>>> recent fix may address this issue, but it hasn't made into a published
>>>> build yet.
>>>>
>>>> > I think it's ours , not the felix's problem , so I report it here.
>>>> >
>>>> > You may try this by deleting the felix-cache directory in the working
>>>> > directory and run
>>>> > java -jar bin\felix.jar
>>>> > with harmony's and sun's respectively .If you run sun's first and not
>>>> > deleting the cache afterwards , no error .
>>>> >
>>>> >
>>>> > [1]
>>>> > java.net.MalformedURLException: java.lang.IllegalStateException: Stream
>>>> > handler
>>>> > unavailable due to: Stream handler unavailable due to: null"
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > regards
>>>> > Tian
>>>> >
>>>>
>>>
>>>
>>>
>>> --
>>> regards
>>> Tian
>>>
>>
>
>
>
> --
> Karl Pauls
> karlpauls@gmail.com
>

Re: About harmony running felix

Posted by Karl Pauls <ka...@gmail.com>.
Is it possible to download a build of the current trunk somewhere? I'd
like to look into this issue...

regards,

Karl

On Tue, Jun 9, 2009 at 5:30 AM, Nathan Beyer<nd...@apache.org> wrote:
> That's somewhat old. I don't suppose you could to a fresh build from
> HEAD and try again - at least a fresh build of the classlib. The
> change I'm thinking of probably isn't in the build you're using.
>
> -Nathan
>
> On Mon, Jun 8, 2009 at 9:49 PM, galaxy<ti...@gmail.com> wrote:
>> It's , harmony-jre-761593,
>>
>> 2009/6/9 Nathan Beyer <nd...@apache.org>
>>
>>> On Mon, Jun 8, 2009 at 12:46 AM, galaxy<ti...@gmail.com> wrote:
>>> > Hi
>>> > It's about running felix in harmony .When we run felix in harmony with
>>> the
>>> > felix-cache there , it's OK.
>>> > But there will be errors when running without the felix-cache .That means
>>> > after deleting felix-cache , harmony runtime fails to install
>>> > the bundles set to be auto-installed .While with sun jdk ,it runs well
>>> .That
>>> > is to say harmony runtime is only able to find the cache dir which is
>>> > specified by
>>> > "felix.cache.rootdir" in the config.properties file (mine is
>>> > "felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle which is the
>>> > specified by "file:xxx.jar"
>>> > Also the command  "install file:XXX.jar" won't work .The erroe message is
>>> > "[1]
>>> >
>>> > I did some search and found that the it's related to the urlhandler
>>> class.
>>> > I think whenever referring to the "file:xxx.jar" , the url fails to
>>> locate
>>> > the file .
>>>
>>> What build of Harmony are you testing? Is it a Milestone build? A
>>> recent fix may address this issue, but it hasn't made into a published
>>> build yet.
>>>
>>> > I think it's ours , not the felix's problem , so I report it here.
>>> >
>>> > You may try this by deleting the felix-cache directory in the working
>>> > directory and run
>>> > java -jar bin\felix.jar
>>> > with harmony's and sun's respectively .If you run sun's first and not
>>> > deleting the cache afterwards , no error .
>>> >
>>> >
>>> > [1]
>>> > java.net.MalformedURLException: java.lang.IllegalStateException: Stream
>>> > handler
>>> > unavailable due to: Stream handler unavailable due to: null"
>>> >
>>> >
>>> >
>>> > --
>>> > regards
>>> > Tian
>>> >
>>>
>>
>>
>>
>> --
>> regards
>> Tian
>>
>



-- 
Karl Pauls
karlpauls@gmail.com

Re: About harmony running felix

Posted by Nathan Beyer <nd...@apache.org>.
That's somewhat old. I don't suppose you could to a fresh build from
HEAD and try again - at least a fresh build of the classlib. The
change I'm thinking of probably isn't in the build you're using.

-Nathan

On Mon, Jun 8, 2009 at 9:49 PM, galaxy<ti...@gmail.com> wrote:
> It's , harmony-jre-761593,
>
> 2009/6/9 Nathan Beyer <nd...@apache.org>
>
>> On Mon, Jun 8, 2009 at 12:46 AM, galaxy<ti...@gmail.com> wrote:
>> > Hi
>> > It's about running felix in harmony .When we run felix in harmony with
>> the
>> > felix-cache there , it's OK.
>> > But there will be errors when running without the felix-cache .That means
>> > after deleting felix-cache , harmony runtime fails to install
>> > the bundles set to be auto-installed .While with sun jdk ,it runs well
>> .That
>> > is to say harmony runtime is only able to find the cache dir which is
>> > specified by
>> > "felix.cache.rootdir" in the config.properties file (mine is
>> > "felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle which is the
>> > specified by "file:xxx.jar"
>> > Also the command  "install file:XXX.jar" won't work .The erroe message is
>> > "[1]
>> >
>> > I did some search and found that the it's related to the urlhandler
>> class.
>> > I think whenever referring to the "file:xxx.jar" , the url fails to
>> locate
>> > the file .
>>
>> What build of Harmony are you testing? Is it a Milestone build? A
>> recent fix may address this issue, but it hasn't made into a published
>> build yet.
>>
>> > I think it's ours , not the felix's problem , so I report it here.
>> >
>> > You may try this by deleting the felix-cache directory in the working
>> > directory and run
>> > java -jar bin\felix.jar
>> > with harmony's and sun's respectively .If you run sun's first and not
>> > deleting the cache afterwards , no error .
>> >
>> >
>> > [1]
>> > java.net.MalformedURLException: java.lang.IllegalStateException: Stream
>> > handler
>> > unavailable due to: Stream handler unavailable due to: null"
>> >
>> >
>> >
>> > --
>> > regards
>> > Tian
>> >
>>
>
>
>
> --
> regards
> Tian
>

Re: About harmony running felix

Posted by galaxy <ti...@gmail.com>.
It's , harmony-jre-761593,

2009/6/9 Nathan Beyer <nd...@apache.org>

> On Mon, Jun 8, 2009 at 12:46 AM, galaxy<ti...@gmail.com> wrote:
> > Hi
> > It's about running felix in harmony .When we run felix in harmony with
> the
> > felix-cache there , it's OK.
> > But there will be errors when running without the felix-cache .That means
> > after deleting felix-cache , harmony runtime fails to install
> > the bundles set to be auto-installed .While with sun jdk ,it runs well
> .That
> > is to say harmony runtime is only able to find the cache dir which is
> > specified by
> > "felix.cache.rootdir" in the config.properties file (mine is
> > "felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle which is the
> > specified by "file:xxx.jar"
> > Also the command  "install file:XXX.jar" won't work .The erroe message is
> > "[1]
> >
> > I did some search and found that the it's related to the urlhandler
> class.
> > I think whenever referring to the "file:xxx.jar" , the url fails to
> locate
> > the file .
>
> What build of Harmony are you testing? Is it a Milestone build? A
> recent fix may address this issue, but it hasn't made into a published
> build yet.
>
> > I think it's ours , not the felix's problem , so I report it here.
> >
> > You may try this by deleting the felix-cache directory in the working
> > directory and run
> > java -jar bin\felix.jar
> > with harmony's and sun's respectively .If you run sun's first and not
> > deleting the cache afterwards , no error .
> >
> >
> > [1]
> > java.net.MalformedURLException: java.lang.IllegalStateException: Stream
> > handler
> > unavailable due to: Stream handler unavailable due to: null"
> >
> >
> >
> > --
> > regards
> > Tian
> >
>



-- 
regards
Tian

Re: About harmony running felix

Posted by Nathan Beyer <nd...@apache.org>.
On Mon, Jun 8, 2009 at 12:46 AM, galaxy<ti...@gmail.com> wrote:
> Hi
> It's about running felix in harmony .When we run felix in harmony with the
> felix-cache there , it's OK.
> But there will be errors when running without the felix-cache .That means
> after deleting felix-cache , harmony runtime fails to install
> the bundles set to be auto-installed .While with sun jdk ,it runs well .That
> is to say harmony runtime is only able to find the cache dir which is
> specified by
> "felix.cache.rootdir" in the config.properties file (mine is
> "felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle which is the
> specified by "file:xxx.jar"
> Also the command  "install file:XXX.jar" won't work .The erroe message is
> "[1]
>
> I did some search and found that the it's related to the urlhandler class.
> I think whenever referring to the "file:xxx.jar" , the url fails to locate
> the file .

What build of Harmony are you testing? Is it a Milestone build? A
recent fix may address this issue, but it hasn't made into a published
build yet.

> I think it's ours , not the felix's problem , so I report it here.
>
> You may try this by deleting the felix-cache directory in the working
> directory and run
> java -jar bin\felix.jar
> with harmony's and sun's respectively .If you run sun's first and not
> deleting the cache afterwards , no error .
>
>
> [1]
> java.net.MalformedURLException: java.lang.IllegalStateException: Stream
> handler
> unavailable due to: Stream handler unavailable due to: null"
>
>
>
> --
> regards
> Tian
>

Re: About harmony running felix

Posted by "Jimmy,Jing Lv" <fi...@gmail.com>.
Hi Tian,

     Still suggest you write a small testcase to show what the problem is,
which will make it much easier to understand ( and easy to verify).

2009/6/9 galaxy <ti...@gmail.com>

> No, the formal url won't work too.In the debug , I found that the
> "file:xxx.jar" will be transformed into "xxx.jar"
> with a index variable to representing the location of the "." in
> "file:xxx.jar" string ,which
> should be 4 .But the index variable will increase with each step of
> execution ,very strange.,and result the wrong path ,


don't catch you here, how does index variable increase?


>
> BTW,  is it ok to just describe the error and the how the error occur
> without the test case in the JIRA?I mean it just happened when we type the
> command line or launch the felix with harmony by "java -jar felix.jar" ?


If you mean it may be a problem of the launcher, you can read the code in
trunk\modules\luni\src\main\native\launcher\shared\main.c , it parses the
argument there.


>
>
> 2009/6/8 Alex Blewitt <al...@gmail.com>
>
> > I'm not sure that relative file URLs have ever really been defined
> properly
> > - does file:///path/to/bundle.jar work?
> >
> > Sent from my (new) iPhone
> >
> >
> > On 8 Jun 2009, at 06:46, galaxy <ti...@gmail.com> wrote:
> >
> >  Hi
> >> It's about running felix in harmony .When we run felix in harmony with
> the
> >> felix-cache there , it's OK.
> >> But there will be errors when running without the felix-cache .That
> means
> >> after deleting felix-cache , harmony runtime fails to install
> >> the bundles set to be auto-installed .While with sun jdk ,it runs well
> >> .That
> >> is to say harmony runtime is only able to find the cache dir which is
> >> specified by
> >> "felix.cache.rootdir" in the config.properties file (mine is
> >> "felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle which is
> the
> >> specified by "file:xxx.jar"
> >> Also the command  "install file:XXX.jar" won't work .The erroe message
> is
> >> "[1]
> >>
> >> I did some search and found that the it's related to the urlhandler
> class.
> >> I think whenever referring to the "file:xxx.jar" , the url fails to
> locate
> >> the file .
> >> I think it's ours , not the felix's problem , so I report it here.
> >>
> >> You may try this by deleting the felix-cache directory in the working
> >> directory and run
> >> java -jar bin\felix.jar
> >> with harmony's and sun's respectively .If you run sun's first and not
> >> deleting the cache afterwards , no error .
> >>
> >>
> >> [1]
> >> java.net.MalformedURLException: java.lang.IllegalStateException: Stream
> >> handler
> >> unavailable due to: Stream handler unavailable due to: null"
> >>
> >>
> >>
> >> --
> >> regards
> >> Tian
> >>
> >
>
>
> --
> regards
> Tian
>



-- 

Best Regards!

Jimmy, Jing Lv
China Software Development Lab, IBM

Re: About harmony running felix

Posted by galaxy <ti...@gmail.com>.
No, the formal url won't work too.In the debug , I found that the
"file:xxx.jar" will be transformed into "xxx.jar"
with a index variable to representing the location of the "." in
"file:xxx.jar" string ,which
should be 4 .But the index variable will increase with each step of
execution ,very strange.,and result the wrong path ,
BTW,  is it ok to just describe the error and the how the error occur
without the test case in the JIRA?I mean it just happened when we type the
command line or launch the felix with harmony by "java -jar felix.jar" ?

2009/6/8 Alex Blewitt <al...@gmail.com>

> I'm not sure that relative file URLs have ever really been defined properly
> - does file:///path/to/bundle.jar work?
>
> Sent from my (new) iPhone
>
>
> On 8 Jun 2009, at 06:46, galaxy <ti...@gmail.com> wrote:
>
>  Hi
>> It's about running felix in harmony .When we run felix in harmony with the
>> felix-cache there , it's OK.
>> But there will be errors when running without the felix-cache .That means
>> after deleting felix-cache , harmony runtime fails to install
>> the bundles set to be auto-installed .While with sun jdk ,it runs well
>> .That
>> is to say harmony runtime is only able to find the cache dir which is
>> specified by
>> "felix.cache.rootdir" in the config.properties file (mine is
>> "felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle which is the
>> specified by "file:xxx.jar"
>> Also the command  "install file:XXX.jar" won't work .The erroe message is
>> "[1]
>>
>> I did some search and found that the it's related to the urlhandler class.
>> I think whenever referring to the "file:xxx.jar" , the url fails to locate
>> the file .
>> I think it's ours , not the felix's problem , so I report it here.
>>
>> You may try this by deleting the felix-cache directory in the working
>> directory and run
>> java -jar bin\felix.jar
>> with harmony's and sun's respectively .If you run sun's first and not
>> deleting the cache afterwards , no error .
>>
>>
>> [1]
>> java.net.MalformedURLException: java.lang.IllegalStateException: Stream
>> handler
>> unavailable due to: Stream handler unavailable due to: null"
>>
>>
>>
>> --
>> regards
>> Tian
>>
>


-- 
regards
Tian

Re: About harmony running felix

Posted by Alex Blewitt <al...@gmail.com>.
I'm not sure that relative file URLs have ever really been defined  
properly - does file:///path/to/bundle.jar work?

Sent from my (new) iPhone

On 8 Jun 2009, at 06:46, galaxy <ti...@gmail.com> wrote:

> Hi
> It's about running felix in harmony .When we run felix in harmony  
> with the
> felix-cache there , it's OK.
> But there will be errors when running without the felix-cache .That  
> means
> after deleting felix-cache , harmony runtime fails to install
> the bundles set to be auto-installed .While with sun jdk ,it runs  
> well .That
> is to say harmony runtime is only able to find the cache dir which is
> specified by
> "felix.cache.rootdir" in the config.properties file (mine is
> "felix.cache.rootdir=D:/JavaWorld/Felix") but not the bundle which  
> is the
> specified by "file:xxx.jar"
> Also the command  "install file:XXX.jar" won't work .The erroe  
> message is
> "[1]
>
> I did some search and found that the it's related to the urlhandler  
> class.
> I think whenever referring to the "file:xxx.jar" , the url fails to  
> locate
> the file .
> I think it's ours , not the felix's problem , so I report it here.
>
> You may try this by deleting the felix-cache directory in the working
> directory and run
> java -jar bin\felix.jar
> with harmony's and sun's respectively .If you run sun's first and not
> deleting the cache afterwards , no error .
>
>
> [1]
> java.net.MalformedURLException: java.lang.IllegalStateException:  
> Stream
> handler
> unavailable due to: Stream handler unavailable due to: null"
>
>
>
> -- 
> regards
> Tian