java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildListener

August 28th, 2010

When trying to put together a jar file on Ubuntu Lucid with gant, I got this:

java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildListener
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
        at java.lang.Class.getMethod0(Class.java:2670)
        at java.lang.Class.getMethod(Class.java:1603)
        at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java                  :99)
        at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130)
Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.BuildListener
        at org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:156)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:128)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 6 more

After also installing the ant package everything worked fine…

Canon Err 01 – fixed itself

August 16th, 2010

Last week I went out and took my 550D with me to take some pictures. Unfortunately when I switched it on and tried to taka a pic it gave me this:

Err 01: Communications between camera and lens is faulty. Clean the lens contacts.

Just to be sure I had a look but as clean as it can be – I only have the 15-85 EF-S so I never fiddle with lenses.

A colleague of mine brought his 450D with 50 EF lens to the office. After putting on the 50 mm lens my 550D would still give me the Err 01. So it was clearly an issue with the camera and not the 15-85. After putting the 15-85 back on, everything started worked again like nothing had happened.

This behaviour demonstrates that the Err 01 issue is likely to be caused by some software problem, static electricity or something similar.

The camera had been working fine for a whole month in the US, however this was the first time after I was there that I used it again. I’m guessing the electronics might have had a glitch either on the airport during X-ray scanning, or during transatlantic flight…

Anyway, problem solved (for now) ;-)

Make iscsitarget listen on specific address

August 13th, 2010

I set up iscsitarget on one of my Ubuntu Lucid boxes and it seemed to work. I let one of my VMware ESX hosts scan it, and it sure enough found my LUN, but via two paths.

Turned out that because the host running iscsitarget has two NICs, the ESX host sees two paths. Not exactly what I wanted, because one NIC sits on the internet, the other on the dedicated iSCSI network.

Unfortunately it is not possible to configure ietd to listen to a specific address by editing any of the configuration files (/etc/default/iscsitarget and /etc/ietd.conf), you have to hack the init script to be able to do this…

Edit /etc/init.d/iscsitarget and go to the function ietd_start(), then change this line:

start-stop-daemon --start --exec $DAEMON --quiet --oknodo

to:

start-stop-daemon --start --exec $DAEMON --quiet --oknodo -- --address 10.10.1.1

(or whatever IP you want to have it listen to).

Dell Latitude 2110 running Windows 7 64 bit

June 5th, 2010

Dell Latitude 2110
Last week I received a shiny new Dell Latitude 2100 netbook.
I picked this laptop to replace our old D610s, which cannot run Windows 7.
As soon as I deployed my Windows 7 64 bit image onto it, I saw that a lot of devices were missing a driver.
Unfortunately the Dell support site does only lists 32 bit Windows 7 drivers when you select Latitude 2110 as your model :( However, some of the installers you download actually include both 32 and 64 bit drivers. Eventually I managed to get everything going:

Dell wireless 375 Bluetooth Module

Driver from 32 bit Windows 7 list also contains 64 bit driver.

Dell WLAN card

Driver from 32 bit Windows 7 list (for 1397, 1501, 1520, 15xx WLAN half minicard) also contains 64 bit driver.

Onboard gigabit NIC

Drivers on Dell site are only 32 bit. You will have to download a driver directly from the Broadcom site.

Graphics card

The listed Dell driver for the Intel GMA3150 video card is only 32 bit, so you will have to download that directly from the Intel site.

Free fall sensor

This is one of the unknown devices. The listed Dell driver (ST Microelectronics DE351DL) contains 64 bit drivers as well.
Strange to have this in a laptop with SSD, but I guess it just comes with the motherboard or something.

Card reader

This is the SD card reader on the front. The listed Dell driver (Realtek RTS5208) contains 64 bit drivers as well.

The 64 GB SSD disk is a Samsung and luckily this disk has firmware VBM24D1Q, which is known to support the TRIM command.

Google Apps IMAP migration

May 22nd, 2010

I have recently moved to Google Apps.
One of the nice things is that you can have IMAP access so you can keep using the MUA of your choice.

If you have the paid version (Premier Edition), IMAP migration can be done smoothly using the migration tools, which suck messages from your old IMAP account and transfer them into your Google Apps account. This has some interesting benefits, such as de-duplication of messages. I used to copy all incoming mail (after spam etc filtering, just before it hit my INBOX) to an ‘All’ mailbox in my old IMAP account. I could then keep my INBOX clean by just deleting messages, which were still available in the ‘all’ box. This was of course not very efficient, and in the end it contained about 100.000 messages which were well over 2 GB. After migration to Google Apps, all double message were removed, and instead they just received an extra tag ‘All’. Very cool.

If you have the free edition, you will have to do the transfer yourself. There are command line tools such as imapsync, which work most of the times.
You can also configure two IMAP account in your MUA, and then copy folders over. Whatever method you use, there are a few things that can screw up the migration, and that should be fixed prior to any migration attempt. If you don’t, you migration will fail somewhere half way, and your MUA might or might not inform you what actually went wrong.

Messages greater than 20 MB cannot be stored

The easiest way to fix this is to remove those messages from your mailbox and copy the attachment to your computer. Sending such huge message is highly questionable at all, and the good thing is that once you are in Google Apps, you are not allowed to such ridiculous stuff any more.

IMAP folder names cannot exceed 40 characters

implication of the fact that IMAP folders are merely a representation of labels, which cannot exceed 40 characters.
Hence the total IMAP folder name cannot exceed 40 characters. Also, each level counts as a character, because it is represented by a separator (/) in the label.
This can seriously impact your migration. I am amazed at the IMAP folder structures people have build-up over the years, this can get really insane.

The extreme on one side is a single folder of 40 characters, the extreme on the other side is a nested structure of 20 one character folders:

No more than 1800 IMAP folders are migrated

You are not likely to run into this limit, but hey, don’t underestimate the average user ;-)

H.264 Encoding for Android

January 8th, 2010

After some experimenting it turned out that H.264 video needs to be encoded using the Baseline Profile for the HTC Hero (running Android 1.5) to be able to play it.
High Profile will not play at all on the phone. Main Profile will play, but gives an entirely green video – unusable.

VLC H264 performance issues – solved

January 5th, 2010

This summer I took my Dell Latitude D830 with me on holiday to view the movies that I recorded with a Panasonic HD video camera.
Frustratingly enough, in France it turned out to be impossible to play them on my laptop :( Spent hours fiddling with every imaginable setting. At home everything worked fine though.
Yesterday I had packed my stuff to go watch a movie at a friend’s house, and when checking the downloaded MKV again I noticed that VLC had huge problems playing it, both 720p and 1080i H264 files.
Everything started working when I accidentally swapped power supplies. Turns out the D830 (maybe other models too) severely slows down when you use the small 65 Watt power supply.
Tip: ONLY use the 90 Watt model, unless you want to experience Pentium 4 speeds

Sysprep Windows 7 & Secunia PSI

November 30th, 2009

I am cooking up an unattended Windows 7 installation image for our users. This is done by carefully preparing a Reference VM using the Audit Mode. This basically means it logs on as administrator, and after sysprepping with the new CopyProfile option, this becomes the profile for newly created users.

I ran into an issue that when the newly created user logs in after installation, Secunia PSI is not started any more.

The reason is that if you install it in Windows 7 (and probably in Vista as well), PSI is not a real service, but merely a task that runs with highest privileges at logon. The task is configured to run with the credentials of the user that installed it – in this case Administrator. However, that account is wiped during sysprep, hence the task cannot be run.

Since I consider Secunia PSI to be vital, I searched around but no solution. I guess because PSI is not meant to be sysprepped and all, and you need Secunia’s corporate version (CSI) for that.
Since CSI was not a suitable solution in our scenario, I worked around quite nicely.

In the sysprep unattended xml file, define a script to be run right after initial logon of the new user. This is done using the FirstLogonCommands option. Suppose it is C:\tmp\runonce.bat.

The new Task Schedular in Windows Vista and 7 is able to import and export its tasks as XML files. The trick is to remove the existing task, which is using the Administrator account, and create a new one using the same XML code, but with the credentials changed to the new user.

Since there is no sed/awk in Windows, I had to resort to a vbscript called SearchAndReplace.vbs, which you can download here: http://www.ericphelps.com/scripting/samples/

The relevant part of my runonce.bat looks like this:

C:\tmp\SearchAndReplace.vbs C:\tmp\Secunia.txt Administrator %USERNAME%
schtasks /delete /TN "Secunia PSI Logon Task"
schtasks /create /TN "Secunia PSI Logon Task" /xml C:\tmp\Secunia.txt

The Secunia.txt is an XML export of the original Secunia PSI Task, and has the string Administrator. This is replaced by the new user, and then imported back. For some obscure reason, the search/replace does not work when the file has an xml extension – that is why I use txt – whatever. You can create it yourself using schtasks.exe.

After the next reboot or logoff-logon PSI will happily start up :-)

Bootcamp FAT32 vs. NTFS

October 28th, 2009

When installing Windows XP on a Mac, BootCamp creates a FAT32 partition for Windows, with ID “BOOTCAMP”.
When you remove that partition during the Windows installation process, and replace it with an NTFS one, Windows will happily install, but fail upon reboot with:

Windows could not start because the following file is missing or corrupt:
\system32\hal.dll
Please re-install a copy of the above file

The trick to get this working, is to leave the partition schema intact, and only reformat the filesystem.
What you should do, is select the FAT32 BOOTCAMP partition to install Windows on, then pick this option:

Format the partition using the NTFS file system (Quick)

Then press F to format the drive

This should give you a working Windows XP installation.

‘Onze welvaart is geleend’

September 5th, 2009

Op vrijdag 14 augustus verscheen in de HP/De Tijd een interview met Kees de Kort.

Kees de Kort (52), financieel analist bij AFS Capital Management en beurscommentator bij BNR Nieuwsradio, staat bekend als somberste econoom van Nederland. Een gesprek over onterechte koersstijgingen en falende toezichthouders. ‘De reĆ«le economie staat er nu nog slechter voor en dat kan nog lang duren.’
Lees hier het volledige artikel (PDF).