I'm trying to use log4j2 for the UDP packet send and receive.
Client side I just use
I have following code in my server.
ByteArrayInputStream bis = new ByteArrayInputStream(recievedPakets);
ObjectInputStream obj = new ObjectInputStream(bis);
LogEvent logEvent = (LogEvent) obj.readObject();
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
log4j 2 is in beta, you should not be using it for 'real' applications yet. If you want help with it, ask in a log4j mailing list.
Given the limited amount of information, looks like your log4j API and implementation jars are not in sync; one of them might be older than the other.
I had a class path problem.
But I have another problem. I can't read the second packet.
I receive java.io.StreamCorruptedException
Tried with Apache forum too without luck. Below is the Apache JIRA.