Category: Server
-
Rotating Log Files on Apache HTTP Server
PROBLEM Consider the following log configuration:- At some point of time, both error.log and access.log are going to get insanely large. SOLUTION To fix this, the logs can be piped (by using |) to Apache HTTP Server’s built-in program called rotatelogs to rotate the log files. For example, the following configuration will create a daily… Read More…
-
java.lang.NoSuchMethodError: javax/persistence/OneToMany.orphanRemoval()Z
PROBLEM You configure Hibernate using annotations and set orphanRemoval property in @OneToMany. When you run the application, the application server throws the following exception:- In my case, I’m getting this exception when I run on Websphere Application Server (WAS) 7.5. SOLUTION The orphanRemoval property in @OneToMany requires JPA 2.x to work. If you already have… Read More…
-
Managing Log4j Configuration for Both Development and Production Environments
PROBLEM Most of the time, we set the Log4j’s log levels to something lower (debug or info) during our local development. Once it is ready for production, we normally set the Log4j’s log levels to something higher (warn or even error) to prevent meaningless information from flooding the server log. One way to do this… Read More…