Question

I am using JBOSS EAP 6.1 using JDK 1.6. I have registered all my dependencies as static module. I have dependencies on JDK apis.
During deployment I am faced with following issue:
java.lang.NoClassDefFoundError: javax/crypto/CipherInputStream
java.lang.NoClassDefFoundError: org/omg/CORBA/portable/IDLEntity
java.lang.NoClassDefFoundError: javax/swing/ImageIcon

I was able to resolve the above issue by creating a static module and adding rt.jar and des.jar as resources in moudle.xml but then I am facing another issue regarding algorithm not found.

java.security.NoSuchAlgorithmException: PBEWithMD5AndDES SecretKeyFactory not available
at javax.crypto.SecretKeyFactory.(DashoA13*..)
at javax.crypto.SecretKeyFactory.getInstance(DashoA13*..)
at utilities.algorithm.DesEncrypter.(DesEncrypter.java:49)
at utilities.algorithm.DesEncrypter.decryptStream(DesEncrypter.java:177)

I want to add include these dependencies from system without creating static module as shown on different forums.
https://community.jboss.org/thread/195182
https://community.jboss.org/message/717881#717881#717881
Can we do it in for EAP 6.1 or its just available for JBOSS AS 7. Can someone please show me an example for EAP 6.1.

Was it helpful?

Solution

I have been able to fix the issue. The api included in JDK are exported in different modules and we need to include those modules in our modules as dependences.

For Example: org/omg/CORBA/portable/IDLEntity was available in org.omg.api module.
Similarly, javax/swing/ImageIcon & javax/crypto/CipherInputStream was available in javax.api.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top