Hi !

i have a problem , i try to use Smack for the First Time , but i have an Error !

that is my Source code :

import org.jivesoftware.smack.*;

public class test1 {


  • @param args


public static void main(String[] args) {

XMPPConnection con;

try {

con = new XMPPConnection(“mathieu-pc”);

con.login(“devel”, “****”);



} catch (XMPPException e) {

// TODO Auto-generated catch block





and the Error : TLS


at org.jivesoftware.smack.SSLXMPPConnection$DummySSLSocketFactory.<init>(SSL

at org.jivesoftware.smack.SSLXMPPConnection.<clinit>( 45)

at java.lang.Class.initializeClass(

at java.lang.Class.isInstance(

at org.jivesoftware.smack.PacketWriter.openStream(

at org.jivesoftware.smack.PacketWriter.writePackets(

at org.jivesoftware.smack.PacketWriter.access$000(

at org.jivesoftware.smack.PacketWriter$ TLS


at org.jivesoftware.smack.XMPPConnection.proceedTLSReceived( 07)

at org.jivesoftware.smack.PacketReader.parsePackets(

at org.jivesoftware.smack.PacketReader.access$000(

at org.jivesoftware.smack.PacketReader$


at org.jivesoftware.smack.SASLAuthentication.send(

at org.jivesoftware.smack.sasl.SASLMechanism.authenticate(

at org.jivesoftware.smack.SASLAuthentication.authenticate( 193)

at org.jivesoftware.smack.XMPPConnection.login(

at org.jivesoftware.smack.XMPPConnection.login(

at org.jivesoftware.smack.XMPPConnection.login(

at test1.main(

No response from the server.:

at org.jivesoftware.smack.NonSASLAuthentication.authenticate(NonSASLAuthentication .java:58)

at org.jivesoftware.smack.SASLAuthentication.authenticate( 223)

at org.jivesoftware.smack.XMPPConnection.login(

at org.jivesoftware.smack.XMPPConnection.login(

at org.jivesoftware.smack.XMPPConnection.login(

at test1.main(

what the problem ?


(sorry for my bad english)

Message was edited by: kedare

Are you using linux? If yes do u have in your native lib path?

Are you using the binary version of Smack ??? If not try to use binary version instead of source one.

What version of Smack are you using?

Let me know

Yes im using Linux

Yes i have this file (but im use the SUN JSDK/JRE)

im using Smack 2.2.1


Now, try to set your java.library.path variable that handles native libs.

So try to add this command in your java command line. ( -Djava.library.path= /user/home/MY_JAVA_NATIVE_LIBS/ )

Java needs some extra declarations when it uses native libraries.

Hope Helped.


are you using the JRE or the JDK? There were and probably are some java / debugger issues depending on the version one is using. Are you running it within Eclipse or an IDE?

You should have these three version, maybe the jdk version is fine.





You wrote: TLS


Then you wrote:

Yes I have this file (but I’'m using the SUN JSDK/JRE)

No you’‘re not. You’'re using the GNU JRE.

It’‘s an incredibly easy mistake to make. In fact, it’‘s almost impossible to avoid. Modern Linux distributions install multiple JREs and set them up through multiple symlinks through /etc/alternatives and /usr/lib/jvm and other locations. It’‘s all very ugly and confusing and it’'s a pet peeve of mine.

But the fact that you got an error from leaves no doubt that (a) you’'re running the GNU JRE and (b) the JRE is able to find and use

The problem is exactly what it says: The GNU JRE does not have an implementation of the TLS Algorithm, so it cannot open a connection to the Jabber server. There are two possible ways to fix this problem: (1) Install an implementation of the TLS Algorithm for the GNU JRE, or (2) use the Sun JRE.

To use option 1, you probably need to install “Jessie”. I think I’'ve seen this solve the problem on a RedHat-based distribution and fail to solve it on a Debian-based distribution. It probably has something to do with the configuration and the way the package was built.

Option 2 also depends on your Linux distribution and Java packages. You might need to do something with a command called update-alternatives. You might need to download and install a package called “something-sun-compat-something”. But it’'s probably as simple as editing your path so that the “java” command runs what you want it to run. You probably need to put something like /usr/java/j*/bin early in your path.

Message was edited by: svalente2