AnsweredAssumed Answered

java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/security/sasl/Sasl

Question asked by cheng on Oct 19, 2015

I use smack4.1.4 ,but have a problem,Sasl is in jdk, i don't know why.

Log is as follows

 

10-20 10:04:48.150 W/art ( 7272): Unresolved exception class when finding catch block: javax.security.sasl.SaslException

10-20 10:04:48.150 W/System.err( 7272): java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/security/sasl/Sasl;

10-20 10:04:48.150 W/System.err( 7272):     at org.jivesoftware.smack.sasl.javax.SASLJavaXMechanism.authenticateInternal(Unkno wn Source)

10-20 10:04:48.150 W/System.err( 7272):     at org.jivesoftware.smack.sasl.SASLMechanism.authenticate(Unknown Source)

10-20 10:04:48.150 W/System.err( 7272):     at org.jivesoftware.smack.SASLAuthentication.authenticate(Unknown Source)

10-20 10:04:48.150 W/System.err( 7272):     at org.jivesoftware.smack.tcp.XMPPTCPConnection.loginNonAnonymously(Unknown Source)

10-20 10:04:48.150 W/System.err( 7272):     at org.jivesoftware.smack.AbstractXMPPConnection.login(Unknown Source)

10-20 10:04:48.150 W/System.err( 7272):     at com.senyint.android.app.im.service.o.e(Unknown Source)

10-20 10:04:48.150 W/System.err( 7272):     at com.senyint.android.app.im.service.o$a.run(Unknown Source)

10-20 10:04:48.160 W/System.err( 7272): Caused by: java.lang.ClassNotFoundException: Didn't find class "javax.security.sasl.Sasl" on path: DexPathList[[zip file "/data/app/com.senyint.android.app-1/base.apk"],nativeLibraryDirectories=[/data /app/com.senyint.android.app-1/lib/arm, /system/lib, /vendor/lib, system/vendor/lib, system/vendor/lib/egl, system/lib/hw]]

10-20 10:04:48.160 W/System.err( 7272):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)

10-20 10:04:48.160 W/System.err( 7272):     at java.lang.ClassLoader.loadClass(ClassLoader.java:511)

10-20 10:04:48.160 W/System.err( 7272):     at java.lang.ClassLoader.loadClass(ClassLoader.java:469)

10-20 10:04:48.160 W/System.err( 7272):     ... 7 more

10-20 10:04:48.160 W/System.err( 7272):     Suppressed: java.lang.ClassNotFoundException: javax.security.sasl.Sasl

10-20 10:04:48.160 W/System.err( 7272):    at java.lang.Class.classForName(Native Method)
10-20 10:04:48.160 W/System.err( 7272):    at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
10-20 10:04:48.160 W/System.err( 7272):    at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
10-20 10:04:48.160 W/System.err( 7272):    at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
10-20 10:04:48.160 W/System.err( 7272):    ... 8 more

10-20 10:04:48.160 W/System.err( 7272):     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

Outcomes