You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Vidar Ramdal <vi...@idium.no> on 2008/07/07 13:16:48 UTC
Unknown protocol: bundle
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 <vi...@idium.no> - http://www.idium.no
Akersgata 16, N-0158 Oslo, Norway
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Unknown protocol: bundle
Posted by Carsten Ziegeler <cz...@apache.org>.
Felix Meschberger wrote:
>
> AFAK URLHandler service implementation has been fixed in the meantime
> and we should be able to switch on URLHandler support again in Sling.
We turned this already on in trunk :)
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Unknown protocol: bundle
Posted by Felix Meschberger <fm...@gmail.com>.
Hi,
FYI
Carsten Ziegeler schrieb:
> Karl Pauls wrote:
>> Yes there is (however there are a few corner cases I'm working on atm
>> where it isn't). URLHandlers should be enabled by default - could you
>> post your conf/config.properties and describe your setting a bit more?
>> Alternatively, make sure that felix.service.urlhandlers is not set to
>> false in your config.
>>
> We turn of the urlhandlers by default in Sling - you can enable them
> in the sling.properties file.
Yes, because the URLHandler service used to not be fully functional in
Felix at the time we started with Sling. Therefore we switched it off --
with a big note in the sling.properties file.
AFAK URLHandler service implementation has been fixed in the meantime
and we should be able to switch on URLHandler support again in Sling.
But right, this belongs to the Sling list ;-)
Regards
Felix
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Unknown protocol: bundle
Posted by Vidar Ramdal <vi...@idium.no>.
> Karl Pauls wrote:
>>
>> Yes there is (however there are a few corner cases I'm working on atm
>> where it isn't). URLHandlers should be enabled by default - could you
>> post your conf/config.properties and describe your setting a bit more?
>> Alternatively, make sure that felix.service.urlhandlers is not set to
>> false in your config.
2008/7/7 Carsten Ziegeler <cz...@apache.org>:
> We turn of the urlhandlers by default in Sling - you can enable them
> in the sling.properties file.
Thanks for the tip, Karl & Carsten. Since it is a Sling specific
issue, I'm continuing the discussion on
slilng-dev@incubator.apache.org:
http://markmail.org/message/wlodpavemrjoat6i
--
Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
Akersgata 16, N-0158 Oslo, Norway
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Unknown protocol: bundle
Posted by Carsten Ziegeler <cz...@apache.org>.
Vidar Ramdal wrote:
> Continuing the discussion from users@felix.apache.org:
> http://markmail.org/message/c7ktqlx3erualv2p
>
>>> Vidar S. Ramdal wrote:
>>>> [...]
>>>> Is there a way to register a URL handler for bundle?
>
>> Karl Pauls wrote:
>>> Yes there is (however there are a few corner cases I'm working on atm
>>> where it isn't). URLHandlers should be enabled by default - could you
>>> post your conf/config.properties and describe your setting a bit more?
>>> Alternatively, make sure that felix.service.urlhandlers is not set to
>>> false in your config.
>
> 2008/7/7 Carsten Ziegeler <cz...@apache.org>:
>> We turn of the urlhandlers by default in Sling - you can enable them
>> in the sling.properties file.
>
> OK, is that safe? I guess there's a reason for disabling URL handlers
> in Sling, so are there any side effects by enabling them?
>
The reason for disabling was https://issues.apache.org/jira/browse/FELIX-38
which is fixed in the 1.0.4 release of the felix framework. So I guess
this is safe now. I'll change the default of this property and we'll see
if this creates problems.
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
Re: Unknown protocol: bundle
Posted by Vidar Ramdal <vi...@idium.no>.
Continuing the discussion from users@felix.apache.org:
http://markmail.org/message/c7ktqlx3erualv2p
>> Vidar S. Ramdal wrote:
>>> [...]
>>> Is there a way to register a URL handler for bundle?
>Karl Pauls wrote:
>> Yes there is (however there are a few corner cases I'm working on atm
>> where it isn't). URLHandlers should be enabled by default - could you
>> post your conf/config.properties and describe your setting a bit more?
>> Alternatively, make sure that felix.service.urlhandlers is not set to
>> false in your config.
2008/7/7 Carsten Ziegeler <cz...@apache.org>:
> We turn of the urlhandlers by default in Sling - you can enable them
> in the sling.properties file.
OK, is that safe? I guess there's a reason for disabling URL handlers
in Sling, so are there any side effects by enabling them?
--
Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
Akersgata 16, N-0158 Oslo, Norway
Re: Unknown protocol: bundle
Posted by Carsten Ziegeler <cz...@apache.org>.
Karl Pauls wrote:
> Yes there is (however there are a few corner cases I'm working on atm
> where it isn't). URLHandlers should be enabled by default - could you
> post your conf/config.properties and describe your setting a bit more?
> Alternatively, make sure that felix.service.urlhandlers is not set to
> false in your config.
>
We turn of the urlhandlers by default in Sling - you can enable them
in the sling.properties file.
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Unknown protocol: bundle
Posted by Karl Pauls <ka...@gmail.com>.
Yes there is (however there are a few corner cases I'm working on atm
where it isn't). URLHandlers should be enabled by default - could you
post your conf/config.properties and describe your setting a bit more?
Alternatively, make sure that felix.service.urlhandlers is not set to
false in your config.
regards,
Karl
On Mon, Jul 7, 2008 at 1:16 PM, Vidar Ramdal <vi...@idium.no> wrote:
> 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 <vi...@idium.no> - http://www.idium.no
> Akersgata 16, N-0158 Oslo, Norway
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
--
Karl Pauls
karlpauls@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org