users@glassfish.java.net

Re: Problem in the JDBC connection pools with Glassfish 3.1.2.2 and Oracle XE 11gR2

From: Kevin Schmidt <ktschmidt_at_gmail.com>
Date: Tue, 23 Oct 2012 06:39:45 -0700

The error you are getting is about an invalid URL. Have you verified it is
correct?

Syntax is:

jdbc:oracle:thin:@//<host>:<port>/ServiceName
or
jdbc:oracle:thin:@<host>:<port>:<SID>

NOTE: The Oracle thin driver requires the SID or ServiceName of the
database in the JDBC URL as opposed to the database alias. Consult your
Oracle documentation for more details.

On Tue, Oct 23, 2012 at 1:49 AM, <forums_at_java.net> wrote:

> 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 Open Source
> Glassfish 3.1.2.2 (build 5) 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<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
>
> --
>
> [Message sent by forum member 'ievris']
>
> View Post: http://forums.java.net/node/**891672<http://forums.java.net/node/891672>
>
>
>