Hi,

I'm trying to use UDP server to log my messages. For this I use LOG4J2.
But I got below error in the server side.

ClassNotFoundException Error : java.lang.ClassNotFoundException:
org.apache.logging.log4j.core.impl.Log4jLogEvent$LogEventProxy


Below is my server side code.


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

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


Below is my pom.xml file dependency.

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.0-beta4</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.0-beta4</version>
</dependency>




Thanks in advance,
Imesh