Problem with the Source Code

Hello,

i’‘ve got a problem with the source code. I’‘m a developer which uses the jivesoftware api for an applet. The problem is i can’'t use the jars so i have to use the source code.

I created a package “org.jivesoftware” and in this package two subpackages “smack” and “smackx” and imported all java files of samck and smackx in the from the dev-zip-file.

But he always throws an exception (Exception in thread “AWT-EventQueue-0” java.lang.NullPointerException at)

at the following statement:

DiscoverItems items = discoManager.discoverItems(serviceName);

The weird thing is. If I use the jar files it works fine but with the package with the source code it throws the exception. Did I forget something??

Hope you can help me it’'s very important for me…

Message was edited by: shizzl_chrizzl

Hey shizzl_chrizzl,

It is hard to know what is going on since we don’‘t have access to the complete stack trace of the error. If you can post it it would be easier for us to know what is going on. Anyway, a wild guess is that you are only including java classes and leaving out resources/META-INF or some jar libraries. You can use winzip to inspect the content of the smack.jar and smackx.jar files to be sure that you are including the same content. Moreover, since the error begings with AWT-EventQueue-0" I’'m wondering if this is related to Smack at all? Could it be an error in the UI that you are implementing?

Regards,

– Gato

oh yes that’‘s right i didn’‘t implement the META-INF. Do I also have to use the xmlPull like in the jar because it’‘s allready in java?? And if yes where do I get it from. I couldn’'t find it in den dev package.

And I can’'t use the jars i have to implement the sources…

Message was edited by: shizzl_chrizzl

Out of curiousity why can’‘t you use the jar’'s?