java.lang.NoClassDefFoundError: javax/crypto/Cipher

╄→гoц情女王★ 提交于 2019-12-11 16:08:57

问题


I am implementing SNMP traps in JBOSS FUSE using log4j and unfortunately getting into an issue as follows. Can any one please advise on what bundle/dependency I need to install to resolve this issue

Caused by: java.lang.NoClassDefFoundError: javax/crypto/Cipher at org.snmp4j.security.SecurityProtocols.addDefaultProtocols(SecurityProtocols.java:152)[244:AbstractionAPI:1.0.0] at org.snmp4j.Snmp.initMessageDispatcher(Snmp.java:225)[244:AbstractionAPI:1.0.0] at org.snmp4j.Snmp.(Snmp.java:251)[244:AbstractionAPI:1.0.0]

Caused by: java.lang.ClassNotFoundException: javax.crypto.Cipher not found by org.ops4j.pax.logging.pax-logging-service [5]


回答1:


Looks like this package isn't imported as optional dependency to pax-logging, as it is provided by the root bundle in Karaf. Therefore you should create a little fragment bundle that will adapt the pax-logging-service manifest, so this package can be imported. The blog about adding custom appenders to Pax Logging might give you a hint on how to create this.



来源:https://stackoverflow.com/questions/22464764/java-lang-noclassdeffounderror-javax-crypto-cipher

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!