aspose file tools*
The moose likes Websphere and the fly likes Jarkarta-Struts - IDE's, Database Connections - confusion - arrgh!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Jarkarta-Struts - IDE Watch "Jarkarta-Struts - IDE New topic
Author

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

Kim Gaskins
Greenhorn

Joined: Apr 30, 2009
Posts: 5
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

Joined: Nov 07, 2008
Posts: 488
You may have more luck over at Websphere Forum. This isn't novice enough for me

SCJA
~Currently preparing for SCJP6
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38363
    
  23
Brian Legg wrote:You may have more luck over at Websphere Forum. This isn't novice enough for me
Agree. Moving.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30309
    
150

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.


[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
Kim Gaskins
Greenhorn

Joined: Apr 30, 2009
Posts: 5
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30309
    
150

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Jarkarta-Struts - IDE's, Database Connections - confusion - arrgh!!!