Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

DB2 access from browser using JDBC

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My project needs to access DB2 using JDBC. It runs on different machine (Unix, Solaris) from DB2 (AIX). After unix administrator installed DB2 client software and modified the global profile (adding db2profile there), I can run a stand-alone program to access DB2. However, if I integrate the program into a web application and run it from browser, it can't load jdbc driver. Since our web server dose not have servlet engine, we need using a cgi batch file to wrap the env. varibles. I set all necessary env. varibles in the batch file. It seems web server can not communicate with DB2, or create a DB2 instance.
Please help me to fix the problem. Thanks.
Fred
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Fred Guo:
My project needs to access DB2 using JDBC. It runs on different machine (Unix, Solaris) from DB2 (AIX). After unix administrator installed DB2 client software and modified the global profile (adding db2profile there), I can run a stand-alone program to access DB2. However, if I integrate the program into a web application and run it from browser, it can't load jdbc driver. Since our web server dose not have servlet engine, we need using a cgi batch file to wrap the env. varibles. I set all necessary env. varibles in the batch file. It seems web server can not communicate with DB2, or create a DB2 instance.
Please help me to fix the problem. Thanks.
Fred


Fred,
I am trying to access DB2 UDB in AIX from a sstand-alone Java program in a Sun machine. But I get a SQL exception:
COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0616E Error opening socket. SQLSTATE=08S01.
Can you help me solve this ?
Thanks
Bala.
 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Have you tried using db2jstrt followed by the port number you specified in the JDBC Url.
Surya
 
Fred Guo
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What type jdbc driver is used? if you use net driver, you have to make sure the listener of the DB started, which port it listen to. If you use app driver, you need to install UDB client software on the machine that your program is running.
Fred
 
Bala Ramachandran
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Fred Guo:
What type jdbc driver is used? if you use net driver, you have to make sure the listener of the DB started, which port it listen to. If you use app driver, you need to install UDB client software on the machine that your program is running.
Fred


Hi,
I have tried both the 'app' driver as well as the 'net' driver.
When I use the 'app' driver, I get the message "No suitable driver found". I have installed the UDB client on the Sun machine (from where I am trying to run the Java program).
So I switched to the 'net' driver. I will have to check that the db2jstrt is running on the server in the port '6789'. In that case will my conenction URL also have '6789' as the port number instead of '50000' that I used for 'app' driver ?
Thanks
Bala.
 
Bala Ramachandran
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Fred Guo:
What type jdbc driver is used? if you use net driver, you have to make sure the listener of the DB started, which port it listen to. If you use app driver, you need to install UDB client software on the machine that your program is running.
Fred


Hi,
When I use the 'app' driver, I get the message "No suitable driver found". I have the UDB client installed on the client machine and have the db2java.zip in the classpath.
I downloaded the Sun Solaris version of the UDB client and installed it on the Sun machine.
What does this message mean ?
Thanks
Bala.
 
Hug your destiny! And hug this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic