Tag Archives: linux

A little while back I wrote about test driving Tornado development. This is all good and well, but how about getting instant feedback? If you are developing on a Mac or a Linux machine this is certainly possible. I found this great blog post on how to set up a change monitor on a directory that will alert you on test failures using Growl or Notify. Thanks Rodrigo Pimentel for the write up.

Every time I have to install a new Debian system I end up going to half a dozen pages to find all the steps needed to add Java to the system. I usually want to have both Suns JDK and OpenJDK install so that I can switch between them. So here is how to go about installing them.

To install Suns JDK the contrib and non-free repositories to apt. To do this edit /etc/apt/sources.list and add contib non-free to the end of both deb and deb-src ftp repositories. When done the lines should look something like this:

Now run apt-get update to refresh the package list.

Next we will install Suns JDK. Run the command:

Follow the instructions on screen.

Next we need to install Open JDK. Run the command:

Next we need to make sure that the correct JDK is chosen by default when running java. This is done using update-alternatives command. Run the command:

Select the version you want to run. It is useful to remember this command for when you want to change JVM implementation.

That's it. Java is set up and ready to be used.

The past two and a half day, approximately, I have been fighting a battle against internationalisation support in an Oracle database combined with a probably idiotic setting of language/locale/character set in Mandriva.

When I installed the OS I selected to use English as the language and Denmark as the local. I used the default character set of UTF8. The reason for this odd mix is that I live in the very south of Sweden, close to Denmark, but couldn't find Sweden as a selectable country in the install (?!?). I then installed some software projects, one which depends on a local install of the OC4J container.

The container connects to an Oracle database back end. When it does this it picks up the local of the server/work station it's running on and passes this to the Oracle database that then tries to translate the response to the correct encoding before returning it. I'm not going to go in to what I think of this as internationalisation strategy but there has to be some very good reasons to why they came up with it.

The problem occurs when the database server can't find a language/locale/encoding that matched the one the client uses, in my case English/Denmark/UTF8. I suppose there aren't that many that sets up servers or clients that connects to Oracles databases using this odd combination of settings but it took me allot of reading to understand how the Oracle database server deals with internationalisation before I understood what what going on. After having read all the documentation available for Oracles Application Server (not for OC4J since there is no such documentation) and finding out that none of it applied I finally I found something useful. In the Oracle database documentation there is a section on how the database does translations based on the clients language/locale/encoding settings. They are apparently picked up from the underlying OS and for OC4J not changeable at all.

I solved the problem by changing my OS settings to English, UK and UTF8. This seems to be a more common setting. So don't go off and chose odd language/locale/encoding settings if you are going to work with Oracle, they won't understand how it works.

If anyone reading this have had a similar problem but found another solution then I would be interested to know about it. I would also like to understand the rationale behind the way the Oracle databases deals with internationalisation.