Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jarkarta-Struts - IDE's, Database Connections - confusion - arrgh!!!

 
Kim Gaskins
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the unfortunate/fortunate opportunity to code in Java (with my dinosaur mind set) in a shop where they want results NOW and I'm NEW. I'm using WebSphere RAD 5.1. I'm trying to get through a Jakarta-Struts tutorial and was doing okay until it came to the DB connection. I have a few questions (and these questions may be way off for gurus but I gotta start somewhere):

1. I created a Cloudscape database using WebSphere but as soon as I start the server I get all kinds of errors (see below):

----------------------------------------------------------------------------------------------------------------------------------------------
> Cannot create JDBC driver of class 'com.ibm.db2j.jdbc.DB2jDriver' for connect URL 'jdbc.db2j:C:/Documents and
Settings/kks/My Documents/IBM/StrutsTutorial04172009/Servers/REGISTER_DB'
java.sql.SQLException: No suitable driver

> org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'com.ibm.db2j.jdbc.DB2jDriver' for connect URL 'jdbc.db2j:C:/Documents and Settings/kks/My Documents/IBM/StrutsTutorial04172009/Servers/REGISTER_DB'

> [5/1/09 14:32:59:579 EDT] 2251d9e9 ServletInstan E SRVE0100E: Did not realize init() exception thrown by servlet action: javax.servlet.UnavailableException: Initializing application data source userDB

> [5/1/09 14:32:59:595 EDT] 2251d9e9 WebGroup E SRVE0020E: [Servlet Error]-[action]: Failed to load servlet: javax.servlet.UnavailableException: Initializing application data source userDB

----------------------------------------------------------------------------------------------------------------------------------------------

Can you help me out in laymen terms?

Thanks - Kim
 
Brian Legg
Ranch Hand
Posts: 488
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may have more luck over at Websphere Forum. This isn't novice enough for me
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brian Legg wrote:You may have more luck over at Websphere Forum. This isn't novice enough for me
Agree. Moving.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34195
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kim,
Welcome to JavaRanch!

Can you confirm the IDE you are using. IBM called version 5.1 "WSAD 5.1" and version 6 "RAD 6". Things changed a bit and this may matter if you have a follow up question.

> java.sql.SQLException: No suitable driver
This is the root cause of your problem. Is the jar file containing your JDBC driver in the server classpath? If you don't know how to check, just confirm which IDE you are using and we can provide more concrete places to look.
 
Kim Gaskins
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:Kim,
Welcome to JavaRanch!

Can you confirm the IDE you are using. IBM called version 5.1 "WSAD 5.1" and version 6 "RAD 6". Things changed a bit and this may matter if you have a follow up question.

> java.sql.SQLException: No suitable driver
This is the root cause of your problem. Is the jar file containing your JDBC driver in the server classpath? If you don't know how to check, just confirm which IDE you are using and we can provide more concrete places to look.




Hi


I'm using WebSphere 5.1 and RAD 6. Thanks.

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34195
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In RAD 6, you right click the server to launch the admin console. Then in the environment section, you can view the data sources and test the connection. This should work.

Then you would want to go in to the JVM classpath (in the application section of the console) and add the database driver path there. You can look in the RAD 6 help if you don't know where to find this classpath.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic