waiting to lock <0xc02aadb0> (a java.util.Collections$SynchronizedMap)

Hi,

I'm getting below error in the weblogic server log and threads are getting hung and after some times server stops responding. The application is running on weblogic 8 sp5, j2sdk1.4.2_13, oracle 9i

First error

"ExecuteThread: '0' for queue: 'weblogic.kernel.Default'" daemon prio=5 tid=0x00a68fe8 nid=0xc waiting for monitor entry [0x9daff000..0x9daffc28]

at com.control.persisters.ServiceRequesterPersister.loadServiceRequester(ServiceRequesterPersister.java:98)

- waiting to lock <0xc02aadb0> (a java.util.Collections$SynchronizedMap)

Second error

"ExecuteThread: '2' for queue: 'weblogic.kernel.Default'" daemon prio=5 tid=0x00337c98 nid=0xe waiting for monitor entry [0x9d8fe000..0x9d8ffc28]

at com.common.db.DBConnectionManager$DBConnectionPool.getConnection(Unknown Source)

- waiting to lock <0xc018fe30> (a com.common.db.DBConnectionManager$DBConnectionPool)

at com.common.db.DBConnectionManager.getConnection(Unknown Source)

at com.imac.control.AbstractDBObject.getConnectionByName(AbstractDBObject.java:103)

- locked <0xc0284880> (a com.imac.control.persisters.PageHitPersister)

at com.imac.control.AbstractDBObject.getConnection(AbstractDBObject.java:43)

at com.imac.control.persisters.PageHitPersister.addPage(PageHitPersister.java:70)

For the first error the code I'm using is

privatestaticfinal Map g_requesterCache = Collections.synchronizedMap(new HashMap(128));

synchronized(g_requesterCache){

serviceRequester = (ServiceRequester)g_requesterCache.get(employeeID);

if (null == serviceRequester){

serviceRequester =new ServiceRequester();

}else{

if (log.isDebugEnabled()){

log.debug("retrieved requester from cache");

}

return serviceRequester;

}

}

[2467 byte] By [Nandeesha] at [2007-11-27 1:38:47]
# 1
Hi,Don't think you need to have :-synchronized(g_requesterCache) {If you're using a synchronized hash map....this could be your problem. Your second problem may be similar, but you'd need to post your code.
knightweba at 2007-7-12 0:51:02 > top of Java-index,Core,Core APIs...