4 Replies Latest reply: May 27, 2013 5:00 AM by 1001665 RSS

    Use log4j2 to connect UDP server.

    1001665
      Hi,

      I'm trying to use log4j2 for the UDP packet send and receive.

      Client side I just use

      logger.debug("Test");


      I have following code in my server.


      ByteArrayInputStream bis = new ByteArrayInputStream(recievedPakets);
      ObjectInputStream obj = new ObjectInputStream(bis);
      LogEvent logEvent = (LogEvent) obj.readObject();

      System.out.println(logEvent.toString());


      I get an error from above code -> ClassNotFoundException Error : java.lang.ClassNotFoundException: org.apache.logging.log4j.core.impl.Log4jLogEvent$LogEventProxy


      Can anybody help me please?


      Thanks in advance
      Imesh