On Tue, Sep 29, 2009 at 1:52 PM, Jason Stelzer <men...@neverlight.com>wrote:

> I never heard of the JDBC module before now, but having looked at the
> code, it makes a couple of naive assumptions.  Fortunately they're
> pretty easily fixed and not a big deal. To be clear, given how new
> JDBC is, it doesn't shock me that there are a couple minor bugs around
> some drivers.
>
> At its core, the problem is type casting. Oracle's drivers are....
> annoying to deal with here. The problem you're experiencing is due to
> the fact that you're getting back the wrong interface types from the
> driver. Without patching JDBC.pm you can get the script below to work
> like this:
>
>
Thanks for the info Jason.

It seems that this type of behavior creeps up once in a while in Java code:
a private (inner) class implements a public interface and Inline::Java tries
to use the base type instead of the interface type. Basically in the Perl
code there is no way of saying which return type it wants, so the 'cast'
method helps the user specify this.

Inline::Java could do better in this specific situation, nemaly by trying to
detect if the actual returned type is accessible or not. If I get a chance
I'll see if I can come up with something...

Patrick

-- 
=====================
Patrick LeBoutillier
Rosemère, Québec, Canada

Reply via email to