tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Mestiashvili <>
Subject Re: Running CGI (Perl) => Can't load module DBI
Date Tue, 08 Jul 2008 15:46:30 GMT
Joris Kimpe wrote:
> Hi all,
> don't know if this is the correct place, but here it goes...
> I've created a cgi script (perl) which need to run in Tomcat 5.5.  But when
> I try to connect to our database, the error I get is:
> install_driver(DB2) failed: Can't load
> 'w:/win32/install/core/CO_PERL/site/lib/auto/DBD/DB2/DB2.dll' for module
> DBD::DB2: load_file:The specified module could not be found at
> w:/win32/install/core/CO_PERL/lib/ line 230.
>  at (eval 3) line 3
> Compilation failed in require at (eval 3) line 3.
> Perhaps a required shared library or dll isn't installed where expected
>  at W:\win32\install\core\CO_TOMCAT\webapps\xtremis\WEB-INF\cgi\
> line 283
> If I check for the dll, I see that is present in this directory...
> If I copy some dll's from C:\Program Files\IBM\SQLLIB\BIN to the same
> directory, it works fine...  But I don't think this is the way to do it.
> My question now is, how can I set a custom environment variable which I can
> use in my perl script (while running in Tomcat).
> Thanks!
Hi ,
I am not sure that it will help , but

for environment variables you can use %ENV  hash

and if you want to define some places with perl modules , you can  use
@INC array

here is an example

foreach my $val (keys (%ENV) ) {
        print $ENV{$val};

push (@INC,'/usr/lib/my_modules');

foreach my $val(@INC) {
        print "$val\n";

DCOPRef(konsole-3234,session-6)/local/adm/.Xauthority\h:\w\$ local| 


or another example  (best) which i've found here


use lib "/home/george/modules";

print "\@INC is @INC\n";

@INC is /home/george/modules /etc/perl /usr/local/lib/perl/5.10.0 
/usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 
/usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message