0

I'm developping a web application, so i decided to use Netbeans IDE 8.1, the default Glassfish Server 4.1 and oracle database 11g express edition.

First, I need to create connection pool in my Glassfish. I open localhost:4848 set those things:

    - Resource Type: javax.sql.DataSource
    - Class name of the data source: oracle.jdbc.pool.OracleDataSource
In Additionnal properties i set :
    - driverClass : oracle.jdbc.OracleDriver
    - portNumber : 1521
    - databaseName : XE
    - user: user
    - password: password
    - url: jdbc:oracle:thin:@localhost:1521:XE

and the others default values.

Second i added ojdbc6.jar on C:\Program Files\glassfish-4.1\glassfish\domains\domain1\lib\ext

But unfortunately when i tried to ping, it show this error:

An error has occurred
Ping Connection Pool failed for mailing_pool. Class name is wrong or classpath is not set for : oracle.jdbc.pool.OracleDataSource Please check the server.log for more details. 

finally, i also execute the tnsping command on cmd and every thing all right, this is the result shown on the cmd:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ADMIN-
PC)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
OK (30 msec)

can any body help me

Sidaoui Majdi
  • 399
  • 7
  • 26

1 Answers1

0

Try putting your ojbc6.jar file in the following directory then restart the server:

C:\Program Files\glassfish-4.1\glassfish\domains\domain1\lib\

Or alternatively to make it available to all domains you create put it in the following folder:

C:\Program Files\glassfish-4.1\glassfish\lib
nickebbitt
  • 1,711
  • 1
  • 13
  • 13