CATEGORIES
Acer
AMD
Apache
Apple
ASP
Business Object
Compaq
Crystal Reports
CSS
Database
Dell
DOT NET
Fujitsu
Gateway
Google
HP
HTML
IBM
IIS
Intel
Java
Mainframe
Microsoft
Networking
Oracle
SAP
SEO
Sony
SQL Server
Testing
Tomcat
Toshiba
Ubuntu
Visual Basic
Web Hosting
Windows
Installing JDBC Driver for DB2 and Tomcat
How to Install JDBC Driver for DB2
Published by: San (9/11/2007)
DB2 is a database developed by IBM and it provides DB2 Express-C for free. It can be downloaded from the IBM site and it also installs the jdbc driver while installing the package. If you don’t have DB2 running on your machine or trying to run some java apps over tomcat then you might need a JDBC Driver to connect DB2 and run your applications on Tomcat. Follow the under given steps to install the JDBC driver for DB2 and it should be get going after that.
The files to download are db2jcc.jar and db2jcc_license_cu.jar in order to make your apps talk to DB2 database – there are multiple ways to download it from the IBM web site. The easiest way to reach these files and download it to your server is downloading the jdbc driver for all Operating Systems.
Once you have these files then put that in your local lib folder under your app root folder -- I mean you have a lib folder under WEB-INF folder so put these two files in it. If you are running tomcat on windows then it’s all set but if you are running the tomcat on UNIX, Linux or Ubuntu then set a classpath to it. The command to run on command prompt is CLASSPATH = /appRoot/WEB-INF/lib or add this line to your .bashrc file. The way to reach this file is to go root and try this command – vi .bashrc, this file opens up in vi editor. If you have another text editor then try to open this file using that application so that it becomes easier for you to edit it. You can try with this class Class.forName("COM.ibm.db2.jcc.DB2Driver"); instead of Class.forName("COM.ibm.db2.jdbc.app.DB2Driver"); because it works for me. If you get this “COM.ibm.db2.jdbc.app.DB2Driver” to work then please post your comment on it.
Most Popular Articles
- Installing JDBC Driver for DB2 and Tomcat
- Ubuntu Sound Problem
- Is Ubuntu Better Than Vista
- Ubuntu USB Problem
- Ubuntu Flash Problem
Is Ubuntu Better Than Vista >>
<< Tips on Fixing Ubuntu Flash Problems
COMMENT