0

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]

рüффп
  • 5,172
  • 34
  • 67
  • 113
Joe2013
  • 1,007
  • 1
  • 9
  • 24

1 Answers1

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.

Achim Nierbeck
  • 5,265
  • 2
  • 14
  • 22
  • But this package is available as part of JRE. It is included in jce.jar. So how can I import a JRE library as a optional bundle – Joe2013 Mar 18 '14 at 22:45
  • 1
    Not as optional bundle, but to add it to your package-import as optional dependency. Oh and maybe open an issue at the Pax Logging JIRA, so this is included from future on. – Achim Nierbeck Mar 19 '14 at 07:44
  • yeah seems like a good idea to have this improved in pax-logging – Claus Ibsen Mar 19 '14 at 16:33