From the category archives:

Java

A simple task queue

November 25, 2009

I’m working on a little sample framework - really only to keep my sanity and practice my chosen craft - that allows you to string together tasks in a pipeline for processing. To exercise that framework - to flush out the pros and cons of the implementation - I’m writing a sample application.
The basic idea [...]

Read the full article →

Amazon web services via Grails

October 10, 2009

I just recently noticed that Amazon have changed the way you invoke their Product Advertising API - you now need to sign requests as described in the Example REST Requests.
I obviously haven’t been reading my emails, since the first clue came when I saw:
<Error><Code>MissingParameter</Code><Message>The request must contain the parameter Signature.</Message></Error>
Luckily, they have a java example [...]

Read the full article →

No Scope registered for scope request

June 5, 2009

Recently I was working with some code which defined beans as request scope. Junit tests failed with the following exception while trying to initialize the application context:

Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: …; nested exception is java.lang.IllegalStateException: No Scope registered for scope ‘request’

I found the solution by searching around (unfortunately I didn’t record the [...]

Read the full article →

Trinidad and text wrapping

May 29, 2009

While using Trinidad 1.0.1 I came across a problem where text did not wrap when displaying read only text fields. This meant that everything was pushed off the right hand side of the page.
I had to change the fields from:

<tr:inputText label="#{msgs['message1']}" styleClass="labelRight"
[...]

Read the full article →

Dictating the IDE

May 9, 2009

Having trouble viewing this form? Go to http://formbinder.com/forms/27/Dictating-the-IDE
[field name=formbinder]

Read the full article →

Modifying web.xml in Grails

April 1, 2009

I’m trying out Grails application hosting at Mor.ph with a free developer account. To put up a sample application, I wanted to be able to protect the site with basic authentication so that it won’t be accidentally found and played with. So, following the Mor.ph instructions, I needed to modify web.xml to add security constraints [...]

Read the full article →

Grails Openid plugin and Xerces

March 18, 2009

I just created a grails 1.1 application, and installed the openid plugin. When starting the application, I got the following exception:
2009-03-17 22:25:41,090 [main] ERROR context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘consumerManager’: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.openid4java.consumer.ConsumerManager]: Constructor threw exception; nested exception [...]

Read the full article →

Groovy and Grails books

March 15, 2009

The catalog of Groovy and Grails books keeps growing, so if you are in the market for some, check out these sources:
Pragmatic programmer

Grails
Groovy

Apress

Grails
Groovy

Manning

Grails in Action
Groovy in Action

On Amazon:

Read the full article →

Over typing -Dskip.junit=true

March 13, 2009

I generally prefer Maven2, but I’m currently on a project using a custom ant build script - and I’m over having to type -Dskip.junit=true when I just want to generate a quick jar without running the tests.
To easily switch off tests, I modified ant.bat so that it looks for a command line parameter ’st’ and [...]

Read the full article →

Do you need a Grails developer in Sydney?

February 18, 2009

If you haven’t heard of Grails, head on over to Grails.org and have a look. Grails breaks down the barriers to the Java platform and gives you a highly productive environment for building web applications - and you are always free to utilise plain Java seamlessly.
Having used Grails on my personal projects, and written several [...]

Read the full article →