Eclipse 3.4.1, OSX and Java 1.6

Sunday 2008-12-28

Eclipse application icon

I recently downloaded Eclipse 3.4.1 for Mac OSX, and tried starting it using the eclipse.app icon. It did not work, and I noticed a message in /var/log/system.log telling me that the JVM could not be loaded.

Read the rest of this entry »


J-Fall 2008

Thursday 2008-11-13

NLJUG small dukeLast wednesday I was at J-Fall 2008, a fairly large event for Java programmers in the Netherlands. This event is organized by NLJUG. You can read some of my notes on the different sessions in my public evernote.

Read the rest of this entry »


Spring SystemPropertyInitializingBean

Wednesday 2008-07-23

When using POI in any of your projects, and the application you’re building is a web application, you probably have it running on a Windows machine. If not, you know all about the struggle with the “headless mode” environment setting to tell the JVM how to handle graphics rendering.

I always like to keep my applications as clean as possible to the users. The system administrator is also a user of the software (during installation at least). So I wanted the application to set the environment properties itself, In this case, I built a nice little Spring bean to handle this. The solution is so simple, that it is almost a brilliant display of what Spring can solve for you. Suddenly, all these environment setting problems turned into a simple Spring configuration problem. Here’s how:

Read the rest of this entry »


Ibatis 2.2 Ignores XML encoding

Sunday 2008-07-20

At my company, we’re using Ibatis to do operations on Oracle databases. As most of our software is designed to be international, we keep our XML files in UTF-8 encoding. Recently we discovered that Ibatis had some trouble parsing the XML files when we were using diacritics in them. As it turns out, Ibatis 2.2 actually ignores the “UTF-8″ setting in the XML file header altogether.

This was actually reported as an issue at apache’s issue tracker, and fixed in Ibatis release 2.3 and upward. In the meantime, if you can not swich to a new release because of tight deadlines and no time for regression tests, you can set the file.encoding property to UTF-8, because then Ibatis will parse the XML in the correct encoding.


Tomcat, UTF-8 and the RequestDumperValve

Sunday 2008-07-20

A week ago, we encountered a funny problem where our Tapestry 3.0 application seemed to screw up the encoding of form posts. Every time we tried to post a form with diacritics in the input fields, the data got mangled before reaching the application code.

As it turned out, somebody had turned on the RequestDumperValve in the Tomcat configuration file. The request dumper does not only dump the request, but is also kind enough to mangle the data before handing it over to the servlet for further processing:

Read the rest of this entry »


Hacking Your Way Through Codebases

Wednesday 2008-07-02

I found a nice blog post which describes how it is after you leave school and start programming for a real company. You discover that programming is more like 80% reading and 20% coding.

Read the article at the Tired Architect’s blog titled “Hacking Your Way Through Codebases”.


Layer Violations

Sunday 2008-04-13

Like buildings, software usually a deviation of a standard structure. The architect chooses the structure his design will be based upon. After making design adjustments to the structure to cater the requirements, the architect supervises the builders. Like a building architect, the software architect supervises while walking around in the structure during the build.

Software projects can get so large and complex that the architect can not posibly monitor all the code all the time. This is where te tooling comes in. In this post, I will explain how to use Checkstyle to automatically monitor the basic architectural integrety of the software.

Read the rest of this entry »


Follow

Get every new post delivered to your Inbox.

Join 29 other followers