I am using WSAD 5.1.2 Trial version and Oracle 9i and encountered a strange
problem.
I created an Account entity bean(CMP), mapped to the Account table in the db
and then run the Universal Test Client. When I tried to use the
findByPrimaryKey(..) method, I got the following exception:
[29/07/04 23:44:11:960 BST] 3238ff26 FreePool E J2CA0046E: Method
createManagedConnctionWithMCWrapper caught an exception during creation of
the ManagedConnection for resource jdbc/ejbbank, throwing
ResourceAllocationException. Original exception:
com.ibm.ws.exception.WsException: DSRA8100E: Unable to get a
PooledConnection from the DataSource.
at
com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.(DataStoreAdapterE
xception.java:244)
at
com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.(DataStoreAdapterE
xception.java:171)
at
com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException(AdapterUtil
.java:208)
at
com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurati
onHelper.java:777)
at
com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource
.java:641)
at
com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnect
ion(WSManagedConnectionFactoryImpl.java:726)
......
Caused by: java.sql.SQLException: invalid arguments in call
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:183)
at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:346)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
....
The Account bean I created has four attributes and are mapped to the
corresponding columns in the ACCOUNT table:
balance(BigDecimal)-->BALANCE: NUMBER(8:2);
interest(int)-->INTEREST: NUMBER(22:0);
accountID(String)-->ACCOUNTID: VARCHAR2(8);
accountType(String)-->ACCOUNTTYPE: VARCHAR2(8);
I tried to investigate the problem and wrote a servlet and used JNDI look up
to find the same datasource and made a connection and then did a (select *
from ACCOUNT). That did retrieve a set of correct result, though I saw the
following message on the console:
----
[30/07/04 00:01:05:848 BST] 3c013b09 ConnectionFac I J2CA0122I: Resource
reference jdbc/ejbbank could not be located, so default values of the
following are used: [Resource-ref settings]
res-auth: 1 (APPLICATION)
res-isolation-level: 0 (TRANSACTION_NONE)
res-sharing-scope: true (SHAREABLE)
res-resolution-control: 999 (undefined)
[Other attributes]
isCMP1_x: false (not CMP1.x)
isJMS: false (not JMS)
[30/07/04 00:01:06:469 BST] 3c013b09 WSRdbDataSour I DSRA8203I: Database
product name : Oracle
[30/07/04 00:01:06:489 BST] 3c013b09 WSRdbDataSour I DSRA8204I: Database
product version : Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
[30/07/04 00:01:06:489 BST] 3c013b09 WSRdbDataSour I DSRA8205I: JDBC driver
name : Oracle JDBC driver
[30/07/04 00:01:06:489 BST] 3c013b09 WSRdbDataSour I DSRA8206I: JDBC driver
version : 9.2.0.1.0
-----------
I don't have any idea what causes this problem and will be very grateful if
somebody can provide an insight.
Thanks in advance.
Ian