Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-313

Netconf-CLI packaging is broken

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Won't Do
    • None
    • None
    • netconf
    • None
    • Operating System: All
      Platform: All

    • 7149

    Description

      Following instructions from https://github.com/opendaylight/netconf/tree/master/netconf/tools/netconf-cli to run netconf-cli resulted in error:

      java -jar target/netconf-cli-1.2.0-SNAPSHOT-executable.jar
      Error: A JNI error has occurred, please check your installation and try again
      Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
      at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:314)
      at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:268)
      at java.util.jar.JarVerifier.processEntry(JarVerifier.java:316)
      at java.util.jar.JarVerifier.update(JarVerifier.java:228)
      at java.util.jar.JarFile.initializeVerifier(JarFile.java:383)

      This seems like some of dependency (probably xtext) is signed and it's signature is attached into uber JAR. This is then treated as invalid signature by JAR verifier.

      As a workaround I tried to remove signature information from META-INF:

      zip -d target/netconf-cli-1.2.0-SNAPSHOT-executable.jar META-INF/ECLIPSE_.SF
      zip -d target/netconf-cli-1.2.0-SNAPSHOT-executable.jar META-INF/ECLIPSE_.RSA

      Now, it yields another error:
      java -jar target/netconf-cli-1.2.0-SNAPSHOT-executable.jar
      Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
      at org.opendaylight.netconf.cli.io.ConsoleIOImpl.<clinit>(ConsoleIOImpl.java:32)
      at org.opendaylight.netconf.cli.Main.main(Main.java:48)
      Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 2 more

      Is this tool broken or instructions I followed are incorrect?

      tested on latest master branch.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            JMorvay Jakub Morvay
            rkosegi@brocade.com Richard Kosegi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: