GeeCON Prague 2014*
The moose likes JDBC and the fly likes JDBC connectivity in WSAD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC connectivity in WSAD" Watch "JDBC connectivity in WSAD" New topic
Author

JDBC connectivity in WSAD

trivikram Kumar
Ranch Hand

Joined: Feb 21, 2005
Posts: 172
I am trying to connect to the database using the sun:jdbc dbc river.
Its giving the Class Not Found Exception error.
I also tried setting the DataSource under server.
I do not find this particular driver there.
Do I need to set it somewhere else???
Could not get the solution.
I am trying to access the database from a servlet.

Thanks,


Javainn<br /> <br />SCJP,SCWCD,SCBCD,<br />ICED (IBM-287,IBM-484,IBM-486)
IBM certified in DB2 V 8.1 Family Fundamentals (IBM 700)
Alex Prawira
Greenhorn

Joined: Mar 05, 2005
Posts: 16
Would you show us the code ?

Thanks
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

By default WSAD uses the IBM JDK, which does not include the optional Sun classes like the JDBC-ODBC bridge. You can either find another driver or configure it to use the Sun JDK.

Dave
trivikram Kumar
Ranch Hand

Joined: Feb 21, 2005
Posts: 172
Thanks for your response.
Yeah..I would post the code.
Could you please tell me how to configure WSAD to use SUN JDK?
In WSAD its working if I write the code in a standalone application and run it as a java application.

Thanks in advance..
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Could you please tell me how to configure WSAD to use SUN JDK?
I no longer use WSAD, but I can tell you how to do it in Eclipse and hopefully it will be similar.

On the Menu, Select Run > Run...
In the window that pops up, select the run target on the left, then the JRE tab on the right. Select 'Alternate JRE'. I'm asusming you have not already added an alternate JRE. If you have, it will be available in the drop-down.

To add a new JRE, select 'Installed JREs', then 'Add'.
Fill in the details for the new JRE. Call it something like SUN 1.4.2 or similar. When you get back to the drop down, select the one you added. If you hit 'Run' on that window the app should now be run using the Sun JDK.

Dave
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30598
    
154

WSAD allows you to substitute the JRE for a program running with a main method. It does not allow you to substitute the JRE running on the server.

What database are you using? Usually the vendor provides a driver that is self contained.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
GeeCON Prague 2014
 
subject: JDBC connectivity in WSAD