sdeshpan has asked for the wisdom of the Perl Monks concerning the following question:
All,
I have been trying to run a CGI script on the tomcat app server by enabling CGI support through the configuration files in tomcat (on windows xp). I have been able to set up this configuration successfully and a sample "hello world" program works ok.
However, now I am trying to run my actual code, which connects to a DB using DBI, but it fails and gives me the following error:
As per WW's suggestion, here is the "connect" code that I am using:
Cheers,
Sarang D.
I have been trying to run a CGI script on the tomcat app server by enabling CGI support through the configuration files in tomcat (on windows xp). I have been able to set up this configuration successfully and a sample "hello world" program works ok.
However, now I am trying to run my actual code, which connects to a DB using DBI, but it fails and gives me the following error:
Error ORA-12545: Connect failed because target host or object does not + exist (DBD ERROR: OCIServerAttach) connecting to DBI:Oracle:host=<ho +stname>;sid=<sid>;port=1521
As per WW's suggestion, here is the "connect" code that I am using:
I checked the TNSNAMES file and I am able to successfully ping and tnsping to the <hostname>. I wonder what might still be missing! Can anyone point me in the right direction?# DBI Initializations my $driver = 'Oracle'; my $hostname = 'host=oradev;sid=oradev;port=1521'; my $user = 'user'; my $password = 'password'; my $dsn = "DBI:$driver:$hostname"; my $dbh = DBI->connect($dsn,$user,$password) or croak "Error $DBI::err +str connecting to $dsn\n";
Cheers,
Sarang D.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Error running CGI on tomcat
by ww (Archbishop) on Sep 11, 2007 at 00:59 UTC | |
by sdeshpan (Initiate) on Sep 13, 2007 at 15:25 UTC | |
Re: Error running CGI on tomcat
by rdfield (Priest) on Sep 11, 2007 at 09:14 UTC | |
by sdeshpan (Initiate) on Sep 11, 2007 at 18:01 UTC | |
by rdfield (Priest) on Sep 12, 2007 at 10:19 UTC | |
by sdeshpan (Initiate) on Sep 12, 2007 at 19:10 UTC | |
by rdfield (Priest) on Sep 13, 2007 at 11:23 UTC | |
|
Back to
Seekers of Perl Wisdom