Thursday, 13 March 2008

Getting mysql gui tools working on ubuntu 7.10

I had three hurdles to get over to get mysql gui tools to work.

1. My first problem was that I got the error

/bin/sh: bad interpreter: Permission denied

when I tried running mysql-administrator

This was because my mounted directory did not have exec permissions. Adding 'exec to the row in /etc/fstab, then umount & mount solved this.

/dev/hdb1 /media/d_drive auto rw,user,exec 0 0

2. My next problem was the following error:

./mysql-administrator

(mysql-administrator-bin:7476): Gtk-WARNING **: Unable to locate theme engine in module_path: "ubuntulooks",
Fontconfig warning: line 32: unknown element "cachedir"
Fontconfig warning: line 33: unknown element "cachedir"
Fontconfig warning: "/etc/fonts/conf.d/80-delicious.conf", line 18: invalid match target "scan"
./mysql-administrator-bin: symbol lookup error: /usr/lib/libbonoboui-2.so.0: undefined symbol: g_once_init_enter_impl

I eventually found this. The fix is right at the end.
To cut a long story short.

cd to where you have unpacked the gui tools
mv lib lib_
& if
/etc/mysql/conf.d does not exist
mkdir /etc/mysql/conf.d

3. My third and hopefully last problem was that I could not connect to localhost:3306
However I could connect to 127.0.0.1:3306
My /etc/hosts looked like this.

127.0.0.1 localhost
127.0.1.1 billspc

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
I am not sure if this is a good fix but the cure was to comment out the line

#::1 ip6-localhost ip6-loopback

Wednesday, 5 March 2008

IntelliJ Live Templates for Eclipse

D you miss all those IntelliJ Templates when in Eclipse.

If so, then go thekua.com for all the instructions you need.

UnitTest and spring-mock or spring-test

I have just installed spring 2.5.1

I wanted to create some unit tests and all the sites I found referred to spring-mock.jar.

It is now spring-test.jar.

You will find it in the directory spring-framework-2.5.1/dist/modules after you have extracted the zip. I downloaded spring-framework-2.5.1-with-dependencies.zip although I see they have gone to 2.5.2 already.

Tuesday, 26 February 2008

Eclipse on ubuntu throws ClassNotFoundException



I have just performed a fresh install on my pc with the latest ubuntu 7.10 (Gutsy Gibbon). After installing Eclipse I got the following Exception java.lang.ClassNotFoundException: org.eclipse.core.runtime.Plugin

The problem is that the default java that is installed is not compatible.

ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 2008-02-26 14:52 /usr/bin/java -> /etc/alternatives/java

The solution is to install the latest version of java from www.sun.com
and change the java link in /usr/bin. I installed this in /tools/java6 and then created a link called java

cd /tools
sudo ln -fs /tools/java6 java
cd /usr/bin
sudo mv java java_alternatives
sudo ln -fs /tools/java/jdk/bin/java

Welcome

After several years of taking the michael out of a long lasting friend & colleague Andrew Beacock I have come to realise the benefits of blogging to all. Andrews blog has come to be an invaluable resource for our team. So here goes with my little contribution.