2 Replies Latest reply on Mar 17, 2011 9:18 PM by Freeman(Yue) Fang

    sshd NoClassDefFoundError launching Karaf-client.jar

    Nik Nak Newbie

      Error when launching remote client.

      When I ran "java -jar karaf-client.jar" I received the following error:

       

      Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/sshd/common/RuntimeSshException

      Caused by: java.lang.ClassNotFoundException: org.apache.sshd.common.RuntimeSshException

              at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

              at java.security.AccessController.doPrivileged(Native Method)

              at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

      Could not find the main class: org.apache.karaf.client.Main. Program will exit.

       

       

      Also, the fuse 4.3.1 documentation states that the karaf-client.jar file should be under the installDir/lib folder, however the *Nix install has it under installDir/lib/bin.

        • 1. Re: sshd NoClassDefFoundError launching Karaf-client.jar
          Willem Jiang Master

          Hi,

           

          You need to add below jars into your class path, if you are using Fuse ESB 4.3.1-fuse-00-00.

           

          CLASSPATH="$ESB_HOME/lib/bin/karaf-client.jar"

              CLASSPATH="$CLASSPATH:$ESB_HOME/system/org/apache/sshd/sshd-core/0.4.0/sshd-core-0.4.0.jar"

              CLASSPATH="$CLASSPATH:$ESB_HOME/system/org/apache/mina/mina-core/2.0.0-RC1/mina-core-2.0.0-RC1.jar"

              CLASSPATH="$CLASSPATH:$ESB_HOME/system/org/apache/karaf/shell/org.apache.karaf.shell.console/2.1.3-fuse-00-00/org.apache.karaf.shell.console-2.1.3-fuse-00-00.jar"

           

           

          Willem

          • 2. Re: sshd NoClassDefFoundError launching Karaf-client.jar
            Freeman(Yue) Fang Master

            Hi,

             

            The doc is out of data, karaf-client.jar should be in installDir/lib/bin, I've raised a internal jira for Document team to fix it.

             

            Also, we should have a client script under installDir/bin folder, which set up CLASSPATH for your so you only need use that script so you're all set.

             

            FUSE ESB 4.3.1-fuse-00-00 miss this script but we've already fixed it so next 4.3.1-fuse-01-00 will have it.

             

             

            Freeman