AS 8.1 OCI error
Hi All,
I am getting the below error message
./asadmin ping-connection-pool --user admin --secure jdbc/pool/iplant_production
Please enter password>
Operation 'pingConnectionPool' failed in 'resources' Config Mbean.
Target exception message: Class name is wrong or classpath is not set
for : oracle.jdbc.pool.OracleDataSource
CLI137 Command ping-connection-pool failed.
Can anyone point me how to solve the above ?
Regards,
Scotty
[505 byte] By [
s@mira123a] at [2007-11-27 5:41:21]

# 1
did you copy the oracle jdbc-driver to AS_INSTALL_DIR/domains/<domain>/lib/ext ? (restar t AS required).configuration for OCI driver can be found in 8.1 documentation. http://docs.sun.com/app/docs/doc/819-2556/6n4rap8sl?a=view#beani
# 2
Hi,yes i did, yet it didn't work out?
# 3
what exceptions do you get in server.log ?
# 4
hi,
Thanks for the reply
Servlet.service() for servlet jsp threw exceptionjava.sql.SQLException:
Error in allocating a connection. Cause: Connection could not be
allocated because: Closed Connectionat
com.sun.gjc.spi.DataSource.getConnection(DataSource.java:74)at
com.company.issd.essd.iplant.db.Database.getConnection(Database.java:58)
# 5
1) could you please post the complete stack trace.
2) I guess, "Closed Connection at" indicates that connection is not valid.
Try enabling connection validation (validation type : table) and see whether the problem is solved. You may refer :
http://blogs.sun.com/JagadishPrasath/entry/connection_validation_in_glassfish_j dbc
# 6
Oracle OCI depends on $ORACLE_HOME . Verify ORACLE_HOME on user .profile to be set.
# 7
Hi,
I have set the ORACLE_HOME as follows:
/opt/SUNWappserver/appserver/bin/asadmin create-system-properties --user admin --passwordfile /tmp/adminpasswordfile --host localhost --port 4849 --target your_server ORACLE_HOME=/export/oracle
Should it be done in another way?
Thanks,
Scotty
# 8
hi,
This is the new ping error result
Operation 'pingConnectionPool' failed in 'resources' Config Mbean.
Target exception message: Class name is wrong or classpath is not set for : oracle.jdbc.pool.OracleDataSource
Can anyone tell me what is wrong?
Regards,
Scotty
# 9
did you copy the oracle jdbc-driver to AS_INSTALL_DIR/domains/<domain>/lib/ext ? (restar t AS required). ?
What exceptions do you get in server.log ? could you post the complete exception stack trace ?
Please refer :
http://blogs.sun.com/JagadishPrasath/entry/creating_jdbc_connection_pool_resour ce
for the steps. (GUI/CLI cases will be applicable for 8.x also)
Thanks,
-Jagadish
# 10
Hi,I did all what have been asked to.It is pinging with no exception while using the thin driver but not the OCI.Any suggestions?Thanks,Scotty
# 11
could you please post your OCI con. pool configuration ?
# 12
hi,
here is the conf
<jdbc-connection-pool connection-validation-method="table"
datasource-classname="oracle.jdbc.pool.OracleDataSource"
fail-all-connections="true" idle-timeout-in-seconds="300"
is-connection-validation-required="true"
is-isolation-level-guaranteed="false" max-pool-size="32"
max-wait-time-in-millis="60000" name="jdbc/pool/poolname"
pool-resize-quantity="2" res-type="javax.sql.DataSource"
steady-pool-size="8" validation-table-name="T_ZSD_VALIDATION">
<property name="user" value="USERSNAME"/>
<property name="password" value="PASSWORD"/>
<property name="url" value="jdbc:oracle:oci:@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = EMAP01)(PORT =
1529))) (CONNECT_DATA = (SID = oradbp21)))"/>
</jdbc-connection-pool>
and the port is 1529 not 1521
# 13
Ping option not function on old AS8 it磗 have some corrections on new version.
Steps:
1) login AS8 user
2) change .profile include ORACLE_HOME point to the root install.
ex: /oraclexe/app/oracle/product/10.2.0/server not include BIN directory then
export ORACLE_HOME=/oraclexe/app/oracle/product/10.2.0/server
3) stop all AS8 DAS and node-agent
4) start all AS8
Build a sample app to test, don磘 use ping option until u have last version.
You should use tns name in url jdbc:oracle:oci:@oradbp21
ORACLE_HOME must by in user enviroment ".profile".
If u using SUDO to execute asadmin command take a look in man pages SUDO not run ".profile"...
# 14
Hi,Thanks for the reply, however would you please elaborate the above?login AS8 user .. do u mean to login as admin?Thanks,Scotty
# 15
Hi,Would anyone point me how to configure that ping to make it work in AS 8.1I guess there are some paths that i should include in the JVM configurations.Is anyone aware of this?Thanks,Scotty