Hello all;

I've just started using Felix (being introduced via Apache Sling), and
I've run into a class loader problem. I'm writing a bundle which
should use Sun XSOM for some XML schema parsing. At some point, XSOM
tries to load a file by using Class.getResource():

new 
InputSource(ParserContext.class.getResource("datatypes.xsd").toExternalForm())

toExternalForm() returns a URL starting with bundle://, and when that
URL is passed to InputSource's constructor, it causes a
MalformedURLException because the bundle: protocol is not recognized:

java.net.MalformedURLException: unknown protocol: bundle
        at java.net.URL.<init>(URL.java:574)
        at java.net.URL.<init>(URL.java:464)
        at java.net.URL.<init>(URL.java:413)
        at 
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:968)
...

Is there a way to register a URL handler for bundle? And if so, how
should that handler be implemented?


-- 
Vidar S. Ramdal <[EMAIL PROTECTED]> - http://www.idium.no
Akersgata 16, N-0158 Oslo, Norway

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to