Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Need help with Xsocket(error : E/dalvikvm(1686): Could not find class)
Need help with Xsocket [message #871395] Sun, 13 May 2012 08:42 Go to next message
starnight pinazzo is currently offline starnight pinazzoFriend
Messages: 3
Registered: May 2012
Junior Member
Hi all
i want to add xsocket plugin in Eclipse SDK, Version: 3.7.2, Build id: M20120208-0800
i download xSocket-2.8.15.jar ( the lastest version)

I add this jar file in the plugin folder of Eclipse, and this error appear:
E/dalvikvm(1686): Could not find class 'org.xsocket.connection.NonBlockingConnectionPool'

i add too
xSocket-2.8.15-sources.jar and
xSocket-multiplexed-2.1.7.jar

in my project i import the NonBlockingConnectionPool such as
import org.xsocket.connection.NonBlockingConnectionPool;

when i execute my project for test it , the application crashed and this error appear

E/AndroidRuntime(1686): java.lang.NoClassDefFoundError: org.xsocket.connection.NonBlockingConnectionPool

i'm sure the pb was caused by the class no found, but i don't know how doing it Sad


Can someone help me ?

sp : sorry i'm french and i know my english is not perfect ^^
Re: Need help with Xsocket [message #871404 is a reply to message #871395] Sun, 13 May 2012 11:42 Go to previous messageGo to next message
starnight pinazzo is currently offline starnight pinazzoFriend
Messages: 3
Registered: May 2012
Junior Member
I forgot to inform that's i want use it for connect to a OpenWebNet serveur ( domotic serveur)

my script is :
import java.io.IOException;
import java.net.SocketTimeoutException;
import org.xsocket.connection.INonBlockingConnection;
import org.xsocket.connection.MaxConnectionsExceededException;
import org.xsocket.connection.NonBlockingConnectionPool;

public class OpenWebNetClientPoolConnection
{
	public static final int MAX_CONNECTION = 50;
	public static final String DEFAULT_HOST = "192.168.1.120";
	public static final int DEFAULT_PORT = 29900;
	public static final long DEFAULT_TIMEOUT = 30 * 1000L;
	private static OpenWebNetClientPoolConnection _instance;
	private NonBlockingConnectionPool poolConnection;
	private String host;
	private int port;
	
	
	private OpenWebNetClientPoolConnection(String host, int port)
	{
		poolConnection = new NonBlockingConnectionPool();
		poolConnection.setMaxActive(MAX_CONNECTION);
		this.host = host;
		this.port = port;
	}
	
	public static OpenWebNetClientPoolConnection getInstance()
	{
		if (_instance == null)
		{
			_instance = new OpenWebNetClientPoolConnection(DEFAULT_HOST,DEFAULT_PORT);
		}
		return _instance;
	}
	
	public static OpenWebNetClientPoolConnection getInstance(String host, int port)
	{
		if (_instance == null)
		{
			_instance = new OpenWebNetClientPoolConnection(host,port);
		}
		return _instance;
	}
	
	public OpenWebNetClient newOpenWebNetClient() throws SocketTimeoutException, MaxConnectionsExceededException, IOException
	{
		INonBlockingConnection connection = poolConnection.getNonBlockingConnection(this.host, this.port);
		return new OpenWebNetClient(connection);
	}

	public OpenWebNetClient newOpenWebNetClientMonitor() throws SocketTimeoutException, MaxConnectionsExceededException, IOException
	{
		INonBlockingConnection connection = poolConnection.getNonBlockingConnection(this.host, this.port);
		return new OpenWebNetClient(connection, true);
	}
	
	public void destroyConnection(OpenWebNetClient client) throws IOException
	{
		NonBlockingConnectionPool.destroy(client.getConnection());
	}
	
	
}
Re: Need help with Xsocket [message #871430 is a reply to message #871395] Sun, 13 May 2012 16:11 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
On 05/13/2012 03:42 AM, starnight pinazzo wrote:
> Hi all
> i want to add xsocket plugin in Eclipse SDK, Version: 3.7.2, Build id:
> M20120208-0800
> i download xSocket-2.8.15.jar ( the lastest version)
> I add this jar file in the plugin folder of Eclipse, and this error appear:
> E/dalvikvm(1686): Could not find class
> 'org.xsocket.connection.NonBlockingConnectionPool'
>
> i add too xSocket-2.8.15-sources.jar and xSocket-multiplexed-2.1.7.jar
>
> in my project i import the NonBlockingConnectionPool such as
> import org.xsocket.connection.NonBlockingConnectionPool;
> when i execute my project for test it , the application crashed and this
> error appear
>
> E/AndroidRuntime(1686): java.lang.NoClassDefFoundError:
> org.xsocket.connection.NonBlockingConnectionPool
>
> i'm sure the pb was caused by the class no found, but i don't know how
> doing it :(
>
>
> Can someone help me ?
>
> sp : sorry i'm french and i know my english is not perfect ^^
>
Are you developing an Android application? If so, you probably need to
ask your question in an Android support forum. The Eclipse forums don't
provide Android support. Google chose to use the Eclipse platform for
their tools to run on, but Eclipse doesn't provide support for Android
tools or development.
Re: Need help with Xsocket [message #871434 is a reply to message #871430] Sun, 13 May 2012 16:59 Go to previous message
starnight pinazzo is currently offline starnight pinazzoFriend
Messages: 3
Registered: May 2012
Junior Member
yes but i thinking it's a eclipse solution implementation not android
thx for your answer
Previous Topic:Exit code 13
Next Topic:John
Goto Forum:
  


Current Time: Thu Apr 25 17:11:46 GMT 2024

Powered by FUDForum. Page generated in 0.09443 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top