Wednesday, 23 April 2008

No Dialect mapping for JDBC type: -1

This Hibernate error came at me out of the blue while working on FilmSuggestions.com - I innocently added a constraint to one of my Grails domain models, setting the maxSize of one of the fields to 2000. This changed the table schema making the column type TEXT instead of VARCHAR.

The problem came from a native query:
sessionFactory.getCurrentSession().createSQLQuery(mostPopularFilmsSQL).list()

This selects the TEXT column which results in the error (as described here). Setting the dialect didn't seem to make any difference, so for now I've changed the constraint so it's back to being a VARCHAR.

Sunday, 20 April 2008

Recycling electronic waste - www.thegreenpages.com.au

I've got a couple of old computers and a collection of components that are good for nothing in todays world. But I've had trouble finding somewhere that will take it off my hands and dispose of it in an environmentally friendly way. Imagine my surprise when I saw a google advert on my own blog for http://www.thegreenpages.com.au/ - a directory of Eco friendly organisations which includes a category on recycling.

Hopefully it won't be long before I can clean out some of the rubbish.

Rhythmbox

I've just been playing with RhythmBox for the first time, and am very pleasantly surprised. This application so far takes care of my music and podcast requirements, and also supports the iTunes links you see on so many sites.

You can either copy the iTunes link and add it manually, or in FireFox, clicking on the link pops up a dialog asking what application should be used - specifying /usr/bin/rhythmbox achieves the desired result, and the podcast is added just like that.

Rhythmbox also supports my wifes ipod, which is great for managing that. Although I don't use internet radio, I'd like to and it takes care of that too.

I've still got more to play with, but so far I'm happy and will be sticking with it for the foreseeable future.

(Ubuntu 8.04Beta, Linux Dell Inspiron 1525 Laptop, 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686 GNU/Linux)

Saturday, 5 April 2008

Wordpress error - Allowed memory size of ## bytes exhausted

I just came across a problem using wordpress that stopped everything working - any request to the Wordpress site resulted in a blank page. In the log file for the host, I could see:
PHP Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried to allocate 14592 bytes) in <path to a plugin php file>

Removing the plugin specified just meant that the error was reported for the next plugin.

Searching Google showed many discussions about this problem. Luckily the solution for me was easy enough - as described in this topic:
In <wordpress root>/wp-includes/cache.php I just added:

ini_set("memory_limit","12M");