Monday, October 19, 2009

CXF JAX-RS IllegalAnnotationException - Class has two properties of the same name

I am currently using Apache CXF to provide RESTful web services for the Australian PhenomeBank.

I was attempting to assign annotations of private field members of a class as follows:

    private Set<MutationType> mutationTypes  = EnumSet.noneOf(MutationType.class);

What I had forgot to do was assign the XmlAccessorType as follows:

public class SearchCriteria

Thursday, October 15, 2009

Ant OutOfMemoryException

Currently where I work we use Ant to deploy our application to a Tomcat server. Recently, I integrated several new libraries for Apache's CXF web services and reran my ant script to do the deployment and encountered this:

[echo] Deploying to ...

java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(


To resolve this I ended up setting the ANT_OPTS environment variable on my Windows machine as follows:

C:\workspace\PhenomeBank>set ANT_OPTS=-Xmx500m