wood burning stoves 2.0*
The moose likes Websphere and the fly likes How to connect database in WSAD(websphere studio) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "How to connect database in WSAD(websphere studio)" Watch "How to connect database in WSAD(websphere studio)" New topic
Author

How to connect database in WSAD(websphere studio)

krussi rong
Ranch Hand

Joined: Jan 30, 2002
Posts: 62
Hi,
I use postgresql database,usually I just add
postgresql.jar file in classpath at VisualAge.
but in Studio,after I add a classpath variable of the postgresql.jar file, the
Class.forName("org.postgresql.Driver");
still can't found the Driver.
So anybody can help me about that?
thanks
Jenny
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Let's move this to the WebSphere forum.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Peter DeGregorio
Greenhorn

Joined: Jul 11, 2002
Posts: 9

I am having a similar problem in WSAD but with Oracle. I'm trying to modify an application which uses (and finds) the PostgreSQL to use Oracle instead and am getting ClassNotFoundException at Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
I have added classes12.zip to the project's list of libraries, where postgresql.jar is also listed. If I set it up to run the PostregSQL driver it finds it but it does not find the Oracle driver.
Peter DeGregorio
Greenhorn

Joined: Jul 11, 2002
Posts: 9

I got my program with the problem similar to yours (Oracle not PostgreSQL) to work in WSAD with both Websphere Test Environment and Tomcat by adding the JDBC driver jar to the class path of the server instance as an external jar. Hope this helps.
Baba Batsha
Ranch Hand

Joined: Jul 16, 2002
Posts: 94
WTE class loader is not the same as WSAD WAS test environment. Make sure the JDBC drivers are in the right order for the class loader
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to connect database in WSAD(websphere studio)
 
Similar Threads
Sun One Studio: Where should I place a database driver jar file ?
How to use database connection in Websphere studio
how to connect database in WSAD(webspere studio)
Ms-Access with Java Studio creator ?
Running a simple java program