Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NoClassDefFoundError: Failed resolution of: Lorg/ietf/jgss/Oid; when call client.connect() #3

Closed
loongwind opened this issue Feb 1, 2019 · 2 comments

Comments

@loongwind
Copy link

loongwind commented Feb 1, 2019

call client.connect() throw NoClassDefFoundError

exception:

W/le.startupname(16110): Unresolved exception class when finding catch block: org.ietf.jgss.GSSException
E/AndroidRuntime(16110): FATAL EXCEPTION: Thread-2
E/AndroidRuntime(16110): Process: com.example.startupnamer, PID: 16110
E/AndroidRuntime(16110): java.lang.NoClassDefFoundError: Failed resolution of: Lorg/ietf/jgss/Oid;
E/AndroidRuntime(16110): 	at com.jcraft.jsch.jgss.GSSContextKrb5.create(GSSContextKrb5.java:55)
E/AndroidRuntime(16110): 	at com.jcraft.jsch.UserAuthGSSAPIWithMIC.start(UserAuthGSSAPIWithMIC.java:125)
E/AndroidRuntime(16110): 	at com.jcraft.jsch.Session.connect(Session.java:470)
E/AndroidRuntime(16110): 	at com.jcraft.jsch.Session.connect(Session.java:183)
E/AndroidRuntime(16110): 	at sq.flutter.ssh.SshPlugin$1.run(SshPlugin.java:156)
E/AndroidRuntime(16110): 	at java.lang.Thread.run(Thread.java:764)
E/AndroidRuntime(16110): Caused by: java.lang.ClassNotFoundException: Didn't find class "org.ietf.jgss.Oid" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.example.startupnamer-YbOYR6B1BxIvTZSHi5YUmw==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.startupnamer-YbOYR6B1BxIvTZSHi5YUmw==/lib/arm64, /data/app/com.example.startupnamer-YbOYR6B1BxIvTZSHi5YUmw==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
E/AndroidRuntime(16110): 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
E/AndroidRuntime(16110): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
E/AndroidRuntime(16110): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/AndroidRuntime(16110): 	... 6 more

code:

   var client = new SSHClient(
      host: "www.xxxx.com",
      port: 22,
      username: "root",
      passwordOrKey: "xxxxx",
    );

    try{
      String re = await client.connect();
      if (re == "session_connected"){
        print("connecte");
      }
    }catch(e){
      print('Error: ${e.toString()}');
    }
@shaqian
Copy link
Owner

shaqian commented Feb 1, 2019

@loongwind
Copy link
Author

add session.setConfig("PreferredAuthentications", "password"); can running
thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants