The UnknownHostException and A Not-so-obvious Cause

June 9, 2008 – 20:12

The past week has turned out to be the week of “all sorts of weird problems” for me. One of the issues I ran into was that, in a new Ubuntu installation, maven fails to download artifacts from the repository server. After some arm-twisting with maven (people really should start logging the actually exception instead of just printing “unable to download artifact…”), I was able to pinpoint the underlying problem to be an UnknownHostException from trying to resolve the repository server. The strangeness of the situation is, I can access the repo and download the same artifact with firefox, wget, or anything non-java. I can also resolve the repo server name just fine with nslookup. more…

Vmware to Virtualbox Migration Issues

May 20, 2008 – 19:43

In my Kubuntu, I have a Windows XP Professional virtual machine running in Vmware that I use from time to time. Recently I decided to migrate it to VirtualBox. Eventually I got it working, after going through a number of issues. Here goes a recount of them: more…

Why does the GWT compiler require an X server and how to work around it

May 12, 2008 – 20:20

Got this error today when trying to build our little GWT application in linux: more…

Ubuntu 8.04 Upgrade Goes Well, Not Without Issues

May 3, 2008 – 08:46

Upgraded from 7.10 to 8.04 last week. The Upgrade went quite smooth, especially considering I have been running a mixed kde 4/kde 3 setup, with the kde 4 pulled directly from the kde.org repo.
more…

There Is A Geek In Every One Of Us

March 18, 2008 – 18:39

Nick Tosches recounts his year-long quest to find out where the Windows wallpaper ‘Autumn’ was originally taken, and by who.

Ivy 2 beta 2 Adds Maven Metadata Support

March 18, 2008 – 18:33

Ivy 2.0 beta 2 adds an interesting useMavenMetaData switch to its ibiblio resolver. When it’s on (the default actually), Ivy will try and use the maven-metadata.xml for listing the versions available, and for dynamic dependency resolution. This is interesting to me because it makes it a lot easier to run our builds against a proxy repository server like Maven Proxy or Archiva.

Until beta 2, Ivy finds out about the available versions of a module by parsing the directory listing HTML from Ibiblio’s Apache server. That doesn’t work when there is a proxy server sitting in between, because a) the proxy server doesn’t usually proxy directory listing requests, and/or b) the proxy server renders the directory listing in different HTML. Switching to using the structured maven meta data completely eliminated this mess.

Of course, using the maven-metadata.xml files from the official ibiblio repository will subject us to some new hazard - some modules have out-of-date maven-metadata.xml. For instance, by its maven-metadata.xml, the latest version of Hibernate would still be 3.2.0.cr1.

One of those maven proxy servers turns out to be a perfect solution to this problem - we can use them now, remember? :) In my case, I run an Archiva server proxying the official maven 2 repository. Whenever I run into a bad metadata file, I simply request the missing version through Archiva, and it will fetch it and update the metadata file. For example, in the hibernate case, I would just open up Firefox and try to download http://archiva-server/repository/internal/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar. That only needs to be done once, and afterwards Archiva would have updated its local version of the maven-metadata.xml properly.

Could Java 7 Please Add A Subpackage Access Modifier?

January 6, 2008 – 22:34

As we all know, the package hierarchy in Java is a rather superficial one. Package com.foo.pack.sub means nothing special to package com.foo.pack - no more special than com.bar.whatever. It’s something that’s seemingly trivial, but really has been discouraging proper organization of classes and more careful design practices. more…

Spring 2.5’s Unintrusive Annotation-based Configuration

November 14, 2007 – 22:00

Annotation-based configuration isn’t new, but Spring 2.5 adds an interesting twist to it by making it possible to use annotations for wiring, yet without being explicitly tied to any Spring classes. more…

Dual-booters, beware the XP installer.

November 5, 2007 – 21:51

About this time last year, I decided to switch to Linux. I lived happily ever after in (K)Ubuntu, with my original Windows still kept around (one word: games). So after upgrading my workhorse desktop at home a couple of weeks back, I had the opportunity to reinstall both OS’s in a dual-boot setup. The experience from the two setup processes was unbelievably radically different. more…

Log4j 1.2.15: What’s With All These Dependencies?

September 19, 2007 – 16:55

I may not necessarily agree with Weiqi Gao’s opinion that Log4j Must Die, but I have to admit that I really think the new mandatory dependencies added by log4j 1.2.15 are going over the board. To add insult to injury, some of those dependencies - namely com.sun.jdmk.jmxtools and com.sun.jmx.jmxri - aren’t actually available in any public repository due to license reasons. more…