[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

deadlock on sun.security.jca.ProviderConfig.getProvider

Asked by PreciseEng in Java Standard Edition, Sun Java System Web Server

Tags: Java 1.5

Hi,
I've  been encountered into deadlock when calling to Cipher.getInstance(),
the deadlock is on the sun.security.jca.ProviderConfig.getProvider function.

I search a bit and find it kind similar to Sun bug id:6440846  (Deadlock between AppClassLoader and ExtClassLoader )
the problem it, that they say it is fixed for Java7 beta 55.

I must run my application on java1.5, is there a way to overcome this on java 1.5?

"Logger_Init_thread" daemon prio=6 tid=0x0c614bc0 nid=0xebc waiting for monitor entry [0x0d12f000..0x0d12fcec]
        at sun.security.jca.ProviderConfig.getProvider(Unknown Source)
        - waiting to lock <0x0432e858> (a sun.misc.Launcher$AppClassLoader)
        at sun.security.jca.ProviderList.getProvider(Unknown Source)
        at sun.security.jca.ProviderList$ServiceList.tryGet(Unknown Source)
        at sun.security.jca.ProviderList$ServiceList.access$200(Unknown Source)
        at sun.security.jca.ProviderList$ServiceList$1.hasNext(Unknown Source)
        at javax.crypto.Cipher.getInstance(DashoA12275)
        at com.precise.infra.communication.core.streams.crypt.AESKey.getCipher(AESKey.java:83)
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
My code is:
try
{
 IvParameterSpec iv = new IvParameterSpec(ivCopy);
SecretKeySpec secretKey = new SecretKeySpec(keyCopy, "AES");
Cipher cipher = Cipher.getInstance("AES/CFB/NoPadding");
cipher.init(cryptMode, secretKey, iv);
return cipher;
}
catch (Throwable e)
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625