ClassNotFoundException in Whack

Hello,

a few days ago I started to write my very first XMPP Component in Whack. But on the first start I gor the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/xmpp/component/Log
    at de.akuz.xmpp.sms.Main.main(Main.java:9)
Caused by: java.lang.ClassNotFoundException: org.xmpp.component.Log
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    ... 1 more

Are there any dependencies I don’t know about? Because I can’t find org.xmpp.component.Log anywhere except in the openfire source. But this project shouldn’t be an openfire plugin. Or am I missing something else?

Thanks in advance

Hi,

what version of Whack and Openfire do you use and develop for? In the current subversion trunk version of the Whack sources (which I would recommand to use) is the org.xmpp.component.Log class in the source/java/org/xmpp/component folder and should be already included within the Whack package. So I don’t know why do you get a NoClassDefFoundError. But this class is deprecated and only for backwards compatibility reasons there, you shouldn’t use it in new applications. And in Openfire this class was removed in the current trunk version and will be removed in the next release due to OF-53. So you should use the SLF4J facility to manage your logs. I can’t reproduce your error, so if the error continues, please provide more infos, e.g. your de.akuz.xmpp.sms.Main class.

Regards

Guenther

Oh, and if you start to develop a new component with Whack you should have a look in the provided weather example. In my opinion it’s very simple and you can see how the things work.

Thanks for your reply. I was using a downloaded zip package from the page here. But this seemes to be outdated. I will try and check out the svn and see how things work.

At the moment I am not developing for any openfire version because this component should also work on other servers like tigase and ejabberd.

Thanks. The current svn version works fine. But I had to find some other libs to get it running. A small document describing the use and the requirements for whack would be nice.

I have tried the solutions above but did not work in my case! I finally managed to solve the problem by checking the Whack svn and then reference all jar files in the lib/merge folder in the weather example. I hope this hint may help others!

Cheers,

B.

Hi,

The error can be reproduced with Whack 1.0 and Tinder 1.2.2 both available for download here: http://www.igniterealtime.org/downloads/index.jsp. Package org.xmpp.component in Tinder 1.2.2 does not contain Log class. Am I missing something ? Otherwise you may want to update released .jars.

Regards,

Pawel

I was stucked in a programming issue that you ever confronted ,ClassNotFoundException in Whack. It seems that you already solved it , but I can find the right method to fix it even after reading those explaination…So,can you please tell me how to solve it in detai?? Thanks in advance.

I was stucked in a programming issue that you ever confronted ,ClassNotFoundException in Whack. It seems that you already solved it , but I can find the right method to fix it even after reading those explaination…So,can you please tell me how to solve it in detai?? Thanks in advance.

After refrencing all the jars to my project libs ,this error still exist,can you tell me how to solve it in detais…Thanks in advance!