Monday, 22 September 2008

groovy maven netbeans jetty facebook spring

Time to rewrite my old wishlist facebook application.

The old one (v3.x) dont work anymore as the web services are gone, I took them offline many months ago. The new application will use the wishlist 4.x web services running on

Tech stack for this project will be:

Language: groovy.
Build tool: maven.
Web server: jetty (maven plugin).
IDE: netbeans (6.5, with groovy plugin and maven plugin).
Framework: spring (+mvc and WebServices).

So really, only groovy is new compared to the other wishlist projects, but it will be nice to see groovy interact with them.

Already hitting some snags with groovy, maven and netbeans. Seems to be a few posts on how to use netbeans and groovy, or maven and groovy, but not all 3 together.

May at some stage try grails.

Friday, 19 September 2008

groovy spring annotation


Groovy supports well spring's annotations.
Spring's dynamic language tags are also handy.

But I wish there was some dynamic language annotation!

As in eg, I have a Service written in Groovy such as:

class PersonService {


blah blah ...


wouldn't be nice if I could:

class PersonService {


blah blah ...


thus enabling it to be a refreshable bean without xml!

Sunday, 14 September 2008

No value specified for parameter when using MySQL with JPA/Hibernate

I came across a problem when swithching database for a project from HSQLDB to MySQL.

I am using memory based HSQL for unit tests.
I am using file based HSQL for development testing.
I have changed my integration tests to using MySQL from file based HSQL.
Final production release will probably use MySQL or Firebird.
(This isn't commercial work, so no Oracle in any stack...)

But when I switched to MySQL, JPA/Hibernate starting complaining about: No value specified for parameter 2. As usual the generic multiple vendor reasons for using JPA/JDBC usually is not true...

Was a bit dumbfounded with this error, but eventually found the solution :

As it turns out there is a bug in the version of Hibernate that I use.

I depend on
    <artifactId>hibernate-   entitymanager</artifactId>

And this version in the maven repositories was uploaded with wrong transparent dependency to hibernate, which is buggy.

But the quick fix is to change my own dependency management to use version 3.2.6.

Thus this change solved the problem:

Maven causes problems, but also solves problems...

Friday, 12 September 2008

Copying message to Sent folder?

Problem sending email in Thunderbird?

Encountered this problem a few times, so thought I'd blog my about my last solution to this.

Frequently people when trying to send email with the Thunderbird mail client, are not able to do so, and a popup with the text "Copying message to Sent folder" are forever present on the screen.

There are many causes for this symptom (1,2,3,4,5), and several solutions (1,2,3,4,5,6). It seems it is a problem the Mozilla mail clients have suffered for a long time.

In my last encounter, which was a family "helpdesk" case, so VNC session across the sea. :)

As mentioned the problem was that the "Copying message to Sent folder" message was continuously displayed, so the sender had no indication whether the mail was sent or not. It was. But never copied to the Sent folder. Nor by canceling where they able to save it to the Drafts folder.

What seemed to be the problem was the selection of where the Sent and Drafts folders where. In Tools/Accont Settings and Copies and Folders. They had it set to the default, ie. eg. the "Sent" of each account. This had worked for a long while before.

But by changing this to the custom option, and manually choosing the Sent folder, solved the problem! I also had to create the Sent folder for one account, and a Drafts folder in the local account.

No doubt, Ill re-encounter this in the future, hopefully Ill remember to check my own blog...

Wednesday, 10 September 2008

find cool t-shirts

Ive set up a shop for t-shirts, shirts and jumpers. Its at

Most likely myself, friends and family will be the most interested, but the general public may find them funny, so help yourselves!?

There are some longsleeved shirts and hoodies, some tops for woman, but mostly t-shirts. Most are branded with flurdy logos. Prices are in british GBP at the moment.

These are generally shirts I would buy myself, maybe other share my taste... Here is one of my t-shirts:

Monday, 8 September 2008

find friends, spam friends, next family

I use facebook to link up with old friends and collegues. Now less and less, as not much happens on it anymore, as most friends I know that are likely to be on are now on it and have found all their likely friends. So now it is quieter than the rush of last year.

The novilty has worn off, people have already caught up with old friends, the funny apps have now worn off, they need another reason to check facebook so they need a big push to keep people checking the site.

The events organiser needs to expand perhaps, as only some people use it. Have it integrate with other tools and calendars (google/Outlook), merge with marketing do's, football fixtures. SMS notifications etc. My other suggestion is upTo soon to be at, an application for people to list what they would like to do. Not explicitly every time, but more "at weekends i am up for a game of football", or "fridays I would agree to go out for a drink". So when you think right I fancy going to a concert this weekend, you can quickly see which of your friends could be interested. A quick poll later and you got your gang. is good as well. Other people probably have had more use out it for creating business proposals, but I find it usefull as a career aid and whom to contact regarding certain situations etc. is very slick. More aimed at pure recruiting. More usefull for the american, californian people, however as its run by my old flat mate Mo, I am biased.

Today I found, very nice. Again a data privacy situation like facebook and linkedin, but I am already pumping in my family tree! Think they will quickly grow their users, as people have to put in family hence spread the network, as opposed to optionally spam friends on other sites.

Friday, 5 September 2008

Snakes and Adders. And what is that?!

Nice adder on the steps upto our summer cabin in Norway a few weeks ago, before going up the stairs! Further delaying us getting into the house. Then it decided to go under the cabin, which really reassured us...
Poisonous, but don't kill you unless you are really unlucky.

However this one might do:

(Not the blue pipe, but the orange snake by the wall.)

This was in Vietnam, on the slopes down from Dalat towards the coast. We had stopped for a break in our cycling trip from Saigon to Hanoi, and I really needed the toilet... We spotted this snake sliding into the men's toilets. A local Vietnamese man inside spotted the snake and ran out. That reassured me as I still needed to go into the toilet...

Since the snake was going and out the holes on one side, I decided to sneak into the cubicles on the other side. But when I checked them out, they were very dark and full of mosquitos. Since this was still far inland, and off the beaten track, I now had a choice between malaria and dengue fever or a snake bite from a snake that the locals seemed to fear...

Better the devil you know, so I put out some centuries and a very quick pit stop on the snake side!

Still wonder what type of snake it is. Brown orange body, 1.5m long. Was not able to identify it by looking up some sites on the net. Probably some expert will tell me it is a harmless grass snake, but as the locals were not chuffed about it, I decided not to cuddle it.

Thursday, 4 September 2008

Off to javazone!

JavaZone is on again next week. Complete geekfest, but I still enjoy it.

Tend to be very excited the first day, attending most presentations and then start missing a few the second day which is the last day. Spending more time in the stands chatting to companies, trying to blag freebies instead. The first evening also has social events in the evening, which Ive avoided before, as it seemed quite geeky and I was new to this country. Also last year clashed with a football match, which I went to my local pub to watch instead. But suppose Im a geek as well, and Ill have a few pints at least, especially if they are free..

Back to work afterwards I am usually very keen to try all the new technologies and methods.
A few days later dissapointed that I wont have to time investigate most of them.
And a week or two later, forgotten most...

But I do usually pick up something, which does improve my abilities, and then usually able to apply it to work. If not immidietly, I usually apply it to some of my hobby projects instead. Which then usually I reuse at work sometime later, when a new project starts. So I think the two days of non invoicing is worth it in the long run.

Excited to hear or even meet people which work you read on the net. People from Springsource, Google and Sun et al. Last year it was good fun to see the JavaPosse people, listen to Matt Raible, who's work always seem to encounter the same issues I have.

Attended several Mule presentation's last year(2007). Including one by Ross Mason himself, although the one by two guys from Atos Origin, Jos Dirksen and Tijs Rademakers, was much more useful. But even though I think it is a great product, I still haven't had the time to implement it anywhere yet.

Wish those damn 36hour days would soon be standard...