You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Jacques-Olivier Goussard <jo...@gmail.com> on 2009/04/20 21:16:21 UTC

Oracle datasource and MalformedURLException

Hi
I'm trying to deploy an Oracle datasource in Felix and I get the following
error when creating my first JDBC connection
:

java.net.MalformedURLException: invalid url:
reference:file:C:\Dev\views\viewA
\server\_output\_dist\deploy\component-datasource!/ (java.net.MalformedU
RLException: Unknown protocol: reference)
        at java.net.URL.<init>(URL.java:601)
        at
org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URL
HandlersStreamHandlerProxy.java:281)
        at java.net.URL.<init>(URL.java:596)
        at java.net.URL.<init>(URL.java:464)
        at java.net.URL.<init>(URL.java:413)
        at javax.crypto.SunJCE_c.b(DashoA13*..)
        at javax.crypto.SunJCE_c.a(DashoA13*..)
        at javax.crypto.SunJCE_c.a(DashoA13*..)
        at javax.crypto.SunJCE_b.a(DashoA13*..)
        at javax.crypto.SunJCE_h.a(DashoA13*..)
        at javax.crypto.SunJCE_h.a(DashoA13*..)
        at javax.crypto.Cipher.c(DashoA13*..)
        at javax.crypto.Cipher.b(DashoA13*..)
        at javax.crypto.Cipher.a(DashoA13*..)
        at javax.crypto.Cipher.init(DashoA13*..)
        at javax.crypto.Cipher.init(DashoA13*..)
        at oracle.security.o5logon.O5LoginClientHelper.decryptAES(Unknown
Source
)
        at
oracle.security.o5logon.O5LoginClientHelper.generateOAuthResponse(Unk
nown Source)
        at
oracle.jdbc.driver.T4CTTIoauthenticate.marshalOauth(T4CTTIoauthentica
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:367)
        at
oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:
508)
        at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203)
        at
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtensio
n.java:33)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
        at
oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSou
rce.java:275)
        at
oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java
:206)
        at
oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection
(OracleConnectionPoolDataSource.java:139)
        at
oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(O
racleConnectionPoolDataSource.java:88)
        at
oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(O
racleConnectionPoolDataSource.java:70)

I'm using oracle.jdbc.pool.OracleConnectionPoolDataSource to do pooling.
Anyone has an idea on what's going on ? My bundles are installed in felix
using the reference:file:// scheme.

           /jog

Re: Oracle datasource and MalformedURLException

Posted by Jacques-Olivier Goussard <jo...@gmail.com>.
Yes, it's actually working. I guess someone in the stacktrace handles nicely
the MalformedURLException.
So removing the printStacktrace() would be enough - in the long term, it
would be nice though to have a builtin
UrlHandler for 'reference:', as this protocol is a Felix standard (right?).
Unless the plans are to leave this protocol
as a second class citizen only defined for the install cmd.

       /jog


On Tue, Apr 21, 2009 at 5:50 AM, Karl Pauls <ka...@gmail.com> wrote:

> In case it is not working a quick workaround would be to register your
> own url handler for the reference: protocol...
>
> regards,
>
> Karl
>
> On Mon, Apr 20, 2009 at 10:30 PM, Karl Pauls <ka...@gmail.com> wrote:
> > Yeah, the printStacktrace is somewhat confusing. However, it might be
> > a real issue as we don't register a urlhandler for the reference:
> > protocol. Basically, the idea is that we don't create URLs (in OSGi
> > the location doesn't have to be a valid url). Looks like the security
> > provider is doing some testing which includes trying to create a url.
> >
> > Are you saying that it is working despite the confusing error message
> > (in this case all I'm going to do is to remove the printStacktrace)?
> >
> > regards,
> >
> > Karl
> >
> > On Mon, Apr 20, 2009 at 10:11 PM, Jacques-Olivier Goussard
> > <jo...@gmail.com> wrote:
> >> Just found out that the stacktrace is coming from Felix code
> >> (URLHandlersStreamHandlerProxy), which does a plain
> >> exception.printStacktrace().
> >> Looks as if the 'reference:' protocol scheme, which is a Felix builtin
> >> (right ?) is not handled properly here. What's funny is
> >> that this exception is raised only at startup time. Once I actually use
> my
> >> pool, the connections are properly created, as
> >> if the URL handler for 'reference' protocol was not found at startup but
> >> found after.
> >> Weird.
> >>          /jog
> >>
> >> On Mon, Apr 20, 2009 at 3:16 PM, Jacques-Olivier Goussard <
> >> jogoussard@gmail.com> wrote:
> >>
> >>> Hi
> >>> I'm trying to deploy an Oracle datasource in Felix and I get the
> following
> >>> error when creating my first JDBC connection
> >>> :
> >>>
> >>> java.net.MalformedURLException: invalid url:
> >>> reference:file:C:\Dev\views\viewA
> >>> \server\_output\_dist\deploy\component-datasource!/
> (java.net.MalformedU
> >>> RLException: Unknown protocol: reference)
> >>>         at java.net.URL.<init>(URL.java:601)
> >>>         at
> >>> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URL
> >>> HandlersStreamHandlerProxy.java:281)
> >>>         at java.net.URL.<init>(URL.java:596)
> >>>         at java.net.URL.<init>(URL.java:464)
> >>>         at java.net.URL.<init>(URL.java:413)
> >>>         at javax.crypto.SunJCE_c.b(DashoA13*..)
> >>>         at javax.crypto.SunJCE_c.a(DashoA13*..)
> >>>         at javax.crypto.SunJCE_c.a(DashoA13*..)
> >>>         at javax.crypto.SunJCE_b.a(DashoA13*..)
> >>>         at javax.crypto.SunJCE_h.a(DashoA13*..)
> >>>         at javax.crypto.SunJCE_h.a(DashoA13*..)
> >>>         at javax.crypto.Cipher.c(DashoA13*..)
> >>>         at javax.crypto.Cipher.b(DashoA13*..)
> >>>         at javax.crypto.Cipher.a(DashoA13*..)
> >>>         at javax.crypto.Cipher.init(DashoA13*..)
> >>>         at javax.crypto.Cipher.init(DashoA13*..)
> >>>         at
> oracle.security.o5logon.O5LoginClientHelper.decryptAES(Unknown
> >>> Source
> >>> )
> >>>         at
> >>> oracle.security.o5logon.O5LoginClientHelper.generateOAuthResponse(Unk
> >>> nown Source)
> >>>         at
> >>> oracle.jdbc.driver.T4CTTIoauthenticate.marshalOauth(T4CTTIoauthentica
> >>>         at
> oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:367)
> >>>         at
> >>> oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:
> >>> 508)
> >>>         at
> oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203)
> >>>         at
> >>> oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtensio
> >>> n.java:33)
> >>>         at
> oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
> >>>         at
> >>> oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSou
> >>> rce.java:275)
> >>>         at
> >>> oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java
> >>> :206)
> >>>         at
> >>> oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection
> >>> (OracleConnectionPoolDataSource.java:139)
> >>>         at
> >>> oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(O
> >>> racleConnectionPoolDataSource.java:88)
> >>>         at
> >>> oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(O
> >>> racleConnectionPoolDataSource.java:70)
> >>>
> >>> I'm using oracle.jdbc.pool.OracleConnectionPoolDataSource to do
> pooling.
> >>> Anyone has an idea on what's going on ? My bundles are installed in
> felix
> >>> using the reference:file:// scheme.
> >>>
> >>>            /jog
> >>>
> >>>
> >>
> >
> >
> >
> > --
> > Karl Pauls
> > karlpauls@gmail.com
> >
>
>
>
> --
> Karl Pauls
> karlpauls@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: Oracle datasource and MalformedURLException

Posted by Karl Pauls <ka...@gmail.com>.
In case it is not working a quick workaround would be to register your
own url handler for the reference: protocol...

regards,

Karl

On Mon, Apr 20, 2009 at 10:30 PM, Karl Pauls <ka...@gmail.com> wrote:
> Yeah, the printStacktrace is somewhat confusing. However, it might be
> a real issue as we don't register a urlhandler for the reference:
> protocol. Basically, the idea is that we don't create URLs (in OSGi
> the location doesn't have to be a valid url). Looks like the security
> provider is doing some testing which includes trying to create a url.
>
> Are you saying that it is working despite the confusing error message
> (in this case all I'm going to do is to remove the printStacktrace)?
>
> regards,
>
> Karl
>
> On Mon, Apr 20, 2009 at 10:11 PM, Jacques-Olivier Goussard
> <jo...@gmail.com> wrote:
>> Just found out that the stacktrace is coming from Felix code
>> (URLHandlersStreamHandlerProxy), which does a plain
>> exception.printStacktrace().
>> Looks as if the 'reference:' protocol scheme, which is a Felix builtin
>> (right ?) is not handled properly here. What's funny is
>> that this exception is raised only at startup time. Once I actually use my
>> pool, the connections are properly created, as
>> if the URL handler for 'reference' protocol was not found at startup but
>> found after.
>> Weird.
>>          /jog
>>
>> On Mon, Apr 20, 2009 at 3:16 PM, Jacques-Olivier Goussard <
>> jogoussard@gmail.com> wrote:
>>
>>> Hi
>>> I'm trying to deploy an Oracle datasource in Felix and I get the following
>>> error when creating my first JDBC connection
>>> :
>>>
>>> java.net.MalformedURLException: invalid url:
>>> reference:file:C:\Dev\views\viewA
>>> \server\_output\_dist\deploy\component-datasource!/ (java.net.MalformedU
>>> RLException: Unknown protocol: reference)
>>>         at java.net.URL.<init>(URL.java:601)
>>>         at
>>> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URL
>>> HandlersStreamHandlerProxy.java:281)
>>>         at java.net.URL.<init>(URL.java:596)
>>>         at java.net.URL.<init>(URL.java:464)
>>>         at java.net.URL.<init>(URL.java:413)
>>>         at javax.crypto.SunJCE_c.b(DashoA13*..)
>>>         at javax.crypto.SunJCE_c.a(DashoA13*..)
>>>         at javax.crypto.SunJCE_c.a(DashoA13*..)
>>>         at javax.crypto.SunJCE_b.a(DashoA13*..)
>>>         at javax.crypto.SunJCE_h.a(DashoA13*..)
>>>         at javax.crypto.SunJCE_h.a(DashoA13*..)
>>>         at javax.crypto.Cipher.c(DashoA13*..)
>>>         at javax.crypto.Cipher.b(DashoA13*..)
>>>         at javax.crypto.Cipher.a(DashoA13*..)
>>>         at javax.crypto.Cipher.init(DashoA13*..)
>>>         at javax.crypto.Cipher.init(DashoA13*..)
>>>         at oracle.security.o5logon.O5LoginClientHelper.decryptAES(Unknown
>>> Source
>>> )
>>>         at
>>> oracle.security.o5logon.O5LoginClientHelper.generateOAuthResponse(Unk
>>> nown Source)
>>>         at
>>> oracle.jdbc.driver.T4CTTIoauthenticate.marshalOauth(T4CTTIoauthentica
>>>         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:367)
>>>         at
>>> oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:
>>> 508)
>>>         at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203)
>>>         at
>>> oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtensio
>>> n.java:33)
>>>         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
>>>         at
>>> oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSou
>>> rce.java:275)
>>>         at
>>> oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java
>>> :206)
>>>         at
>>> oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection
>>> (OracleConnectionPoolDataSource.java:139)
>>>         at
>>> oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(O
>>> racleConnectionPoolDataSource.java:88)
>>>         at
>>> oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(O
>>> racleConnectionPoolDataSource.java:70)
>>>
>>> I'm using oracle.jdbc.pool.OracleConnectionPoolDataSource to do pooling.
>>> Anyone has an idea on what's going on ? My bundles are installed in felix
>>> using the reference:file:// scheme.
>>>
>>>            /jog
>>>
>>>
>>
>
>
>
> --
> Karl Pauls
> karlpauls@gmail.com
>



-- 
Karl Pauls
karlpauls@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Oracle datasource and MalformedURLException

Posted by Karl Pauls <ka...@gmail.com>.
Yeah, the printStacktrace is somewhat confusing. However, it might be
a real issue as we don't register a urlhandler for the reference:
protocol. Basically, the idea is that we don't create URLs (in OSGi
the location doesn't have to be a valid url). Looks like the security
provider is doing some testing which includes trying to create a url.

Are you saying that it is working despite the confusing error message
(in this case all I'm going to do is to remove the printStacktrace)?

regards,

Karl

On Mon, Apr 20, 2009 at 10:11 PM, Jacques-Olivier Goussard
<jo...@gmail.com> wrote:
> Just found out that the stacktrace is coming from Felix code
> (URLHandlersStreamHandlerProxy), which does a plain
> exception.printStacktrace().
> Looks as if the 'reference:' protocol scheme, which is a Felix builtin
> (right ?) is not handled properly here. What's funny is
> that this exception is raised only at startup time. Once I actually use my
> pool, the connections are properly created, as
> if the URL handler for 'reference' protocol was not found at startup but
> found after.
> Weird.
>          /jog
>
> On Mon, Apr 20, 2009 at 3:16 PM, Jacques-Olivier Goussard <
> jogoussard@gmail.com> wrote:
>
>> Hi
>> I'm trying to deploy an Oracle datasource in Felix and I get the following
>> error when creating my first JDBC connection
>> :
>>
>> java.net.MalformedURLException: invalid url:
>> reference:file:C:\Dev\views\viewA
>> \server\_output\_dist\deploy\component-datasource!/ (java.net.MalformedU
>> RLException: Unknown protocol: reference)
>>         at java.net.URL.<init>(URL.java:601)
>>         at
>> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URL
>> HandlersStreamHandlerProxy.java:281)
>>         at java.net.URL.<init>(URL.java:596)
>>         at java.net.URL.<init>(URL.java:464)
>>         at java.net.URL.<init>(URL.java:413)
>>         at javax.crypto.SunJCE_c.b(DashoA13*..)
>>         at javax.crypto.SunJCE_c.a(DashoA13*..)
>>         at javax.crypto.SunJCE_c.a(DashoA13*..)
>>         at javax.crypto.SunJCE_b.a(DashoA13*..)
>>         at javax.crypto.SunJCE_h.a(DashoA13*..)
>>         at javax.crypto.SunJCE_h.a(DashoA13*..)
>>         at javax.crypto.Cipher.c(DashoA13*..)
>>         at javax.crypto.Cipher.b(DashoA13*..)
>>         at javax.crypto.Cipher.a(DashoA13*..)
>>         at javax.crypto.Cipher.init(DashoA13*..)
>>         at javax.crypto.Cipher.init(DashoA13*..)
>>         at oracle.security.o5logon.O5LoginClientHelper.decryptAES(Unknown
>> Source
>> )
>>         at
>> oracle.security.o5logon.O5LoginClientHelper.generateOAuthResponse(Unk
>> nown Source)
>>         at
>> oracle.jdbc.driver.T4CTTIoauthenticate.marshalOauth(T4CTTIoauthentica
>>         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:367)
>>         at
>> oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:
>> 508)
>>         at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203)
>>         at
>> oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtensio
>> n.java:33)
>>         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
>>         at
>> oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSou
>> rce.java:275)
>>         at
>> oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java
>> :206)
>>         at
>> oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection
>> (OracleConnectionPoolDataSource.java:139)
>>         at
>> oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(O
>> racleConnectionPoolDataSource.java:88)
>>         at
>> oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(O
>> racleConnectionPoolDataSource.java:70)
>>
>> I'm using oracle.jdbc.pool.OracleConnectionPoolDataSource to do pooling.
>> Anyone has an idea on what's going on ? My bundles are installed in felix
>> using the reference:file:// scheme.
>>
>>            /jog
>>
>>
>



-- 
Karl Pauls
karlpauls@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Oracle datasource and MalformedURLException

Posted by Jacques-Olivier Goussard <jo...@gmail.com>.
Just found out that the stacktrace is coming from Felix code
(URLHandlersStreamHandlerProxy), which does a plain
exception.printStacktrace().
Looks as if the 'reference:' protocol scheme, which is a Felix builtin
(right ?) is not handled properly here. What's funny is
that this exception is raised only at startup time. Once I actually use my
pool, the connections are properly created, as
if the URL handler for 'reference' protocol was not found at startup but
found after.
Weird.
          /jog

On Mon, Apr 20, 2009 at 3:16 PM, Jacques-Olivier Goussard <
jogoussard@gmail.com> wrote:

> Hi
> I'm trying to deploy an Oracle datasource in Felix and I get the following
> error when creating my first JDBC connection
> :
>
> java.net.MalformedURLException: invalid url:
> reference:file:C:\Dev\views\viewA
> \server\_output\_dist\deploy\component-datasource!/ (java.net.MalformedU
> RLException: Unknown protocol: reference)
>         at java.net.URL.<init>(URL.java:601)
>         at
> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URL
> HandlersStreamHandlerProxy.java:281)
>         at java.net.URL.<init>(URL.java:596)
>         at java.net.URL.<init>(URL.java:464)
>         at java.net.URL.<init>(URL.java:413)
>         at javax.crypto.SunJCE_c.b(DashoA13*..)
>         at javax.crypto.SunJCE_c.a(DashoA13*..)
>         at javax.crypto.SunJCE_c.a(DashoA13*..)
>         at javax.crypto.SunJCE_b.a(DashoA13*..)
>         at javax.crypto.SunJCE_h.a(DashoA13*..)
>         at javax.crypto.SunJCE_h.a(DashoA13*..)
>         at javax.crypto.Cipher.c(DashoA13*..)
>         at javax.crypto.Cipher.b(DashoA13*..)
>         at javax.crypto.Cipher.a(DashoA13*..)
>         at javax.crypto.Cipher.init(DashoA13*..)
>         at javax.crypto.Cipher.init(DashoA13*..)
>         at oracle.security.o5logon.O5LoginClientHelper.decryptAES(Unknown
> Source
> )
>         at
> oracle.security.o5logon.O5LoginClientHelper.generateOAuthResponse(Unk
> nown Source)
>         at
> oracle.jdbc.driver.T4CTTIoauthenticate.marshalOauth(T4CTTIoauthentica
>         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:367)
>         at
> oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:
> 508)
>         at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203)
>         at
> oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtensio
> n.java:33)
>         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
>         at
> oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSou
> rce.java:275)
>         at
> oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java
> :206)
>         at
> oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection
> (OracleConnectionPoolDataSource.java:139)
>         at
> oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(O
> racleConnectionPoolDataSource.java:88)
>         at
> oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(O
> racleConnectionPoolDataSource.java:70)
>
> I'm using oracle.jdbc.pool.OracleConnectionPoolDataSource to do pooling.
> Anyone has an idea on what's going on ? My bundles are installed in felix
> using the reference:file:// scheme.
>
>            /jog
>
>