• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to connect database in WSAD(websphere studio)

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let's move this to the WebSphere forum.
 
Greenhorn
Posts: 10
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 10
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic