Meaningless Drivel is fun!
The moose likes JDBC and Relational Databases and the fly likes Database Initializatio Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Database Initializatio" Watch "Database Initializatio" New topic

Database Initializatio

Megha Rajeevan

Joined: Mar 22, 2006
Posts: 24
Hello Ranchers!!
I need your help in configuring the database in the Sun's Application server 8.0 PE ..
i'm using the Admin Console for connecting the database!!
In that i logged on to the Resources -> JDBC -> Connection Pools

from there i clicked the new button..
and give the following values

Name : test
Resource type : javax.sql.DataSource
Database vendor : oracle
then i clicked next >>

in the next page.. i've given the following

Data Source Class name : oracle.jdbc.pool.OracleDataSource

and clicked next >>
in the next page i've given the following properties

databasenam : megha
user name : scott
password : tiger
port : 1521

After saving the setting when i ping.. to test the connection.. it is shwoing the following error!!
Operation 'pingConnectionPool' failed in 'resources' Config Mbean
i don't know what to do now!!
please help me.. ranchers!!

thanks in advance!!
[ April 11, 2006: Message edited by: Bear Bibeault ]
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

I don't know anything about that product, but I don't see where you have configured the name of the server where Oracle is running.
Aravind Prasad
Ranch Hand

Joined: Dec 28, 2005
Posts: 265
Hello Megha...
It is very easy..
the thing u want to do is

first log in sun admin console
then.. give user name and passwd
then go to the path like this

Resources -> JDBC -> Connection Pool

first you have to create the connection pool then only u can use it as a JDBC Resource.. ok

now.. click the new button in the connection pool

type like this

name : test
resource type : java.sql.datasource
database vendor : oracle

click next ->
datasource class name = oracle.jdbc.pool.OracleDataSource (this will be default)
click next ->

in the next page..
give following property:
username : scott
pwd : tiget
url :jdbc racle:thin:@<ip address>:<port number>:<database name>
egs is like this
url = jdbc racle:thin:@ racle (ok)

then click finish..
click ping!! to test the connection
if ping succeeded!! then connection is ok
if showing some error!!
then u have to download the thin driver for oracle from
oracle website
the file name will be
download that file.. and save it in
<Appserver Path>/domain/domain1/lib/

then u go to the admin console path...
click the Application Server from the left menu..
go to JVM Settings
and then click the Path settings

there u can see the text area for Classpath Suffix:
in that text area..
u have to give the path.. of the thin driver
in my system i give like this


click save!!
again go to the connection pool.. and click ping...
it will be successful..
then go to the JDBC Resource!!
and click new button!!
give the jndi name : jdbc/test
the pool name will be in the combo
and give description!!
click ok..

now.. it is ready for the database programming..

try this out...
all the best

Megha Rajeevan

Joined: Mar 22, 2006
Posts: 24
thank u Mr.Aravind Prasad!!
this is working perfectly!!
thank u very much!!

regards Megha
I agree. Here's the link:
subject: Database Initializatio
It's not a secret anymore!