Dependency Injection and the YAGNI principle

April 13, 2014

One of my new personal projects involves writing an application using Node.js and MongoDB. It's going to have a RESTful interface for the services, and MongoDB as the database (I haven't decided about what I'm going to use for the front-end, but Angular.js is a strong contender). I had looked at using mean.io to build it, but after playing with it for a while, it seemed to bring in too many things I wouldn't end up needing, so I decided to build it all from scratch using Restify for the RESTful services.

I'm writing it in an

Continue...

Creating RESTEasy Project with Eclipse and Maven

May 20, 2013

Handy safety tip: to create a RESTEasy-friendly Maven project in Eclipse, do the following:

  1. Create the project as a simple Maven project
  2. In the project Properties -> Project Facets, make the project faceted, and select "Dynamic Web Module" (you may get a NullPointerException, but it doesn't seem to matter). Under "Further Configuration...", point the WebApp directory to be src/main/webapp, and have it create the web.xml file.
  3. Under "Web Content Settings", set the Context root
  4. Under "Deployment Assembly", select "Add...", select "Java Build Path Entries", and select "Maven Dependencies". It should put them in WEB-INF/lib.
  5. Add the

Continue...

VerifyError with JDK 7

May 07, 2013

We had been using nothing higher than JDK 6 with our project up until now, but when I built a new build machine using Fedora 18, JDK 7 was our only real option (okay, that and JDK 5). However, once I got things building using ant, I got the following cryptic error in the unit tests:

java.lang.VerifyError: Expecting a stackmap frame at branch target 41 in method com.m2mci.correlation.CorrelationId.equals(Ljava/lang/Object;)Z at offset 24

After some digging, I found out that the kind folks at Oracle/Sun had changed the bytecode in JDK

Continue...