Problem with HTTP Proxy


I’m using Smack 3.1.0beta1 and tried to add http proxy support to my bot. Here the code :

ConnectionConfiguration connConfig = new ConnectionConfiguration(Configuration.DOMAIN, Configuration.PORT);
if(Configuration.PROXY_HOST != null) {
ProxyInfo proxyInfo = new ProxyInfo( ProxyInfo.ProxyType.HTTP, Configuration.PROXY_HOST, Configuration.PROXY_PORT, null, null);
connConfig.setSocketFactory( proxyInfo.getSocketFactory() );
connection = new XMPPConnection(connConfig);

When there is no proxy it works but when I specify a proxy I got this exception : input contained no data
at org.xmlpull.mxp1.MXParser.fillBuf(
at org.xmlpull.mxp1.MXParser.more(
at org.xmlpull.mxp1.MXParser.parseProlog(
at org.xmlpull.mxp1.MXParser.nextImpl(
at org.jivesoftware.smack.PacketReader.parsePackets(
at org.jivesoftware.smack.PacketReader.access$000(
at org.jivesoftware.smack.PacketReader$

What is the problem ?

Thank you in advance.