【问题标题】:Adding JDK dependencies to jboss 6将 JDK 依赖项添加到 jboss 6
【发布时间】:2013-08-07 06:00:01
【问题描述】:

我正在使用 JBOSS EAP 6.1JDK 1.6。我已将所有依赖项注册为 static 模块。我依赖于 JDK api。
在部署期间,我面临以下问题:
java.lang.NoClassDefFoundError: javax/crypto/CipherInputStream
java.lang.NoClassDefFoundError: org/omg/CORBA/portable/IDLEntity
java.lang.NoClassDefFoundError: javax/swing/ImageIcon

我能够通过创建 static 模块 并在 moudle 中添加 rt.jardes.jar 作为资源来解决上述问题.xml 但后来我面临另一个关于找不到算法的问题。

java.security.NoSuchAlgorithmException: PBEWithMD5AndDES SecretKeyFactory not available
在 javax.crypto.SecretKeyFactory.(DashoA13*..)
在 javax.crypto.SecretKeyFactory.getInstance(DashoA13*..)
在实用程序.algorithm.DesEncrypter.(DesEncrypter.java:49)
在实用程序.algorithm.DesEncrypter.decryptStream(DesEncrypter.java:177)

我想在不创建静态模块的情况下从系统中添加这些依赖项,如不同论坛上所示。
https://community.jboss.org/thread/195182
https://community.jboss.org/message/717881#717881#717881
我们可以在 EAP 6.1 中执行此操作吗?或者它仅适用于 JBOSS AS 7。有人可以给我看一个 EAP 6.1 的示例吗?

【问题讨论】:

    标签: jboss dependencies noclassdeffounderror jboss6.x jdk1.6


    【解决方案1】:

    我已经能够解决这个问题。 JDK中包含的api在不同的模块中导出,我们需要将这些模块作为依赖包含在我们的模块中。

    例如:org/omg/CORBA/portable/IDLEntityorg.omg.api 模块中可用。
    同样,javax/swing/ImageIconjavax/crypto/CipherInputStreamjavax.api 中可用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-29
      • 2013-05-28
      • 1970-01-01
      相关资源
      最近更新 更多