Re: AW: Connection between TOMCAT and DB2 ???
Hello Ralph Thanks for your suggestion. I tried putting runtime.jar, db2java.jar and sqlj.jar files in %JAVA_HOME%/jre/lib/ext directory. and also in %TOMCAT_HOME%/common/lib directory and restarted TOMCAT but it still couldn't find the driver when I try to run the compiled java file it says No suitable driver Any other suggestions... Nishant Awasthi Corporate Systems Development Progressive Insurance Ralph Einfeldt ralph.einfeldt@uptiTo: Tomcat Users List me-isc.de [EMAIL PROTECTED] cc: (bcc: Nishant Awasthi) 07/31/2002 10:45 AM Subject: AW: Connection between TOMCAT and Please respond to DB2 ??? Tomcat Users List The only place outside the tomcat directories where tomcat will find additional jars is ${JAVA_HOME}/jre/lib/ext. If you can't place the jar file there you have to copy or link the file to a tomcat lib directory. Ralph Einfeldt; Uptime Internet Solution Center GmbH Hamburg, Germany Hosting, Content Management, Java Consulting http://www.uptime-isc.de -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 31. Juli 2002 16:40 An: Tomcat Users List Betreff: RE: Connection between TOMCAT and DB2 ??? But I cannot make the same file run from outside the DB2 realm...that is when I place same java file in TOMCAT_HOME directory it doesnot find the driver... -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: AW: Connection between TOMCAT and DB2 ???
If the JAR files are in TOMCAT_HOME/common/lib, and you get the No Suitable Driver error, there is something wrong with your connection string, or with how you are connecting, as someone else suggested. I had the same exact problem with the SQL Server 2000 drivers (same error message) and after a couple of hours of trial and error realized that the connection string was wrong. By connection string I mean both the driverName and the driverURL. John Turner [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 10:53 AM To: Tomcat Users List Subject: Re: AW: Connection between TOMCAT and DB2 ??? Hello Ralph Thanks for your suggestion. I tried putting runtime.jar, db2java.jar and sqlj.jar files in %JAVA_HOME%/jre/lib/ext directory. and also in %TOMCAT_HOME%/common/lib directory and restarted TOMCAT but it still couldn't find the driver when I try to run the compiled java file it says No suitable driver Any other suggestions... Nishant Awasthi Corporate Systems Development Progressive Insurance Ralph Einfeldt ralph.einfeldt@uptiTo: Tomcat Users List me-isc.de [EMAIL PROTECTED] cc: (bcc: Nishant Awasthi) 07/31/2002 10:45 AM Subject: AW: Connection between TOMCAT and Please respond to DB2 ??? Tomcat Users List The only place outside the tomcat directories where tomcat will find additional jars is ${JAVA_HOME}/jre/lib/ext. If you can't place the jar file there you have to copy or link the file to a tomcat lib directory. Ralph Einfeldt; Uptime Internet Solution Center GmbH Hamburg, Germany Hosting, Content Management, Java Consulting http://www.uptime-isc.de -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 31. Juli 2002 16:40 An: Tomcat Users List Betreff: RE: Connection between TOMCAT and DB2 ??? But I cannot make the same file run from outside the DB2 realm...that is when I place same java file in TOMCAT_HOME directory it doesnot find the driver... -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: AW: Connection between TOMCAT and DB2 ???
Hello Ralph, I already have the suitable db2jdbc.dll file in my %SQLLIB%\lib directory It also have all the suitable .jar files in its place. What I think is getting qorng is the URL connection string.. String url = jdbc:db2:sample ; I also tried writing follwing in place of above setting: //jdbc:db2://n5533030:5/sample; But nothing works... Thanks for consistently helping me... Nishant Awasthi Corporate Systems Development Progressive Insurance Ralph Einfeldt ralph.einfeldt@uptiTo: Tomcat Users List me-isc.de [EMAIL PROTECTED] cc: (bcc: Nishant Awasthi) 07/31/2002 11:51 AM Subject: AW: Connection between TOMCAT and Please respond to DB2 ??? Tomcat Users List According to http://www-3.ibm.com/software/data/db2/java/v5/faq.html#q7 it's a native driver. The page also has a list how the libraries are called under wich os. Find this file and add the directory that contains this file to the (library) path. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 31. Juli 2002 17:42 An: Tomcat Users List Betreff: RE: Connection between TOMCAT and DB2 ??? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: AW: Connection between TOMCAT and DB2 ???
the dll needs to be part of the PATH environment variable (refer to that website below) so *prepend* %SQLLIB%\lib to PATH and see what happens. mike/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 11:05 AM To: Tomcat Users List Subject: Re: AW: Connection between TOMCAT and DB2 ??? Hello Ralph, I already have the suitable db2jdbc.dll file in my %SQLLIB%\lib directory It also have all the suitable .jar files in its place. What I think is getting qorng is the URL connection string.. String url = jdbc:db2:sample ; I also tried writing follwing in place of above setting: //jdbc:db2://n5533030:5/sample; But nothing works... Thanks for consistently helping me... Nishant Awasthi Corporate Systems Development Progressive Insurance Ralph Einfeldt ralph.einfeldt@uptiTo: Tomcat Users List me-isc.de [EMAIL PROTECTED] cc: (bcc: Nishant Awasthi) 07/31/2002 11:51 AM Subject: AW: Connection between TOMCAT and Please respond to DB2 ??? Tomcat Users List According to http://www-3.ibm.com/software/data/db2/java/v5/faq.html#q7 it's a native driver. The page also has a list how the libraries are called under wich os. Find this file and add the directory that contains this file to the (library) path. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 31. Juli 2002 17:42 An: Tomcat Users List Betreff: RE: Connection between TOMCAT and DB2 ??? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: AW: Connection between TOMCAT and DB2 (RESOLVED)
Hello all, I finally resolved the problem... Problem lied in the as everyone mentioned Connection URL Earlier I was using url = jdbc:db2:sample Then I changed it to follwing and everything worked fine... String url = jdbc:db2://xxx.xxx.xxx.xxx/SAMPLE; where xxx.xxx.xxx.xxx is the IP address of my machine. Three Important things: 1. Database name should be all in capital letters.( strange but yes) 2. If you notice I never specified any PORT NUMBER... (I don't know why it doenot need any port number...though ealier I was using 5 as listening port for DB2 instance DB2MPP but it didn't work) but without port number it worked... 3. Important thing is it need correct username and password while running the java file that is java Ndb2servlet1 db2admin db2pwd I was not doing that and now everything is in place... Thanks all of you for your help... Nishant Awasthi Corporate Systems Development Progressive Insurance Ralph Einfeldt ralph.einfeldt@uptiTo: Tomcat Users List me-isc.de [EMAIL PROTECTED] cc: (bcc: Nishant Awasthi) 07/31/2002 11:51 AM Subject: AW: Connection between TOMCAT and Please respond to DB2 ??? Tomcat Users List According to http://www-3.ibm.com/software/data/db2/java/v5/faq.html#q7 it's a native driver. The page also has a list how the libraries are called under wich os. Find this file and add the directory that contains this file to the (library) path. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 31. Juli 2002 17:42 An: Tomcat Users List Betreff: RE: Connection between TOMCAT and DB2 ??? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: AW: Connection between TOMCAT and DB2 (RESOLVED)
On Wed, Jul 31, 2002 at 01:26:07PM -0400, [EMAIL PROTECTED] wrote: Hello all, I finally resolved the problem... Problem lied in the as everyone mentioned Connection URL Earlier I was using url = jdbc:db2:sample Then I changed it to follwing and everything worked fine... String url = jdbc:db2://xxx.xxx.xxx.xxx/SAMPLE; where xxx.xxx.xxx.xxx is the IP address of my machine. Three Important things: 1. Database name should be all in capital letters.( strange but yes) 2. If you notice I never specified any PORT NUMBER... (I don't know why it doenot need any port number...though ealier I was using 5 as listening port for DB2 instance DB2MPP but it didn't work) but without port number it worked... It was strange to me too. Unlike other databases DB2 requires DB2 Client to be installed on machine running application server (here: tomcat); then you have to catalog the (possibly remote) database locally and you can connect to it using the name it was cataloged as. Richard. -- First they ignore you. Then they laugh at you. Then they fight you. Then you win. - Mohandas Gandhi. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: AW: Connection between TOMCAT and DB2 (RESOLVED)
Hello Richard.. Now I just tested the all lowercase (sample) and all uppercase (SAMPLE) name of database and it works or both the cases. It showed some strange behaviours..sometime back. AN hour ago I tried to compile using all lowercases and it didn't find the database. then I opted for all Uppercase DATABASE name and it worked... Hence I would Like to take one of my point back that Database name should be defined in Uppercase. (wrong either all upper or all lower) Thanks for invoking this point... Nishant Awasthi Corporate Systems Development Progressive Insurance Ryszard Lach [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] 07/31/2002 cc: (bcc: Nishant Awasthi) 02:49 PM Subject: Re: AW: Connection between TOMCAT Please and DB2 (RESOLVED) respond to Tomcat Users List On Wed, Jul 31, 2002 at 01:26:07PM -0400, [EMAIL PROTECTED] wrote: Hello all, I finally resolved the problem... Problem lied in the as everyone mentioned Connection URL Earlier I was using url = jdbc:db2:sample Then I changed it to follwing and everything worked fine... String url = jdbc:db2://xxx.xxx.xxx.xxx/SAMPLE; where xxx.xxx.xxx.xxx is the IP address of my machine. Three Important things: 1. Database name should be all in capital letters.( strange but yes) 2. If you notice I never specified any PORT NUMBER... (I don't know why it doenot need any port number...though ealier I was using 5 as listening port for DB2 instance DB2MPP but it didn't work) but without port number it worked... It was strange to me too. Unlike other databases DB2 requires DB2 Client to be installed on machine running application server (here: tomcat); then you have to catalog the (possibly remote) database locally and you can connect to it using the name it was cataloged as. Richard. -- First they ignore you. Then they laugh at you. Then they fight you. Then you win. - Mohandas Gandhi. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]