eclipse - Java XMPP clint with smack 4.1 NoClassDefFoundError: -
i trying write xmpp clint using smack 4.1.1. have added smack jar files build path. using eclipse ide write code.
however, when trying run application noclassdeffounderrors. fixed of these errors adding xpp3, jxmpp , minidns jar files build path. yet, getting following error.
exception in thread "main" java.lang.noclassdeffounderror: org/jxmpp/util/cache/expirationcache @ org.jivesoftware.smack.util.dns.minidns.minidnsresolver.<clinit>(minidnsresolver.java:46) @ java.lang.class.forname0(native method) @ java.lang.class.forname(class.java:274) @ org.jivesoftware.smack.smackinitialization.loadsmackclass(smackinitialization.java:213) @ org.jivesoftware.smack.smackinitialization.parseclassestoload(smackinitialization.java:193) @ org.jivesoftware.smack.smackinitialization.processconfigfile(smackinitialization.java:163) @ org.jivesoftware.smack.smackinitialization.processconfigfile(smackinitialization.java:148) @ org.jivesoftware.smack.smackinitialization.<clinit>(smackinitialization.java:116) @ org.jivesoftware.smack.smackconfiguration.getversion(smackconfiguration.java:96) @ org.jivesoftware.smack.connectionconfiguration.<clinit>(connectionconfiguration.java:38) @ jabbersmackapi.login(jabbersmackapi.java:29) @ jabbersmackapi.main(jabbersmackapi.java:76) caused by: java.lang.classnotfoundexception: org.jxmpp.util.cache.expirationcache @ java.net.urlclassloader$1.run(urlclassloader.java:366) @ java.net.urlclassloader$1.run(urlclassloader.java:355) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:354) @ java.lang.classloader.loadclass(classloader.java:425) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:308) @ java.lang.classloader.loadclass(classloader.java:358) ... 12 more
how fix issue?
in internet, advised use gradle or maven building same. if so, can me how use same? have never used them before.
as per below stack trace
caused by: java.lang.classnotfoundexception: org.jxmpp.util.cache.expirationcache @ java.net.urlclassloader$1.run(urlclassloader.java:366) @ java.net.urlclassloader$1.run(urlclassloader.java:355) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:354) @ java.lang.classloader.loadclass(classloader.java:425) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:308) @ java.lang.classloader.loadclass(classloader.java:358)
it seem missing jxmpp-util-cache-0.5.0-alpha2.jar in class path. download , add jar lib/
directory of application .
in internet, advised use gradle or maven building same. if so, can me how use same?
create meven project in eclipse .if new meven project refer
and add below dependencies pom.xml of meven build project
<dependency> <groupid>org.igniterealtime.smack</groupid> <artifactid>smack-java7</artifactid> <version>4.1.0</version> </dependency> <dependency> <groupid>org.igniterealtime.smack</groupid> <artifactid>smack-tcp</artifactid> <version>4.1.0</version> </dependency> <dependency> <groupid>org.igniterealtime.smack</groupid> <artifactid>smack-im</artifactid> <version>4.1.0</version> </dependency> <dependency> <groupid>org.igniterealtime.smack</groupid> <artifactid>smack-extensions</artifactid> <version>4.1.0</version> </dependency>
for more details refer link
hope you!!!!
thanks!!!
Comments
Post a Comment