Client/Server Chat,javafx-working but console shows error : first i just want to say thank you all for your help.
i build a client/chat server with multiple users,it works but the console always shows the same error message despite the fact that the program works.
could you run it and help me figure out what may be the problem?

server code:

    public class Server extends Application{
	private final static int PORT=8000;
	private TextArea ta=new TextArea();
	private Socket socket;
	private ServerSocket serverSocket;
	private LinkedList<HandleClientTraffic> serverToOtherClients=new LinkedList<>();
	private Vector<Integer> v=null;

	
	public void start(Stage primaryStage){
		ta.setEditable(false);
		Scene scene=new Scene(new ScrollPane(ta),450,200);
		primaryStage.setTitle("Server");
		primaryStage.setScene(scene);
		primaryStage.show();
		primaryStage.setAlwaysOnTop(true);
		primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>() {
			
			@Override
			public void handle(WindowEvent event) {
				Platform.exit();
				System.exit(0);	
			}
		});
		
		
		new Thread(()->{
			try {
				serverSocket=new ServerSocket(PORT);
				Platform.runLater( () ->
		        { ta.appendText("MultiThreadServer started at " 
		          + new Date() + '\n');
		        });
				
				while(true){
					socket=serverSocket.accept();
					Platform.runLater(()->{
			            InetAddress inetAddress=socket.getInetAddress();
			            ta.appendText("Connection from Socket[addr="+inetAddress.getHostAddress()+
			            		".port="+inetAddress.getHostName()+".localport="+PORT+"] at "+new Date());
					});
					
					HandleClientTraffic t= new HandleClientTraffic(socket);
					serverToOtherClients.add(t);
					t.start();
				}
				
				
				
				
			} catch (Exception e) {
				e.printStackTrace();
			}
			
		}).start();
	
	
	}
	
	class HandleClientTraffic extends Thread{
		private Socket socket;
		private String userName="";
		private ObjectOutputStream outputToClient;
		ObjectInputStream inputFromClient;
		boolean connect=true;
		
		public HandleClientTraffic(Socket socket){
			this.socket=socket;
		}
		
		
		public void run() {
			try {
				outputToClient=new ObjectOutputStream(socket.getOutputStream());
				inputFromClient=new ObjectInputStream(socket.getInputStream());
				
				//Get name
				userName=(String)inputFromClient.readObject();
				ta.appendText("\n"+userName+" enter the chat\n");

				for(int i=0;i<serverToOtherClients.size();i++){
					serverToOtherClients.get(i).updateContant();
				}
				
				while(true){
					int sizeIndicator=(Integer)inputFromClient.readObject();
					String getText=(String)inputFromClient.readObject();
					if(sizeIndicator!=0){ 
						v=new Vector<Integer>();
						for(int i=0;i<sizeIndicator;i++){
							v.addElement((Integer)inputFromClient.readObject());
						}
						Platform.runLater(()->{
							ta.appendText(userName+":"+getText+"\n");
							for(int i=0;i<v.size();i++){
								int indexSend=v.get(i);
								HandleClientTraffic a=serverToOtherClients.get(indexSend);
								try{
									if(a.connect){
										a.outputToClient.writeObject(userName+":"+getText+"\n");
									}
								}catch(Exception e){
									e.printStackTrace();
								}
								
							}
							
						});
					}else{ //0=to all
						Platform.runLater(()->{
							ta.appendText(userName+":"+getText+"\n");
							for(int i=serverToOtherClients.size();--i>=0;){
								HandleClientTraffic a=serverToOtherClients.get(i);
								try{
									if(a.connect){
										a.outputToClient.writeObject(userName+":"+getText+"\n");
									}
								}catch(Exception e){
									e.printStackTrace();
								}
								
							}
							
						});
						
						
					}
					
					
									
				}
				
				
			}catch(SocketException ss){
				try{
					connect=false;
					String theName=userName;
					socket.close();
					Platform.runLater(()->{
						ta.appendText(theName+" has left the chat!\n");
					});
					for(int i=0;i<serverToOtherClients.size();i++){
						HandleClientTraffic a=serverToOtherClients.get(i);
							if(a.connect){
							a.outputToClient.writeObject(theName+" has left the chat!\n");}
					}
				}catch(IOException ioe){
					
				}
			}
			catch(ClassNotFoundException er){
				System.out.println("class not found problem,in server class");
			}
			catch (IOException e) {
				System.out.println("input or output stream problem,in server class");
			}
			
			
			
		}//run
		
		public String getUserName(){
			return userName;
		}
		public ObjectOutputStream getOutputToClient(){
			return outputToClient;
		}
		public ObjectInputStream getInputFromClient(){
			return inputFromClient;
		}
		public void updateContant(){
			
			try{//Get current online users
			outputToClient.writeObject("#");//sign
			outputToClient.flush();
			outputToClient.writeObject(serverToOtherClients.size());
			outputToClient.flush();
			for(int i=0;i<serverToOtherClients.size();i++){
				outputToClient.writeObject(serverToOtherClients.get(i).userName);
				outputToClient.flush();}
			}catch(IOException ef){}
		}
	}
	
	public static void main(String[] args) {
		launch(args);
	}
	
	
}

client code:

    public class Client extends Application{
	private TextField tfName=new TextField();
	private TextField tf=new TextField();
	private TextArea ta=new TextArea();
	private Socket socket;
	private ObjectInputStream inputFromServer=null;
	private ObjectOutputStream outputFromClient=null;
	private ListView<String> listView=new ListView<String>();
	private String myName;
	
	public void start(Stage primaryStage){
		BorderPane mainPane=new BorderPane();
		ta.setEditable(false);
		tf.setEditable(false);
		listView.setPrefSize(100,70);
		listView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
		GridPane gridPane=new GridPane();
		gridPane.add(new Label("Name"), 0, 0);
		gridPane.add(new Label("Enter text"), 0, 1);
		gridPane.add(tfName, 1, 0);
		gridPane.add(tf, 1, 1);
		gridPane.add(new Label(" Send to\n specified users "),2,0);
		gridPane.add(new Label("Current online users"),3,0);
		gridPane.add(listView,3,1);
		mainPane.setTop(gridPane);
		mainPane.setCenter(new ScrollPane(ta));
		
		Scene scene=new Scene(mainPane);
		primaryStage.setTitle("Client");
		primaryStage.setScene(scene);
		primaryStage.show();
		primaryStage.setAlwaysOnTop(true);
		primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>() {
			
			@Override
			public void handle(WindowEvent event) {
				Platform.exit();
				System.exit(0);	
			}
		});
		
		
		tfName.setOnAction(e->{
			try {
				outputFromClient.writeObject(tfName.getText().trim());
				outputFromClient.flush();
				myName=tfName.getText().trim();
				ta.appendText("Server:Hi "+tfName.getText().trim()+"!\n");
				tfName.setText("");
				if(!tf.isEditable()){
				tf.setEditable(true);
				tfName.setEditable(false);
				}
				
				
			} catch (Exception e1) {
				e1.printStackTrace();
			}
			
		});
		
		tf.setOnAction(e->{
			try {
				ObservableList<Integer> oList=listView.getSelectionModel().getSelectedIndices();
				if(oList.size()!=0){
					outputFromClient.writeObject(oList.size());
			        outputFromClient.flush();
			        outputFromClient.writeObject(tf.getText());
					outputFromClient.flush();
					for (Integer i:listView.getSelectionModel().getSelectedIndices())
			        { 
			          outputFromClient.writeObject(i);
			          outputFromClient.flush();
			        }
					
				}else{
					outputFromClient.writeObject(0);
			        outputFromClient.flush();
					outputFromClient.writeObject(tf.getText());
			        outputFromClient.flush();
				}
				tf.setText("");
			} catch (Exception e1) {
				e1.printStackTrace();
			}
			
			
			
		});
		
		try {
			socket=new Socket("localhost",8000);
			inputFromServer=new ObjectInputStream(socket.getInputStream());
			outputFromClient=new ObjectOutputStream(socket.getOutputStream());
			new handleMessagesFromServer().start();
		}catch(SocketException ee){
			ta.appendText("Problem with socket\n");
			try{
				socket.close();
			}catch(IOException e2){
				System.out.println("can't close client's socket,in client class");
			}
		}
		catch (Exception e1) {
			e1.printStackTrace();
		}
		
	}
	
	
	
	
	public static void main(String[] args) {
		launch(args);

	}
	class handleMessagesFromServer extends Thread{
		
		public void run(){
			while(true){
				String textFromServer;
				try {
					textFromServer = (String)inputFromServer.readObject();
					if(textFromServer.equals("#"))//sign that we need to modify ListView
					{
						int nSize=(Integer)inputFromServer.readObject();
						for(int i=0;i<nSize;i++){
							String aName=(String)inputFromServer.readObject();
							if(!(listView.getItems().contains(aName))){
							listView.getItems().add(aName);
							}
						}
						
					}else{//just a simple text
					Platform.runLater(()->{
					ta.appendText(textFromServer);
				});
					}
				} catch (ClassNotFoundException | IOException e) {
					//e.printStackTrace();
					System.out.println("here");
				}
			}
			
		}
		
	}


}
