Monday, September 30, 2013

OC4J not starting or coming up - During start the xid is null., errorCode : -3

Symptoms

After issuing start command for a OC4J (container) through opmn. it takes alot (alot) time and at the end just fails to start. connection pool testing shows "unable to get physical conn" or in other word stale conn.

Logs:

opmn oc4j log: ( i tried to start 4 times)

--------
13/09/30 20:47:05 Start process
--------
--------
13/09/30 20:59:19 Start process
--------
--------
13/09/30 21:08:13 Start process
--------
--------
13/09/30 21:16:17 Start process

opmn.log

13/09/30 21:16:17 [pm-requests] Request 5 Started.  Command: /start?process-type=OC4J_CXIS
13/09/30 21:16:17 [pm-process] Starting Process: OC4J~default_group~1 (1655921122:0)
13/09/30 21:26:17 [pm-requests] Request 5 Completed. Command: /start?process-type=OC4J_CXIS
13/09/30 21:26:17 [pm-process] Stopping Process: OC4J~default_group~1 (1655921122:6005)
13/09/30 21:26:17 [libopmnoc4j] Process Stop Error: OC4J~default_group~1 (1655921122:6005)
13/09/30 21:26:17 [libopmnoc4j] Failed to construct stop command for proc: 1655921122
13/09/30 21:26:17 [libopmnoc4j] Forcefully Terminating Process: OC4J~default_group~1 (1655921122:6005)
13/09/30 21:26:19 [pm-process] Process Stopped: OC4J~default_group~1 (1655921122:6005)

log.xml

HEADER>
    <TSTZ_ORIGINATING>2013-09-29T11:18:39.083+04:00</TSTZ_ORIGINATING>
    <COMPONENT_ID>j2ee</COMPONENT_ID>
    <MSG_ID>J2EE DS-00265</MSG_ID>
    <MSG_TYPE TYPE="WARNING"></MSG_TYPE>
    <MSG_LEVEL>1</MSG_LEVEL>
    <HOST_ID>domain.subdomain.ae</HOST_ID>
    <HOST_NWADDR>192.12.16.36</HOST_NWADDR>
    <MODULE_ID>datasource</MODULE_ID>
    <THREAD_ID>101</THREAD_ID>
    <USER_ID>porabi</USER_ID>
  </HEADER>
  <CORRELATION_DATA>
    <EXEC_CONTEXT_ID><UNIQUE_ID>192.12.16.36:36805:1380263269372:15</UNIQUE_ID><SEQ>0</SEQ></EXEC_CONTEXT_ID>
  </CORRELATION_DATA>
  <PAYLOAD>
    <MSG_TEXT>Unclosed connection detected : 'oracle.oc4j.sql.spi.ConnectionFinalizer@14fcf23' : ''.</MSG_TEXT>
  </PAYLOAD>
</MESSAGE>
<MESSAGE>
  <HEADER>
    <TSTZ_ORIGINATING>2013-09-29T11:18:39.083+04:00</TSTZ_ORIGINATING>


<PAYLOAD>
    <MSG_TEXT>Error in resource driver during rollback: javax.transaction.xa.XAException: During start the xid is null., errorCode : -3</MSG_TEXT>
  </PAYLOAD>




Solution
Ok.finally the issue is with Database. when application was trying to come up..it will try to initiate connection pool to initialize the application. but the fact is database is not able to allocate any connection to OAS. either there are all connections are inactive or stale or DB CPU is high.
I think XA connection try to validate the connection and gets a xid from DB which was returning null and the message 'unclosed connection' made me to inform DBA to check on this. DBA agreed that the DB CPU is high due to some process running. it was fixed that i restarted the container it came up quickly.


--Please leave comment if this helped.

1 comment:

  1. Thanks. We are facing the similar problem.

    ReplyDelete