I have a weird problem with getting the type or mode of a presence object.
I’'m using JBuilder 6 and when I get to the line where I get the type or mode, it skips it and gets out of the function and out of my while block, like it encountered some error.
It will help if you could paste the function and the block that you are referring to in your post. From the little context information that I have I guess that you are having a NPE (null pointer exception). My guess is that roster.getPresence(user) is returning null. You could debug your code to find out what’'s going on.
Are you getting a 404 FileNotFound error? Who is printing this message? What does the first and second null mean?
as you can see I’'m using a servlet, but this message
is written after this line is executed, which is
another class (not the servlet class):
Presence p = new Presence(Presence.Type.UNAVAILABLE);
Creating a new Presence does not generate the previous error. It just generates a new instance in the VM (i.e. no presence is sent to the server). It seems to me that you are having some kind of problem with your webapp and not with Smack.
never mind, I solved my case with a different way, without creating a new presence object, although i have created a presence object somewhere else and it doesn’'t do this error…