Java Thread Dump and String encoding

Hi

My Application is server application, running on a linux box with JDK 1.4.2_04

Recently, my application got hang, there are no processing. when i took stack trace. I found

"Thread-6204" prio=1 tid=0x0x8e3a400 nid=0x2621 waiting for monitor entry [b40b1000..b40b186c]

at java.nio.ByteBuffer.wrap(ByteBuffer.java:342)

at java.lang.StringCoding$CharsetSD.decode(StringCoding.java:179)

at java.lang.StringCoding.decode(StringCoding.java:220)

at java.lang.StringCoding.decode(StringCoding.java:226)

at java.lang.String.<init>(String.java:380)

Thread is wating for monitor entry in ByteBuffer.wrap.

but the Bytebuffer.wrap is static method and it is not synchronized

i want to know why is it waiting for a monitor when the method is not synchronized.

Thanks in advance

[850 byte] By [muthukumaran_s] at [2007-11-26 10:37:09]
# 1

Hi,

If you post this in the java forums , it is more likely that you will get a relevent answer.

Btw , you can actually take a look at the thread which is holding the lock ... Looking at the code , wild guess would be that your code is blocked on waiting for the class to be loaded (Heap*Buffer class).

Regards,

Mridul

MridulM at 2007-7-7 2:48:06 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Instant Messaging...