Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^3: Error running CGI on tomcat

by rdfield (Priest)
on Sep 12, 2007 at 10:19 UTC ( #638518=note: print w/replies, xml ) Need Help??

in reply to Re^2: Error running CGI on tomcat
in thread Error running CGI on tomcat

my $dsn = "DBI:$driver:oradev"; my $dbh = DBI->connect($dsn,$user,$password);
make any difference?

The code you currently have bypasses the tns alias, the code above uses the alias.


Replies are listed 'Best First'.
Re^4: Error running CGI on tomcat
by sdeshpan (Initiate) on Sep 12, 2007 at 19:10 UTC
    Hi, I tried this format of the connection string, but it now gives this error:

    Error ORA-12560: TNS:protocol adapter error (DBD ERROR: OCIServerAttach) connecting to DBI:Oracle:ORADEV

    Any ideas? I am banging my head, wondering what environment variables etc might be missing!!!
      There should be an error stack in your sqlnet.log file, the error above is a generic error, and more detailed infomation should be recorded in the log file.


        Can you please help me locate the sqlnet.log file? Is it the one under the deafult C:\Documents and Settings\<user> folder? Also, I just found out that the Oracle DB connectivity code works fine as a PL file from the command line using perl.exe. It is only through a CGI script (web) that it is failing. I am not sure, but may be the code cannot read ORACLE_HOME in the CGI, running on tomcat! Any ideas on how I can make the Windows Environment Variables visible to the CGI script?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://638518]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2021-03-01 09:18 GMT
Find Nodes?
    Voting Booth?

    No recent polls found