You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ni...@progressive.com on 2002/07/31 19:26:07 UTC

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 50000 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@upti        To:     "Tomcat Users List"                       
                    me-isc.de>                  <to...@jakarta.apache.org>                  
                                                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: Nishant_Awasthi@progressive.com
> [mailto:Nishant_Awasthi@progressive.com]
> Gesendet: Mittwoch, 31. Juli 2002 17:42
> An: Tomcat Users List
> Betreff: RE: Connection between TOMCAT and DB2 ???
>
>

--
To unsubscribe, e-mail:   <
mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <
mailto:tomcat-user-help@jakarta.apache.org>





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: AW: Connection between TOMCAT and DB2 (RESOLVED)

Posted by Ryszard Lach <rl...@id.pl>.
On Wed, Jul 31, 2002 at 01:26:07PM -0400, Nishant_Awasthi@progressive.com 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 50000 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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>