Blog

Issue creating Connection Pool for Oracle on Glassfish3

As part of ADF Essentials setup on Glassfish, you need to create JDBC Pool. This is documented on http://docs.oracle.com/middleware/1212/adf/ADFAG/ap_glassfish.htm#ADFAG20931.

First make sure that you copy ojdbc6.jar to your Glassfish servers’s domain-homelib folder.

C:glassfish3bin>asadmin
Use “exit” to exit and “help” for online help.
asadmin> create-jdbc-connection-pool –datasourceclassname oracle.jdbc.pool.OracleDataSource –restype javax.sql.DataSource –property user=user1:password=welcome1:url=jdbc:oracle:thin:@localhost:1521:XE SampleDSPool
remote failure: Invalid property syntax, missing property value: oracleInvalid property syntax, missing property value: oracle
Usage: create-jdbc-connection-pool [–datasourceclassname=datasourceclassname] [–restype=restype] [–steadypoolsize=8] [–maxpoolsize=32] [–maxwait=60000] [–poolresize=2] [–idletimeout=300] [–initsql=initsql] [–isolationlevel=isolationlevel] [–isisolationguaranteed=true] [–isconnectvalidatereq=false] [–validationmethod=table] [–validationtable=validationtable] [–failconnection=false] [–allownoncomponentcallers=false] [–nontransactionalconnections=false] [–validateatmostonceperiod=0] [–leaktimeout=0] [–leakreclaim=false] [–creationretryattempts=0] [–creationretryinterval=10] [–sqltracelisteners=sqltracelisteners] [–statementtimeout=-1] [–statementleaktimeout=0] [–statementleakreclaim=false] [–lazyconnectionenlistment=false] [–lazyconnectionassociation=false] [–associatewiththread=false] [–driverclassname=driverclassname] [–matchconnections=false] [–maxconnectionusagecount=0][–ping=false] [–pooling=true] [–statementcachesize=0] [–validationclassname=validationclassname] [–wrapjdbcobjects=true] [–description=description] [–property=property] jdbc_connection_pool_id
Command create-jdbc-connection-pool failed.

This kept failing for me, as it seems to parse URL for properties as URL has : character. Modifying the command as shown below resolved the issue. Notice URL is not specified as URL=”jdbc:oracle:thin:@localhost:1521:XE”.

C:glassfish3bin>asadmin create-jdbc-connection-pool –datasourceclassname oracle.jdbc.pool.OracleDataSource –restype javax.sql.DataSource –property user=user1:password=welcome1:URL=”jdbc:oracle:thin:@localhost:1521:XE” SampleDSPool
JDBC connection pool SampleDSPool created successfully.
Command create-jdbc-connection-pool executed successfully.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top