Hi , I got more information on this after some debug and I think it's the problem of my classlib of harmny,sorry for bothering here so long...It's no problem config it like felix.cache.dir=D:/JavaWorld/Felix/felix-cache felix.auto.start.1= \ file:D:/JavaWorld/Felix/bundle/org.apache.felix.shell-1.2.0.jar \ file:D:/JavaWorld/Felix/bundle/org.apache.felix.shell.tui-1.2.0.jar \ file:D:/JavaWorld/Felix/bundle/org.apache.felix.bundlerepository-1.4.0.jar felix.log.level=1
2009/6/3 Richard S. Hall <[email protected]> > Forwarding this to the mailing list to get more eyes on it... > > -> richard > > On 6/2/09 4:34 AM, galaxy wrote: > > Thanks, > > I run it with the new felix.jar and below is my procedure of running > > .Any idea of what's going on ? > > 1: I deleted the cache directory in \felix and \felix\bin (I have > > launch felix from both directories so two caches ) > > 2: launch it in eclipse using harmony classlib and the error message > > is [1] > > 3: after 2 , \felix\cache was created ,with only one bundle0 directory > > (should be more than one ) > > > > Then I debug it and make a conditional breakpoint when throw > > BundleException ,ended up with the error message [2],and the code is > > ..... > > if (isNew) > > { > > // First generate an identifier for it. > > id = getNextId(); > > > > try > > { > > // Add the bundle to the cache. > > m_cache.create(id, location, is);//id =3 ,location =" > > file:D:/JavaWorld/Felix/bundle/org.apache.felix.shell-1.2.0.jar" > > } > > catch (Exception ex) > > { > > throw new BundleException( > > "Unable to cache bundle: " + location, ex); > > } > > .................. > > configmap is [3] > > > > THEN , I run felix in the command line as below ,works well > > > > > D:\JavaWorld\Felix\bin>D:\Harmony_OSGi\apache-harmony-jre-r713673-windows-x86-32 > > -snapshot\harmony-jre-713673\bin\java.exe -jar felix.jar > > > > Welcome to Felix. > > ================= > > > > -> > > > > [1] > > > > Welcome to Felix. > > ================= > > > > Auto-properties install: org.osgi.framework.BundleException: Unable to > > cache bundle: > > file:/D:/JavaWorld/Felix/bundle/org.apache.felix.shell-1.2.0.jar - > > java.net.MalformedURLException: java.lang.IllegalStateException: > > Stream handler unavailable due to: Stream handler unavailable due to: > null > > Auto-properties install: org.osgi.framework.BundleException: Unable to > > cache bundle: > > file:/D:/JavaWorld/Felix/bundle/org.apache.felix.shell.tui-1.2.0.jar - > > java.net.MalformedURLException: java.lang.IllegalStateException: > > Stream handler unavailable due to: Stream handler unavailable due to: > null > > Auto-properties install: org.osgi.framework.BundleException: Unable to > > cache bundle: > > > file:/D:/JavaWorld/Felix/bundle/org.apache.felix.bundlerepository-1.4.0.jar > > - java.net.MalformedURLException: java.lang.IllegalStateException: > > Stream handler unavailable due to: Stream handler unavailable due to: > null > > Auto-properties start: org.osgi.framework.BundleException: Unable to > > cache bundle: > > file:/D:/JavaWorld/Felix/bundle/org.apache.felix.shell-1.2.0.jar - > > java.net.MalformedURLException: java.lang.IllegalStateException: > > Stream handler unavailable due to: Stream handler unavailable due to: > null > > Auto-properties start: org.osgi.framework.BundleException: Unable to > > cache bundle: > > file:/D:/JavaWorld/Felix/bundle/org.apache.felix.shell.tui-1.2.0.jar - > > java.net.MalformedURLException: java.lang.IllegalStateException: > > Stream handler unavailable due to: Stream handler unavailable due to: > null > > Auto-properties start: org.osgi.framework.BundleException: Unable to > > cache bundle: > > > file:/D:/JavaWorld/Felix/bundle/org.apache.felix.bundlerepository-1.4.0.jar > > - java.net.MalformedURLException: java.lang.IllegalStateException: > > Stream handler unavailable due to: Stream handler unavailable due to: > null > > > > [2] > > Welcome to Felix. > > ================= > > > > java.net.MalformedURLException: java.lang.IllegalStateException: > > Stream handler unavailable due to: Stream handler unavailable due to: > null > > at java.net.URL.<init>(URL.java:340) > > at java.net.URL.<init>(URL.java:155) > > at > > > org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:149) > > at > > org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:78) > > at > > org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:56) > > at > > > org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:986) > > at > > > org.apache.felix.framework.cache.BundleArchive.revise(BundleArchive.java:614) > > at > > > org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:140) > > at > > org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:158) > > at org.apache.felix.framework.Felix.installBundle(Felix.java:2072) > > at org.apache.felix.framework.Felix.installBundle(Felix.java:2032) > > at > > > org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130) > > at > > > org.apache.felix.main.AutoActivator.processAutoProperties(AutoActivator.java:121) > > at org.apache.felix.main.AutoActivator.start(AutoActivator.java:55) > > at > > > org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:589) > > at > > > org.apache.felix.framework.Felix$SystemBundleActivator.start(Felix.java:3928) > > at > > > org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:589) > > at org.apache.felix.framework.Felix.init(Felix.java:644) > > at org.apache.felix.framework.Felix.start(Felix.java:678) > > at org.apache.felix.main.Main.main(Main.java:213) > > java.net.MalformedURLException: java.lang.IllegalStateException: > > Stream handler unavailable due to: Stream handler unavailable due to: > null > > at java.net.URL.<init>(URL.java:340) > > at java.net.URL.<init>(URL.java:155) > > at > > > org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:149) > > at > > org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:78) > > at > > org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:56) > > at > > > org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:986) > > at > > > org.apache.felix.framework.cache.BundleArchive.revise(BundleArchive.java:614) > > at > > > org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:140) > > at > > org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:158) > > at org.apache.felix.framework.Felix.installBundle(Felix.java:2072) > > at org.apache.felix.framework.Felix.installBundle(Felix.java:2032) > > at > > > org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130) > > at > > > org.apache.felix.main.AutoActivator.processAutoProperties(AutoActivator.java:121) > > at org.apache.felix.main.AutoActivator.start(AutoActivator.java:55) > > at > > > org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:589) > > at > > > org.apache.felix.framework.Felix$SystemBundleActivator.start(Felix.java:3928) > > at > > > org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:589) > > at org.apache.felix.framework.Felix.init(Felix.java:644) > > at org.apache.felix.framework.Felix.start(Felix.java:678) > > at org.apache.felix.main.Main.main(Main.java:213) > > > > [3] > > > {felix.auto.start.1=file:D:/JavaWorld/Felix/bundle/org.apache.felix.shell-1.2.0.jar > > file:D:/JavaWorld/Felix/bundle/org.apache.felix.shell.tui-1.2.0.jar > > > file:D:/JavaWorld/Felix/bundle/org.apache.felix.bundlerepository-1.4.0.jar > > , felix.cache.dir=D:/JavaWorld/Felix/felix-cache, > > felix.config.properties=file:D:/JavaWorld/Felix/conf/config.properties, > felix.log.level=1, > > > felix.systembundle.activators=[org.apache.felix.main.autoactiva...@4a8557e > ], > > felix.version=1.9.0.SNAPSHOT, > > obr.repository.url=http://felix.apache.org/obr/releases.xml, > > org.osgi.framework.language=en, org.osgi.framework.os.name > > <http://org.osgi.framework.os.name>=windowsxp, > > org.osgi.framework.os.version=5.1, org.osgi.framework.processor=x86, > > org.osgi.framework.vendor=Apache Software Foundation, > > org.osgi.framework.version=1.3, org.osgi.service.http.port=8080, > > org.osgi.supports.bootclasspath.extension=false, > > org.osgi.supports.framework.extension=true, > > org.osgi.supports.framework.fragment=true, > > org.osgi.supports.framework.requirebundle=true, osgi.shell.telnet=on} > > > > 2009/6/1 Richard S. Hall <[email protected] > > <mailto:[email protected]>> > > > > No problem. Let me know if you learn anything. > > > > -> richard > > > > > > > > On 5/31/09 11:10 AM, galaxy wrote: > >> Thanks Richard! > >> > >> 2009/5/31 Richard S. Hall <[email protected] > >> <mailto:[email protected]>> > >> > >> Replace your existing felix.jar with the attached one. It > >> should give the causing exception if there is one. > >> > >> -> richard > >> > >> > >> On 5/31/09 3:04 AM, galaxy wrote: > >>> That will be excellent! > >>> Thanks Richard > >>> > >>> 2009/5/31 Richard S. Hall <[email protected] > >>> <mailto:[email protected]>> > >>> > >>> I could send you a snapshot of felix trunk that prints a > >>> better exception message if you want... > >>> > >>> -> richard > >>> > >>> > >>> On 5/30/09 10:20 AM, galaxy wrote: > >>>> I've solved the problem in a rather strange way :)Since I > could run felix in > >>>> the command line without the annoying information,I run it > >>>> first and then close it .After these done there will be > some "bundle*" > >>>> directories in felix-cache. At this stage I could > successfully launch felix > >>>> in eclipse .Very strange. > >>>> BTW, setting the file:///*** and the root directory is not > useful in my > >>>> machine,maybe there is something wrong with my > eclipse.Thanks anyway:) > >>>> > >>>> 2009/5/30 Nima Kaviani <[email protected]> <mailto: > [email protected]> > >>>> > >>>> > >>>>> Hi, > >>>>> > >>>>> I usually solve the problem by uncommenting > "felix.cache.rootdir" and > >>>>> pointing it to the root directory for felix, e.g., > "D:/java/.....". I keep > >>>>> "felix.auto.start.1" as is and it stops complaining. > >>>>> > >>>>> cheers, > >>>>> N. > >>>>> > >>>>> On Fri, May 29, 2009 at 7:44 PM, galaxy < > [email protected]> <mailto:[email protected]> wrote: > >>>>> > >>>>> > >>>>>> Sorry .A small error in the description .The config file > when running > >>>>>> > >>>>> felix > >>>>> > >>>>>> in command line is the same as below ,without the "///" > .But I have > >>>>>> > >>>>> already > >>>>> > >>>>>> tried running the felix in eclipse with the config file > same as below and > >>>>>> it > >>>>>> didn't work. > >>>>>> ..... > >>>>>> felix.auto.start.1= \ > >>>>>> > >>>>>> > >>>>>> > >>>>> > file:D:/Java/felix-1.8.0/felix-1.8.0/bundle/org.apache.felix.shell-1.2.0.jar > >>>>> > >>>>>> \ > >>>>>> > >>>>>> > >>>>>> > >>>>> > > file:D:/Java/felix-1.8.0/felix-1.8.0/bundle/org.apache.felix.shell.tui-1.2.0.jar > >>>>> > >>>>>> \ > >>>>>> > >>>>>> > >>>>>> > >>>>> > > file:D:/Java/felix-1.8.0/felix-1.8.0/bundle/org.apache.felix.bundlerepository-1.4.0.jar > >>>>> > >>>>>> felix.log.level=1 > >>>>>> ...... > >>>>>> org.osgi.service.http.port=8080 > >>>>>> osgi.shell.telnet=on > >>>>>> obr.repository.url= > http://felix.apache.org/obr/releases.xml > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> 2009/5/30 galaxy <[email protected]> <mailto: > [email protected]> > >>>>>> > >>>>>> > >>>>>>> Hi , I modified the config file as [1] but still got > the error message > >>>>>>> > >>>>>> [2].Seems > >>>>>> > >>>>>>> it's not about the url and when I run the felix in the > command line > >>>>>>> > >>>>> ,with > >>>>> > >>>>>>> the exact same config it was OK.Could any one know > what's going on > >>>>>>> > >>>>> here? > >>>>> > >>>>>>> [1] > >>>>>>> felix.auto.start.1= \ > >>>>>>> > >>>>>>> > >>>>> > > file:///D:/Java/eclipse/WorkSpace/Felix/bundle/org.apache.felix.shell-1.2.0.jar > >>>>> > >>>>>>> \ > >>>>>>> > >>>>>>> > >>>>> > > file:///D:/Java/eclipse/WorkSpace/Felix/bundle/org.apache.felix.shell.tui-1.2.0.jar > >>>>> > >>>>>>> \ > >>>>>>> > >>>>>>> > >>>>>>> > >>>>> > > file:///D:/Java/eclipse/WorkSpace/Felix/bundle/org.apache.felix.bundlerepository-1.4.0.jar > >>>>> > >>>>>>> [2] > >>>>>>> Welcome to Felix. > >>>>>>> ================= > >>>>>>> > >>>>>>> Auto-properties install: > org.osgi.framework.BundleException: Unable to > >>>>>>> cache bundle: > >>>>>>> > >>>>>>> > >>>>> > file:file:///D:/Java/eclipse/WorkSpace/Felix/bundle/org.apache.felix.shell-1.2.0.jar > >>>>> > >>>>>>> Auto-properties install: > org.osgi.framework.BundleException: Unable to > >>>>>>> cache bundle: > >>>>>>> > >>>>>>> > >>>>> > file:file:///D:/Java/eclipse/WorkSpace/Felix/bundle/org.apache.felix.shell.tui-1.2.0.jar > >>>>> > >>>>>>> Auto-properties install: > org.osgi.framework.BundleException: Unable to > >>>>>>> cache bundle: > >>>>>>> > >>>>>>> > >>>>> > file:file:///D:/Java/eclipse/WorkSpace/Felix/bundle/org.apache.felix.bundlerepository-1.4.0.jar > >>>>> > >>>>>>> Auto-properties start: > org.osgi.framework.BundleException: Unable to > >>>>>>> > >>>>>> cache > >>>>>> > >>>>>>> bundle: > >>>>>>> > >>>>>>> > >>>>> > file:file:///D:/Java/eclipse/WorkSpace/Felix/bundle/org.apache.felix.shell-1.2.0.jar > >>>>> > >>>>>>> Auto-properties start: > org.osgi.framework.BundleException: Unable to > >>>>>>> > >>>>>> cache > >>>>>> > >>>>>>> bundle: > >>>>>>> > >>>>>>> > >>>>> > file:file:///D:/Java/eclipse/WorkSpace/Felix/bundle/org.apache.felix.shell.tui-1.2.0.jar > >>>>> > >>>>>>> Auto-properties start: > org.osgi.framework.BundleException: Unable to > >>>>>>> > >>>>>> cache > >>>>>> > >>>>>>> bundle: > >>>>>>> > >>>>>>> > >>>>> > file:file:///D:/Java/eclipse/WorkSpace/Felix/bundle/org.apache.felix.bundlerepository-1.4.0.jar > >>>>> > >>>>>>> 2009/5/29 Richard S. Hall <[email protected]> > <mailto:[email protected]> > >>>>>>> > >>>>>>> BTW, I just committed a patch to improve the error > message in this > >>>>>>> > >>>>>>>> situation, so in the next Felix release such errors > should hopefully > >>>>>>>> > >>>>> be > >>>>> > >>>>>> more > >>>>>> > >>>>>>>> obvious. > >>>>>>>> > >>>>>>>> -> richard > >>>>>>>> > >>>>>>>> > >>>>>>>> On 5/29/09 7:17 AM, galaxy wrote: > >>>>>>>> > >>>>>>>> > >>>>>>>>> Thanks! > >>>>>>>>> > >>>>>>>>> 2009/5/29 Stuart McCulloch<[email protected]> > <mailto:[email protected]> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> 2009/5/29 galaxy<[email protected]> <mailto: > [email protected]> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>>> Hi all, > >>>>>>>>>>> Here is my problem :Every time I tried to run > >>>>>>>>>>> org.apache.felix.main.Main > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>> in > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>>> eclipse there would be the error [1]. > >>>>>>>>>>> I searched the problem and found it was related to > the url .But my > >>>>>>>>>>> bundle > >>>>>>>>>>> url is [2].So can you help me on this problem ?The > felix version is > >>>>>>>>>>> 1.8. > >>>>>>>>>>> And I installed felix in eclipse according to > >>>>>>>>>>> > http://felix.apache.org/site/integrating-felix-with-eclipse.html > >>>>>>>>>>> Thanks! > >>>>>>>>>>> > >>>>>>>>>>> [1] > >>>>>>>>>>> Welcome to Felix. > >>>>>>>>>>> ================= > >>>>>>>>>>> > >>>>>>>>>>> Auto-properties install: > org.osgi.framework.BundleException: Unable > >>>>>>>>>>> > >>>>>> to > >>>>>> > >>>>>>>>>>> cache > >>>>>>>>>>> bundle: > >>>>>>>>>>> > >>>>>> > file:D:/JavaWorld/Felix/bundle/org.apache.felix.shell-1.2.0.jar > >>>>>> > >>>>>>>>>>> Auto-properties install: > org.osgi.framework.BundleException: Unable > >>>>>>>>>>> > >>>>>> to > >>>>>> > >>>>>>>>>>> cache > >>>>>>>>>>> bundle: > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>> > file:D:/JavaWorld/Felix/bundle/org.apache.felix.shell.tui-1.2.0.jar > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>>> Auto-properties install: > org.osgi.framework.BundleException: Unable > >>>>>>>>>>> > >>>>>> to > >>>>>> > >>>>>>>>>>> cache > >>>>>>>>>>> bundle: > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>> > >>>>> > file:D:/JavaWorld/Felix/bundle/org.apache.felix.bundlerepository-1.4.0.jar > >>>>> > >>>>>>>>>> > >>>>>>>>>>> Auto-properties start: > org.osgi.framework.BundleException: Unable > >>>>>>>>>>> > >>>>> to > >>>>> > >>>>>>>>>>> > >>>>>>>>>> cache > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>>> bundle: > >>>>>>>>>>> > >>>>>> > file:D:/JavaWorld/Felix/bundle/org.apache.felix.shell-1.2.0.jar > >>>>>> > >>>>>>>>>>> Auto-properties start: > org.osgi.framework.BundleException: Unable > >>>>>>>>>>> > >>>>> to > >>>>> > >>>>>>>>>>> > >>>>>>>>>> cache > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>>> bundle: > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>> > file:D:/JavaWorld/Felix/bundle/org.apache.felix.shell.tui-1.2.0.jar > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>>> Auto-properties start: > org.osgi.framework.BundleException: Unable > >>>>>>>>>>> > >>>>> to > >>>>> > >>>>>>>>>>> > >>>>>>>>>> cache > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>>> bundle: > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>> > >>>>> > file:D:/JavaWorld/Felix/bundle/org.apache.felix.bundlerepository-1.4.0.jar > >>>>> > >>>>>>>>>> > >>>>>>>>>>> [2] > >>>>>>>>>>> felix.auto.start.1= \ > >>>>>>>>>>> > file:D:/JavaWorld/Felix/bundle/org.apache.felix.shell-1.2.0.jar \ > >>>>>>>>>>> > >>>>>>>>>>> > >>>>> > file:D:/JavaWorld/Felix/bundle/org.apache.felix.shell.tui-1.2.0.jar > >>>>> > >>>>>> \ > >>>>>> > >>>>>>>>>>> > >>>>>>>>>> > >>>>> > file:D:/JavaWorld/Felix/bundle/org.apache.felix.bundlerepository-1.4.0.jar > >>>>> > >>>>>>>>>> those are not valid URLs, they should be > file:///D:/.... > >>>>>>>>>> > >>>>>>>>>> see this blog entry for background: > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>> > http://blogs.msdn.com/ie/archive/2006/12/06/file-uris-in-windows.aspx > >>>>>> > >>>>>>>>>> HTH > >>>>>>>>>> > >>>>>>>>>> -- > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>>> regards > >>>>>>>>>>> Tian > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>> -- > >>>>>>>>>> Cheers, Stuart > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>> > >>>>>>> -- > >>>>>>> regards > >>>>>>> Tian > >>>>>>> > >>>>>>> > >>>>>> -- > >>>>>> regards > >>>>>> Tian > >>>>>> > >>>>>> > >>>>> -- > >>>>> http://nima.magic.ubc.ca > >>>>> > >>>>> > >>>> > >>> > >>> > >>> > >>> > >>> -- > >>> regards > >>> Tian > >> > >> > >> > >> > >> -- > >> regards > >> Tian > > > > > > > > > > -- > > regards > > Tian > -- regards Tian
