title: Multicasting Error: Multicast Address Not Found
body: <p>I am trying to create a SOAP Client. but keep getting this error. Any ideas why? I tried changing the IP but still same error. </p>
  
  <p><a href="https://i.stack.imgur.com/WfB9c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WfB9c.png" alt="enter image description here"></a></p>
  
  <p>MulticastSocket.Java</p>
  
  <pre><code>  public void joinGroup(InetAddress mcastaddr) throws IOException {
      if (isClosed()) {
          throw new SocketException("Socket is closed");
      }
  
      checkAddress(mcastaddr, "joinGroup");
      SecurityManager security = System.getSecurityManager();
      if (security != null) {
          security.checkMulticast(mcastaddr);
      }
  
      if (!mcastaddr.isMulticastAddress()) {
          throw new SocketException("Not a multicast address");
      }
  </code></pre>
  
  <p>SOAPClient.java</p>
  
  <pre><code>public class MultiThread extends Thread implements ActionListener, KeyListener {
      MulticastSocket socket;
      DatagramPacket packet;
  
      public MultiThread() throws IOException {
          socket = new MulticastSocket(4446);
          InetAddress group = InetAddress.getByName("122.57.153.213");
          socket.joinGroup(group);
      }
  </code></pre>
  
  <p>SOAPCLient.java @ line 80</p>
  
  <pre><code>public SoapClient() throws IOException, RemoteException, NotBoundException, NamingException {      
      setBackground(new Color(0, 153, 76));//three green lines on gui
      JPanel rightSideLayout = new JPanel();//active clients
      rightSideLayout.setBackground(Color.darkGray);    
      JPanel bottomPanel = new JPanel(new BorderLayout());//contains typing field and send button
  
      JLabel label = new JLabel();
      Font font = label.getFont();
      Map attributes = font.getAttributes();
      attributes.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON);
      font  = Font.getFont(attributes);
      label.setFont(font);
      label.setText("\tBhoo Online");
      label.setForeground(Color.WHITE);
  
      setLayout(new BorderLayout(10, 10));
  
      sendButton = new JButton("Send");
      sendButton.setPreferredSize(new Dimension(RIGHT_PANEL_WIDTH, 20));
      line 80   sendButton.addActionListener(new MultiThread());
      mainField = new JTextArea();
  </code></pre>
  
  <p>SOAPClient.java (main)</p>
  
  <pre><code>    public static void main(String[] args) throws IOException, InterruptedException, RemoteException, NotBoundException, NamingException {
      JFrame frame = new JFrame("BhooChat Client");
      SoapClient bhooChat = new SoapClient();
      frame.add(bhooChat);
  </code></pre>