bizarre dbi/plclient return message
am 05.03.2007 05:31:59 von schulraHey all.
I recently inherited cool albeit fairly complex oracle installation and have
ran into a bizarre problem. I've been web searching, doc pouring, and poking
around in the dbi archives on cpan but cannot seem to find what may be going
on. I've even tried stepping through everything via the debugger but can't
seem to find anything amiss.
The specifics of the installation has a perl script front-end to DBI.pm that
is used to modify records in the db. Connection is make to the db via a
script listening on a high port that kicks off DBI::ProxyServer. Connection
to the proxy is made via:
$proxy = "dbi:Proxy:hostname=myhostname;port=9000";
$dbh = DBI->connect("$proxy;dsn=dbi:Oracle:$database", $dbuser, $dbpass)
|| die "Can't connect to $database: $DBI::errstr";
The problem shows up in Proxy.pm. When it tries to do the
my($client, $msg) = eval { DBD::Proxy::RPC::PlClient->new(%client_opts) };
I get the contructor bark, specifically:
DBI connect('hostname=myhostname;port=15xx[whatever is in
tnsnames];dsn=dbi:Oracle:mySID;username;...) failed: Constructor didn't return
a handle: Welcome!
As I understand the docs the proper strings are being sent in. I have also
verified that oracle is indeed sending back the "Welcome!" which of course is
not the construct needed for the DBI->connect. Poking around in the modules,
PlClient.pm gets back a "ARRAY(0x452174)". When I examine the array it indeed
contains the "Welcome!"
I'm running perl 5.8.7. I've upgraded all the perl bits. I wrote a test
script to ensure that I can connect to the db directly. The script just does
a simple:
my $dbhandle = DBI->connect("dbi:Oracle:$dataSource", $userName, $password)
or die "Can't connect to the Oracle Database: $DBI::errstr\n";
print "Content-type: text/plain\n\n";
print "Database connection successful.\n";
This appears to work correctly, returning an empty hash:
DB<1> x $dbhandle
0 DBI::db=HASH(0x39f14c)
empty hash
It's just when I bring the proxy bits into play that things go goofy.
Does anybody have any idea where to look next?
--
Rain puts a hole in stone because of its constancy, not its force.
- H. Joseph Gerber