title: No suitable encoder found (java websocket)
body: <p>I have some problem I tried to write some webapplication with websockets for data streaming it's not ready yet but I'm working on it.
  I try to send my server a String and the server should send me the message back with an UUID I first just sended the UUID with </p>
  
  <pre><code>session.getBasicRemote().sendText(uuid.tostring())
  </code></pre>
  
  <p>that worked well but now I try to send a map so I can send the UUID  and the String together by using </p>
  
  <p><code>session.getBasicRemote().sendObject(map);</code> </p>
  
  <p>but now my JS client don't reciev the data I try to send my server throws the exception </p>
  
  <blockquote>
    <p>javax.websocket.EncodeException: No suitable encoder found  </p>
  </blockquote>
  
  <p>I don't know now how to solve this problem.</p>
  
  <p>JS code</p>
  
  <pre><code>var websocket;
  $(document).ready(function(){
      websocket = new WebSocket("ws://localhost:8080/TimeStreamingTestartID-1.0-SNAPSHOT/websockets/simplestockmarket")
  
      websocket.onopen = function(){ 
      alert("SUCESS: REGISTERED!!");
      }
  
  $("#tblcontainer").html('&lt;table id="tableID" class="table table-bordered" &gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Identification&lt;/th&gt;&lt;th&gt;Text&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;/table&gt;')
  $("#start").click(function(){
  
      websocket.send("Test")
      websocket.onmessage = function(erg){ 
      $("#tableID").append('&lt;tr&gt;&lt;td&gt;'+"1"+'&lt;/td&gt;&lt;td&gt;'+erg+'&lt;/td&gt;&lt;/tr&gt;')
      console.log(erg);
      }
  
  });
  });
  </code></pre>
  
  <p>My java onMessage method</p>
  
  <pre><code>    @OnMessage
  public void message(Session session,String message) throws IOException {
      UUID uuid = UUID.randomUUID();
      Map map = new HashMap&lt;&gt;();
      map.put(uuid,message);
  
      try {
          session.getBasicRemote().sendObject(map);
      } catch (EncodeException e) {
          e.printStackTrace();
      }
  }
  </code></pre>