tiger154 / jwebsocket

Automatically exported from code.google.com/p/jwebsocket
1 stars 0 forks source link

org.jwebsocket.tcp.engines.TCPEngine could not be loaded. #205

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Create individual JWebSocketServerListener

JWebSocketFactory.start();

I expect that TCP engine should be started successfully.
Instead I see error as 
WARN  - JWebSocketConfig: jWebSocketTCPEngine-0.10.jar not found
ERROR - JWebSocketXmlConfigInitializer: jWebSocket engine class 
org.jwebsocket.tcp.engines.TCPEngine could not be loaded.

What version of the product are you using? On what operating system?
jWebSocket-1.0 , Windows 7

Please provide any additional information below.
I did not find jWebSocketTCPEngine-0.10.jar 

-----------------------------------------------------------

Below is my code

public class JWebSocketServerListener implements WebSocketServerTokenListener {

    private TokenServer tokenServer;

    public TokenServer getTokenServer(){
        return tokenServer;
    }

    public void init(){
        try {
            // the following line must not be removed due to GNU LGPL 3.0 license!  
            JWebSocketFactory.printCopyrightToConsole();  
            // check if home, config or bootstrap path are passed by command line  
            JWebSocketConfig.initForConsoleApp(new String[]{"ts0", "tcp0"});
            JWebSocketFactory.start();
            tokenServer = (TokenServer)JWebSocketFactory.getTokenServer();
            if(tokenServer != null){
                System.out.println("Server found");
                tokenServer.addListener(this);
            }else{
                System.out.println("Server not found");
            }
        } catch (Exception exception) {
            exception.printStackTrace();
        }
    }

   public static void main(String[] args) {
       JWebSocketServerListener server = new JWebSocketServerListener();
       server.init();
   }

    @Override
    public void processToken(WebSocketServerTokenEvent arg0, Token arg1) {
        // TODO Auto-generated method stub

    }

    @Override
    public void processClosed(WebSocketServerEvent arg0) {
        System.out.println("Manual connection closed "+arg0.getSessionId());
    }

    @Override
    public void processOpened(WebSocketServerEvent arg0) {
        // TODO Auto-generated method stub

    }

    @Override
    public void processPacket(WebSocketServerEvent arg0, WebSocketPacket arg1) {
        System.out.println("Packet processing"+arg1.getString());

    }
}

Original issue reported on code.google.com by tajane....@gmail.com on 16 Jan 2014 at 1:08

GoogleCodeExporter commented 9 years ago
Also I did not found any documentation or guidelines to be followed for 
implementation of jWebSocket. I want to use it for Java client and not through 
Json or JavaScript 

Original comment by tajane....@gmail.com on 16 Jan 2014 at 1:10