JSF & Java Blog

Discussion on Java and JSF, including Spring, Maven, Eclipse and Jenkins

Posts Tagged / xerces



Newer jQuery with Richfaces

Richfaces 3.3 comes with jQuery 1.3.2 and so you may find you want to use some newer features of jQuery that are only available in a later version. It is actually very easy to use a newer version of jQuery with Richfaces by simply including the newer version and then putting it into noConflict mode and assigning it to a new variable. You can then use the newer jQuery version by referring to …


Guava ImmutableMap Spring bean

I previously had some maps defined as Spring beans in my applicationContext.xml file. An example of a basic Map is shown below:

I wanted to make these all immutable and so Guava’s ImmutableMap seeemed the logical Map type to use. However, ImmutableMap is abstract so you can’t just do the following:

Instead, thanks to help from Paul Reeves, …


Spring MVC 406 status code from AJAX requests

Recently after upgrading from Spring MVC 3.1.2.RELEASE to 3.2.0.RELEASE, all of our AJAX requests stopped working, and instead returned a 406 status code ( see here for status code meanings ). We were using Jackson 2.1.2, the following snippet from the pom.xml file shows the two dependencies:




com.fasterxml.jackson.core …


Using Reflection to print out an object

This is really old news but I always forget which class to use when I need to provide a toString method that uses reflection to print out all the classes values

ToStringBuilder.reflectionToString in the apache commons library gives this functionality.



public String toString() {

return ToStringBuilder.reflectionToString(this);


We are currently starting to …


Preventing Maven Plugin Mojo running multiple times for multi module projects

Amongst other tasks, in development we have a need occasionally to copy static content files into our web root from a network location.

We decided to create a maven plugin to allow these tasks to be setup quickly on the command line (rather than having a collection of batch scripts to do this).

Our maven project is a multi module project with a layout similar to this:


web …


Beware what you put in the endorsed dir!

We use docflex to build our XSD documentation, integrating with maven to produce XSD documentation in our maven site reports.

I recently had to upgrade some developers from docflex-re 1.8.0 to 1.8.5, this migration went fine.

For some reason it didn’t on my machine.

I received the following error:

java.lang.NoClassDefFoundError: org/apache/xml/resolver/CatalogManager

Anyway …