Re: Issue with java.net.URL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rehi, 

Thanks for your quick answer about this issue. I found it out.

In fact, Felix searchs for built-in protocol stream handlers according
to a particular packaging naming strategy of SUN JRE :
sun.net.www.protocol.<protocol>.Handler. For solving it, I have changed
the static variable DEFAULT_STREAM_HANDLER_PACKAGE in Felix's
URLHandlers.java file to "gnu.java.net.protocol" instead of
"sun.net.www.protocol"

Once more time, thanks to all.

NT



Le mercredi 08 novembre 2006 à 08:58 -0800, David Daney a écrit :
> Thanh NGUYEN wrote:
> > Hi all, 
> > 
> > I'm trying to use Felix with JamVM and GNU Classpath 0.91. I have built
> > all with succes. But when I tried to launch Felix, I got some errors
> > like :
> > 
> > ERROR: Error starting
> > file:bundle/org.apache.felix.bundlerepository-0.8.0-SNAPSHOT.jar
> > (org.osgi.framework.BundleException: Activator start error.)
> > java.lang.IllegalStateException: Unknown protocol: http
> >    at
> > org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:135)
> >    at java.net.URL.<init>(URL.java:480)
> >    at java.net.URL.<init>(URL.java:325)
> >    at
> > org.apache.felix.bundlerepository.RepositoryAdminImpl.<init>(RepositoryAdminImpl.java:73)
> >    at
> > org.apache.felix.bundlerepository.Activator.start(Activator.java:35)
> >    at
> > org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:509)
> >    at org.apache.felix.framework.Felix._startBundle(Felix.java:1260)
> >    at org.apache.felix.framework.Felix.startBundle(Felix.java:1201)
> >    at
> > org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:807)
> >    at
> > org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:256)
> >    at java.lang.Thread.run(Thread.java:710)
> > 
> > It seems that the java.net.URL constructor does not support the http
> > protocol. 
> > 
> > Does anybody get the same issue or have any idea about it please ?
> > 
> 
> It looks like your program is installing its own handler.  I suspect the 
> problem is near the code in the first level of the stack trace 
> (URLHandlersStreamHandlerProxy.java:135).
> 
> That is not to say that there are not problems with java.net.URL, but I 
> have used the built-in http protocol handlers with no problems.
> 
> David Daney




[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux