membrane/soa-model — pull request #23 by g1l3sp (2012-12-22 00:01:52+00:00)
Title: JDK 6 / 7 compatibility fix

Groovy exceptions are troublesome with respect to JDK 6 / 7 compatibility. To summarize the difficulty: JDK 7 added another constructor to exceptions, and when you try to run code that contains Groovy exceptions that were compiled with JDK 6, you get an IncompatibleClassChangeError.

So you just recompile with JDK 7 and you're in good shape, right? Well, yes, unless you want to produce classes that can also run in JDK 6. For our project, being able to build, test and run using both JDK 6 and JDK 7 is important. I'm hoping that predic8 also wishes to preserve JDK 6 compatibility while enabling JDK 7 use.

So what is the fix? Convert your exceptions to plain old Java. See
http://blog.proxerd.pl/article/how-to-fix-incompatibleclasschangeerror-for-your-groovy-projects-running-on-jdk7
http://code.google.com/p/bpipe/issues/detail?id=61
https://github.com/robfletcher/betamax/issues/55
etc.

Fortunately, soa-model-core has only 1 Groovy Exception in it, so conversion was easy.