I have recently been playing with JPA, TopLink and Java DB (Apache Derby if you prefer) to manage date in Java SE applications. And I love those tools! It then dawned to me that I could make things even easier by using Groovy.
Unfortunately, TopLink doesn’t seem to play nice with Groovy as none of my persistent classes can be found by TopLink. I have tried to write the POJO in Groovy, write the POJO in Groovy and compile a .class and finally write the POJO in Java but nothing worked. TopLink keep sending me a
ClassNotFoundException at startup. TopLink finds the
persistence.xml file so it’s not the problem. Incidentally, all my Groovy code works just fine when compiled and ran with javac/java.
Does any of you every tried to use TopLink with Groovy? If so, I’d love to get some help. (And I don’t want to use Hibernate’s JPA implementation by the way :-)
Update: the source code of both Java and Groovy version is available. The Groovy version cannot find the
Person POJO no matter what I do (use a Groovy bean, compile the Groovy source to a .class, use a Java bean, use a Java bean in a JAR, etc.)