Tag Archive for 'howto'



Using Managed Sessions in Hibernate to Ease Unit Testing

06Nov06

If you’ve ever tried to reuse a session in Hibernate you may have come across this exception…

org.hibernate.SessionException: Session is closed!
at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:49)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1319)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:301)
at [...]

Windows and Mac backups using rdiff-backup

30Oct06

I’ve got two machines that I need to backup, an iMac running OS X 10.0.3 and a Dell running Windows XP. The iMac is the primary home machine with about 13Gb of pictures, music, documents, etc, etc. The Dell is more of a development machine with about 1Gb of files to backup.
I wanted a backup [...]

Where’s JAVA_HOME on my Mac OS X?

13Jul05

I was installing CruiseControl on my Mac the other day when I realized that I needed to have JAVA_HOME set. Running which java returned /usr/bin/java. This was a symbolic link to the file /System/Library/Frameworks/JavaVM.framework/Commands/java. Eventually I figured out that the path I was looking for was /System/Library/Frameworks/JavaVM.framework/Home.

Installing Qt 4.0 on Windows

05Jul05

For anyone who’s tried installing Qt4 on Windows you’ll no doubt have had a few problems. Here’s the steps I had to go through to get it working…

Make sure you have MinGW installed. I’m using version 4.1.0.
Download the file qt-win-opensource-desktop-4.0.0.zip from Trolltech’s website
Extract it to the directory where you want to install Qt, e.g. c:\qt\4.0.0
Open [...]

Installing BerkeleyDB, Apache & Subversion on Debian 3 (woody)

26Mar05

Install Berkeley DB

Go to http://www.sleepycat.com/download/index.shtml and download BerkeleyDB 4.2.52
Download the patches numbered like this patch.4.2.52.?
Extract the BerkeleyDB compressed file
Copy all the patch files into the base directory just extracted
Apply the patches individually using…patch -p0 < [patchfile]
cd into the build_unix directory in the extracted directory
Run…../dist/configure
Run…make
Ensure you’re logged in as root and run…make install (installs to [...]