I run a websphere 4.0 Advanced Single Server, with a DB2 7.2 Database on
the same machine under aix/l.
I inserted a pooldatasourceconnection to a database on the db2. after
the startup of websphere. the application is able to connect once to the
database, a second time i get the following:
[02.02.05 17:42:24:970 CET] 269c59e3 StaleConnecti A CONM7007I: Mapping
the following SQLException, with ErrorCode -1,224 and SQLState 08001, to
a StaleConnectionException: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI
Driver] SQL1224N A database agent could not be started to service a
request, or was terminated as a result of a database system shutdown or
a force command. SQLSTATE=55032
at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:174)
at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGenerator.java:431)
at
COM.ibm.db2.jdbc.app.DB2Connection.connect(DB2Connection.java(Compiled
Code))
at
COM.ibm.db2.jdbc.app.DB2Connection.<init>(DB2Connection.java:351)
at
COM.ibm.db2.jdbc.app.DB2ReusableConnection.<init>(DB2ReusableConnection.java:66)
at
COM.ibm.db2.jdbc.DB2PooledConnection.getConnection(DB2PooledConnection.java:183)
at com.ibm.ejs.cm.pool.ConnectO.<init>(ConnectO.java:83)
at
com.ibm.ejs.cm.pool.JDBC1xConnectionFactory.createConnection(JDBC1xConnectionFactory.java:42)
at
com.ibm.ejs.cm.pool.ConnectionPool.createConnection(ConnectionPool.java:891)
at
com.ibm.ejs.cm.pool.ConnectionPool.createOrWaitForConnection(ConnectionPool.java:823)
Where could be the problem???
Thanx
With best regards
Markus
SQL8001N
DB2 connect processing failed; a valid product license was not
found. Cause: A valid license key could not be found and the evaluation period has
expired.
Action: Install a license key for the fully entitled version of the product.
You can obtain a license key for the product by contacting your IBM
representative or authorized dealer. sqlcode: -8001 sqlstate: 42968
Thanks, Chasling
[02.02.05 09:27:47:296 CST] 7eb60c4a Server U Build number: a0131.07
[02.02.05 09:27:47:868 CST] 7eb60c4a ORBRas W com.ibm.CORBA.iiop.Util Util P=867384:O=0:CT
JORB0012: Pass by reference has been set to: true (NoLocalCopies = true)
[02.02.05 09:27:51:345 CST] 7eb60c4a DBMgr F SMTL0026E: Failure to create a data source:
java.sql.SQLException: Io exception: Connection
refused(DESCRIPTION=(TMP=)(VSNNUM=135294976)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:260)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:523)
at java.sql.DriverManager.getConnection(DriverManager.java:183)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:111)
at
oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:98)
at
oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:77)
at com.ibm.ejs.cm.pool.JDBC1xConnectionFactory.createConnection(JDBC1xConnectionFactory.java:42)
at com.ibm.ejs.cm.pool.ConnectionPool.createConnection(ConnectionPool.java:914)
at com.ibm.ejs.cm.pool.ConnectionPool.createOrWaitForConnection(ConnectionPool.java:846)
at com.ibm.ejs.cm.pool.ConnectionPool.findFreeConnection(ConnectionPool.java:764)
at com.ibm.ejs.cm.pool.ConnectionPool.findConnectionForTx(ConnectionPool.java:676)
at com.ibm.ejs.cm.pool.ConnectionPool.allocateConnection(ConnectionPool.java:610)
at com.ibm.ejs.cm.pool.ConnectionPool.getConnection(ConnectionPool.java:274)
at com.ibm.ejs.cm.pool.ConnectionPool.getConnection(ConnectionPool.java:269)
at com.ibm.ejs.cm.DataSourceImpl.getConnection(DataSourceImpl.java:99)
at com.ibm.ejs.sm.util.db.DBMgr.initialize(DBMgr.java:206)
at com.ibm.ejs.sm.server.AdminServer.initializeConnectionManager(AdminServer.java:1135)
at com.ibm.ws.runtime.Server.initializeRuntime0(Server.java:943)
at com.ibm.ejs.sm.server.ManagedServer.initializeRuntime0(ManagedServer.java:407)
at com.ibm.ejs.sm.server.AdminServer.initializeRuntime0(AdminServer.java:1104)
at com.ibm.ws.runtime.Server.initializeRuntime(Server.java:882)
at com.ibm.ejs.sm.server.AdminServer.main(AdminServer.java:391)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:158)
java.lang.Throwable
at com.ibm.ejs.ras.TraceLogger.fatalEvent(TraceLogger.java:219)
at com.ibm.ejs.ras.TraceEventGeneratorImpl.fireTraceEvent(Tr.java(Compiled Code))
at com.ibm.ejs.ras.TraceEventGeneratorImpl.fireTraceEvent(Tr.java:1346)
at com.ibm.ejs.ras.Tr.fatal(Tr.java:854)
at com.ibm.ejs.sm.util.db.DBMgr.initialize(DBMgr.java:220)
at com.ibm.ejs.sm.server.AdminServer.initializeConnectionManager(AdminServer.java:1135)
at com.ibm.ws.runtime.Server.initializeRuntime0(Server.java:943)
at com.ibm.ejs.sm.server.ManagedServer.initializeRuntime0(ManagedServer.java:407)
at com.ibm.ejs.sm.server.AdminServer.initializeRuntime0(AdminServer.java:1104)
at com.ibm.ws.runtime.Server.initializeRuntime(Server.java:882)
at com.ibm.ejs.sm.server.AdminServer.main(AdminServer.java:391)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:158)
[02.02.05 09:27:51:621 CST] 7eb60c4a SystemOut U SMTL0026E: Failure to create a data source:
java.sql.SQLException: Io exception: Connection
refused(DESCRIPTION=(TMP=)(VSNNUM=135294976)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:260)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:523)
at java.sql.DriverManager.getConnection(DriverManager.java:183)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:111)
at
oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:98)
at
oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:77)
at com.ibm.ejs.cm.pool.JDBC1xConnectionFactory.createConnection(JDBC1xConnectionFactory.java:42)
at com.ibm.ejs.cm.pool.ConnectionPool.createConnection(ConnectionPool.java:914)
at com.ibm.ejs.cm.pool.ConnectionPool.createOrWaitForConnection(ConnectionPool.java:846)
at com.ibm.ejs.cm.pool.ConnectionPool.findFreeConnection(ConnectionPool.java:764)
at com.ibm.ejs.cm.pool.ConnectionPool.findConnectionForTx(ConnectionPool.java:676)
at com.ibm.ejs.cm.pool.ConnectionPool.allocateConnection(ConnectionPool.java:610)
at com.ibm.ejs.cm.pool.ConnectionPool.getConnection(ConnectionPool.java:274)
at com.ibm.ejs.cm.pool.ConnectionPool.getConnection(ConnectionPool.java:269)
at com.ibm.ejs.cm.DataSourceImpl.getConnection(DataSourceImpl.java:99)
at com.ibm.ejs.sm.util.db.DBMgr.initialize(DBMgr.java:206)
at com.ibm.ejs.sm.server.AdminServer.initializeConnectionManager(AdminServer.java:1135)
at com.ibm.ws.runtime.Server.initializeRuntime0(Server.java:943)
at com.ibm.ejs.sm.server.ManagedServer.initializeRuntime0(ManagedServer.java:407)
at com.ibm.ejs.sm.server.AdminServer.initializeRuntime0(AdminServer.java:1104)
at com.ibm.ws.runtime.Server.initializeRuntime(Server.java:882)
at com.ibm.ejs.sm.server.AdminServer.main(AdminServer.java:391)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:158)
java.lang.Throwable
at com.ibm.ejs.ras.TraceEventGeneratorImpl.fireTraceEvent(Tr.java(Compiled Code))
at com.ibm.ejs.ras.TraceEventGeneratorImpl.fireTraceEvent(Tr.java:1346)
at com.ibm.ejs.ras.Tr.fatal(Tr.java:854)
at com.ibm.ejs.sm.util.db.DBMgr.initialize(DBMgr.java:220)
at com.ibm.ejs.sm.server.AdminServer.initializeConnectionManager(AdminServer.java:1135)
at com.ibm.ws.runtime.Server.initializeRuntime0(Server.java:943)
at com.ibm.ejs.sm.server.ManagedServer.initializeRuntime0(ManagedServer.java:407)
at com.ibm.ejs.sm.server.AdminServer.initializeRuntime0(AdminServer.java:1104)
at com.ibm.ws.runtime.Server.initializeRuntime(Server.java:882)
at com.ibm.ejs.sm.server.AdminServer.main(AdminServer.java:391)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:158)
If above is not true(that is license is not expired) then here is what I
will do. beware this is more than 1 step. This is also available in
various FAQ's. Reason is that your AIX box is running out of shared
memory. So either you increase shared memory or fool db2 in thinking
that it is conneting to a remote db2 hence it should use tcp/ip
do following.
su to db user id(typically db2inst1)
Set the DB2COMM environment variable to use TCP/IP:
db2set DB2COMM=tcpip
Set SVCENAME to db2cdb2inst:
db2 get dbm cfg | grep SVCENAME
if empty then look in /etc/sevices to figure one out
looks like follwing, if more than one present typically delete rest
except last 2
db2cdb2inst 50000/tcp
db2idb2inst 50001/tcp
then update it
db2 update dbm cfg using SVCENAME db2cdb2inst
Verify the settings:
db2 get dbm cfg | grep SVCENAME
(You will have to stop and restart DB2 for this to take affect:
db2stop
db2start
Update the /etc/services file(if necessary). Add the lines:
db2cdb2inst 50000/tcp
db2idb2inst 50001/tcp
Make sure the port numbers 50000 and 50001 do not appear elsewhere in
the /etc/services file. If they are already being used, pick another
pair of numbers.
Enter the commands:
catalog tcpip node <nodename> remote <hostname> server db2cdb2inst
catalog database <dbname> at node <nodename>
where:
<nodename>
is your name for the database server host
<hostname>
is the TCP/IP hostname for the database server
<dbname>
is the database name (for example, WAS)
For example, if your DB2 server is on the machine WASserver1, the
database is WAS, and your local name (nodename) for it is WASnode, enter:
catalog tcpip node f1n01(some arbitrary name ) remote WASserver1 server
db2cdb2inst
catalog database WAS as rwas at node WASnode
Once the server is configured and DB2 restarted, enter:
db2 connect to rwas user db2inst using ibmdb2
where ibmdb2 is the password for db2inst on the DB2 server.
To verify your new node:
db2 list node directory
To create an alias for a database
db2 catalog db <dbName> as <dbAlias> at node <nodeName>
where <dbAlias> is your local alias for <dbName> on <nodeName>
To verify database name:
db2 list db directory
--
Rohit Singh
WebSphere Development Connector, Adapter, Connection Manager and JDBC
A man can succeed at almost anything for which he has unlimited
enthusiasm. Charles M. Schwab
The opinions expressed herein are those of the individual, and do not in
any way reflect the position of IBM, IBM Rochester, or any of their
subsidiaries.