Skip to content

Tag: java

Why are log4j classes loaded by two class loaders?

I have a maven project for an application, which I run in a WildFly server. The project has log4j dependencies: I would like to get the LoggerContext like this: However, this results in ClassCastException: After some debugging, I have discovered that the problem is that the class LoggerContext is loaded via t…

netty-incubator-codec-quic: How to get remoteAddress?

I need to know the remote address at the server side. I tried bellow ways and failed: QuicStreamChannel.remoteAddress() returns QuicStreamAddress, which cannot be casted to InetSocketAddress. QuicStreamAddress or QuicConnectionAddress does not contain remote IP address or port at all. class io.netty.buffer.Po…

What is pattern for 2000-11-10T00:00:00+02:00

I need to convert string in 2000-11-10T00:00:00+02:00 format to LocalDateTime object. But when I parse this string to LocalDateTime, it gives error. Which pattern should I use to parse the string to LocalDateTime object? Answer Your string contains time zone and LocalDateTime does not contgain this informatio…

Date conversion format Java to DB different format

I’m making a code in java that executes an Oracle database procedure The format I have to put there in the procedure when I run through the database is dd/MM/yyyy. I have to send this date from my java code using a CallebleStatement setDate with the date yyyy-MM-dd (which is the Date format in java) Whe…