AnsweredAssumed Answered

Smack 4.1 in android, getting exception "VerifyError" org/jivesoftware/smack/sasl/javax/SASLJavaXMechanism

Question asked by Sarmad on Apr 19, 2015
Latest reply on Mar 14, 2016 by Flow

This is the complete StackTrace, i saw on internet some where that Flow also faced this issue some time in 2011 using aSmack
but I'm not using aSmack. Using Smack 4.1 along with jxmpp:

 

 

Code:

 

   XMPPTCPConnectionConfiguration.Builder connConfig = XMPPTCPConnectionConfiguration.builder();
   connConfig.setSecurityMode(ConnectionConfiguration.SecurityMode.required);
   connConfig.setUsernameAndPassword(USERNAME, PASSWORD);
   connConfig.setServiceName(SERVICE);
   connConfig.setHost(HOST);
   connConfig.setPort(PORT);
   connConfig.setDebuggerEnabled(true);

 

 

 

Exception is on this line:

 

XMPPTCPConnectionConfiguration.Builder connConfig = XMPPTCPConnectionConfiguration.builder();

 

Stack Trace:

 

Process: com.example.samsungchatexample, PID: 2142

 

java.lang.VerifyError: org/jivesoftware/smack/sasl/javax/SASLJavaXMechanism

     at org.jivesoftware.smack.sasl.javax.SASLJavaXSmackInitializer.initialize(SASLJava XSmackInitializer.java:28)

    at org.jivesoftware.smack.SmackInitialization.loadSmackClass(SmackInitialization.j ava:232)

    at org.jivesoftware.smack.SmackInitialization.parseClassesToLoad(SmackInitializati on.java:193)

    at org.jivesoftware.smack.SmackInitialization.processConfigFile(SmackInitializatio n.java:163)

    at org.jivesoftware.smack.SmackInitialization.processConfigFile(SmackInitializatio n.java:148)

     at org.jivesoftware.smack.SmackInitialization.<clinit>(SmackInitialization.java:11 6)

     at org.jivesoftware.smack.SmackConfiguration.getVersion(SmackConfiguration.java:96 )

     at org.jivesoftware.smack.ConnectionConfiguration.<clinit>(ConnectionConfiguration .java:38)

     at com.example.samsungchatexample.MainActivity$4.run(MainActivity.java:202)

    at java.lang.Thread.run(Thread.java:841)

 

These are the jars which i have in project buildpath .. am i missing something ??

 

smack libs.png

 

 

 

 

 

Outcomes