With liferay in action and Portlets in action out and the development guide online there is a fair amount of information on developing portlets and other types of Liferay plugins available. However none of these resources offer much guidance on the subject of organizing a large project that consists of multiple plugins. In this post […]
Filtering specific exceptions when using log4j
A while ago I was working on a project where a background job was being triggered every few seconds or so. This job would call a method on a service, that connected to a remote backend, that was regularly unavailable. When the backend was down, the logs would be flooded with long stacktraces every few […]
Debugging the dreaded “SEVERE: Error listenerStart” and “SEVERE: Error filterStart” tomcat error messages
Just a quick post that I hope might benefit others. If you have been developing web applications on tomcat for a while you have likely come the two error messages mentioned in the title: SEVERE: Error listenerStart and SEVERE: Error filterStart. SEVERE: Error listenerStart Occurs when an exception is thrown in the contextInitialized method of a ServletContextListener […]
Make Intellij IDEA behave properly in linux docks
One of my pet peeves when working on Linux has always been that java applications do not work well with popular docks like Docky and Cairo dock. When you add a Java application as a launcher to the dock and use it to launch the application it will still create another icon in the dock, […]
Testing the database layer
The database is an integral part of many applications and writing queries is often hard. For that reason I have always written integration tests for the data access objects or DAO’s that I use to access the database. The way I write my DAO tests has changed a lot over the years and in this […]
Decrease the double click speed for Java Applications on Ubuntu Linux
When running any Java swing application (like intellij idea) on Ubuntu the double click speed is by default set to 200ms. If like me you find this anoying you can decrease the double click speed by taking the following steps In your home directory create a file called .Xresources and add the following line *multiClickTime: […]
Disabling URL rewriting for the Googlebot
Http is a stateless protocol. To work around the problems caused by this, web applications have the concept of a session. When a user requests a webpage for the first time the user is assigned a unique 32 character string. This string can be send along in subsequent requests to indicate that these requests are […]
Too many open files
Today I was asked to review a piece of code that a coworker of mine suspected was causing “Too many open files“ exceptions in a production environment The code looked innocuous enough. He was using ProcessBuilder to create and run an external application. Regardless I booted into Linux and ran some tests. Now on Linux […]
Spring 2.5 and Maven problems
It looks like the spring 2.5 jars that where uploaded to the official maven repository are broken. The full spring jar is 321 kb large and only contains the spring aop classes. Anyway I added springs own repository to my pom and then i got the correct jar and sources <repository> <id>spring</id> <name>Spring Portfolio Repository</name> […]
Extensibility jBPM style
Currently I am involved in a project that is moving away from a proprietary workflow solution to a JBPM based workflow solution. One of the first things I attempted to do was try and make jBPM integrate with the identity management solution used in the project. I knew that jBPM comes packaged with some sort […]