java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserFactory

Hello guys,

I just downloaded the smack 4.0 and try to run a simple helloworld type problem. On creating XMPPConnection i am getting following error.

Exception in thread “main” java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserFactoryat org.jivesoftware.smack.SmackConfiguration.processConfigFile(SmackConfiguration. java:321)at org.jivesoftware.smack.SmackConfiguration.processConfigFile(SmackConfiguration. java:316)at org.jivesoftware.smack.SmackConfiguration.(SmackConfiguration.java:148) at org.jivesoftware.smack.XMPPConnection.(XMPPConnection.java:113)at XMPP_test.main(XMPP_test.java:22)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:43)at java.lang.reflect.Method.invoke(Method.java:601)at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

Well the documentation clearly mention that no additional libraries are required… I am not sure if I have to add some other libraries.

Thanks.

xpp3 is no longer bundled since Smack 4, you need to add it to your classpath.

Well the documentation clearly mention that no additional libraries are required

Where is this stated, so we can fix it?

it is mentioned in

https://igniterealtime.org/builds/smack/docs/latest/documentation/gettingstarted .html

"smack-core.jar – provides core XMPP functionality and is the only required library. All XMPP features that are part of the XMPP RFCs are included."

It’s also stated in the README.html of the download package.

And the changelog.html does not contain any 4.0.0 information.

Oh, and the 4.0.0 download also contains 4.1.0 alpha jars. Is that intentional?

Thanks for pointing this out. Fixed in the 4.0 branch.

I get this same error in Smack 4.1.6.

Anyone could help?