This discussion is archived
1 Reply Latest reply: Oct 23, 2012 11:49 AM by Evris RSS

Issue JDBC connection pool with Glassfish 3.1.2.2 and Oracle XE 11gR2

Evris Newbie
Currently Being Moderated
Hello,
I am experiencing an issue with pinging a JDBC connection Pool.
I installed the following without any warnings or errors:

Operating System: Oracle Enterprise Linux 5
Oracle XE 11gR2 (11.2.0.2.0) database
Glassfish 3.1.2.2

I will refer to the steps I did after the installations

1) In the .profile file of the OS I add the following:

JRE_HOME=/usr/java/jre1.6.0_31; export JRE_HOME
JAVA_HOME=/usr/java/jdk1.6.0_31; export JAVA_HOME
GLASSFISH_DIR=/u01/glassfish3
GLASSFISH_HOME=/u01/glassfish3/glassfish
DERBY_HOME=$GLASSFISH_DIR/javadb
OPEN_MQ_HOME=$GLASSFISH_DIR/mq

PATH=:$JAVA_HOME/bin:$JRE_HOME/bin:$PATH:$HOME/bin:$GLASSFISH_HOME/bin:$DERBY_HOME/bin:$OPEN_MQ_HOME/bin
export GLASSFISH_HOME
export DERBY_HOME
export OPEN_MQ_HOME
export PATH

LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/xe/lib; export LD_LIBRARY_PATH
. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh

2) I copied the ojdbc6.jar to the $GLASSFISH_HOME/domains/domain1/lib

3) I login to the Glassfish admin console and created a new JDBC Connection Pool.

Pool Name: ds_orasys
Resource Type: javax.sql.DataSource
Datasource Classname: oracle.jdbc.pool.OracleDataSource

User: [myschema]
Password: [myschema password]
URL: jdbc:oracle:thin:@localhost:1521:xe

When I ping the connection pool I get the following message in the server log:

[#|2012-10-23T12:14:37.069+0300|WARNING|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service|_ThreadID=22;_ThreadName=Thread-2;|RAR8054: Exception while creating an unpooled [test] connection for pool [ ds_orasys ], Connection could not be allocated because: Invalid Oracle URL specified|#]

[#|2012-10-23T12:14:37.071+0300|SEVERE|glassfish3.1.2|org.glassfish.admingui|_ThreadID=19;_ThreadName=Thread-2;|RestResponse.getResponse() gives FAILURE. endpoint = 'http://212.205.62.217:4848/management/domain/resources/ping-connection-pool.json'; attrs = '{id=ds_orasys}'|#]

I tried to use different jar files. I used ojdbc6dms.jar and ojdbc14.jar.

I also copied the jar files in the $GLASSFISH_HOME/domains/domain1/lib/ext directory as some people suggested. Still no luck. I keep getting the same error messages in the server.log

Can anybody help me out or point me to the right direction.

Thank you in advance

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points