Unable to get the canonical Fitnesse example to run - java.lang.NoClassDefFoundError - fitnesse

This test is from the Fitnesse user guide.
!path /Users/mpalanisamy/learningfitnesse/myProject/bin/myPackage
!path /Users/mpalanisamy/learningfitnesse/myProject/src/myPackage
!path /Users/mpalanisamy/Downloads/fitnesse-standalone.jar
!path /Users/mpalanisamy/Downloads/FitNesseRoot
!define TEST_SYSTEM {fit}
!|DivisionFixture|
|num|denom|quotient()|
|1|2|0.5|
|1|2|0.6|
|4|2|2.0|
And the system-under-test, and fixture code is as follows -
Division.java
package myPackage;
public class Division {
private double numerator;
private double denominator;
public Division(double a, double b){
this.numerator = a;
this.denominator = b;
}
public double divide(){
return this.numerator / this.denominator;
}
}
DivisionFixture.java
package myPackage;
import myPackage.Division;
public class DivisionFixture extends fit.ColumnFixture{
public double num, denom;
private Division d = new Division(num, denom);
public double quotient(){
return d.divide();
}
}
/Users/mpalanisamy/learningfitnesse/myProject/bin/myPackage - contains my .class files
/Users/mpalanisamy/learningfitnesse/myProject/src/myPackage - contains my .java files
When I run this test, I get the following error -
java.lang.NoClassDefFoundError: DivisionFixture (wrong name: myPackage/DivisionFixture)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at fit.FixtureLoader.loadFixtureClass(FixtureLoader.java:66)
at fit.FixtureLoader.instantiateFixture(FixtureLoader.java:59)
at fit.FixtureLoader.instantiateFirstValidFixtureClass(FixtureLoader.java:82)
at fit.FixtureLoader.disgraceThenLoad(FixtureLoader.java:43)
at fit.Fixture.loadFixture(Fixture.java:142)
at fit.Fixture.getLinkedFixtureWithArgs(Fixture.java:134)
at fit.Fixture.doTables(Fixture.java:79)
at fit.FitServer.process(FitServer.java:81)
at fit.FitServer.run(FitServer.java:56)
at fit.FitServer.main(FitServer.java:41)
The execution log has this -
/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/java -cp /Users/mpalanisamy/Downloads/fitnesse-standalone.jar:/Users/mpalanisamy/learningfitnesse/myProject/bin/myPackage:/Users/mpalanisamy/learningfitnesse/myProject/src/myPackage:/Users/mpalanisamy/Downloads/fitnesse-standalone.jar:/Users/mpalanisamy/Downloads/FitNesseRoot fit.FitServer my_mac.local 53339 3863
- which tells me that my classpath is right, or that Fitnesse is aware of it.
FWIW, all files have rwxr-xr-x permissions.
Given the above, why do I get the NoClassDefFoundError error?
I have scoured through StackOverflow and incorporated most of the fixes, and still not able to get this simple example to run. Given the nature of the error, I am thinking the solution is something silly on my part, and / or related to configuration.
A screenshot of what I am seeing, in case that is helpful -

The problem turned out to be classpath, as the error indicated.
I had to change the classpath to the following -
!path /Users/mpalanisamy/learningfitnesse/myProject/bin
!define TEST_SYSTEM {fit}
And change the first line of my test table to -
!|myPackage.DivisionFixture|

Related

Thymeleaf and Micronaut Views error when using Layout dialect

We are running Micronaut with Thymeleaf views and the Layout dialect (we add it manually by overriding Micronaut's ThymeleafFactory). Below are the dependencies (Micronaut version is 3.2.7):
implementation 'io.micronaut.views:micronaut-views-core:3.1.2'
implementation 'io.micronaut.views:micronaut-views-thymeleaf:3.1.2'
implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:3.0.0'
The problematic code is this:
<html layout:decorate="~{/layout-top}">
This seems to work fine when running with ./gradlew run, but crashes when running from a fat (shadow) jar using java -jar .... This would point to classpath issues, but we couldn't figure out what would those be.
Below the error message when running the shadow jar:
Caused by: groovy.lang.MissingMethodException: No signature of method: io.micronaut.views.thymeleaf.WebEngineContext.getOrCreate() is applicable for argument types: (String, nz.net.ultraq.thymeleaf.layoutdialect.context.extensions.IContextExtensions$_getPrefixForDialect_closure1) values: [DialectPrefix::org.thymeleaf.standard.StandardDialect, nz.net.ultraq.thymeleaf.layoutdialect.context.extensions.IContextExtensions$_getPrefixForDialect_closure1#26b0c4d0]
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:70)
at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:148)
at nz.net.ultraq.thymeleaf.layoutdialect.context.extensions.IContextExtensions.getPrefixForDialect(IContextExtensions.groovy:54)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:54)
at org.codehaus.groovy.runtime.metaclass.NewInstanceMetaMethod.invoke(NewInstanceMetaMethod.java:54)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:247)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139)
at nz.net.ultraq.thymeleaf.layoutdialect.models.extensions.IProcessableElementTagExtensions.equalsIgnoreXmlnsAndWith(IProcessableElementTagExtensions.groovy:60)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:54)
at org.codehaus.groovy.runtime.metaclass.NewInstanceMetaMethod.invoke(NewInstanceMetaMethod.java:54)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:247)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:148)
at nz.net.ultraq.thymeleaf.layoutdialect.decorators.DecorateProcessor.doProcess(DecorateProcessor.groovy:103)
at org.thymeleaf.processor.element.AbstractAttributeModelProcessor.doProcess(AbstractAttributeModelProcessor.java:77)
We debugged this and isolated the failing code in nz.net.ultraq.thymeleaf.layoutdialect.context.extensions.IContextExtensions:
static String getPrefixForDialect(IContext self, Class<IProcessorDialect> dialectClass) {
return self.getOrCreate(DIALECT_PREFIX_PREFIX + dialectClass.name) { ->
def dialectConfiguration = self.configuration.dialectConfigurations.find { dialectConfig ->
return dialectClass.isInstance(dialectConfig.dialect)
}
return dialectConfiguration?.prefixSpecified ?
dialectConfiguration?.prefix :
dialectConfiguration?.dialect?.prefix
}
}
It seems that the IContext argument is not what's supposed to be, but we couldn't really find the root cause for this. Nor why this is behaving differently with the two different methods of running the same code.
Upon further investigation, we discovered that this is related to this bug in the shadow jar plugin: https://github.com/johnrengelman/shadow/issues/490
The library thymeleaf-layout-dialect is using a nz.net.ultraq.extensions:groovy-extensions:1.1.0
which, in turn, registers some Groovy extensions through META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
The shadow jar plugin doesn't handle these correctly (it only handles META-INF/groovy/... paths).
As per ticket comments here https://github.com/johnrengelman/shadow/issues/490 , there is a workaround, but it's deeply unpleasant.

Story Not Found error while running a test using Jbehave Junit

I have configured my Jbehave test project and has a .story file in the project. I tried using the configuration settings as I found on the internet but when I run the tests, it gives me an error, the stack trace is shown below
org.jbehave.core.io.StoryResourceNotFound: Story path 'D:\AutoRegression8.8\NewProject\src\BusinessCase1.story' not found by class loader sun.misc.Launcher$AppClassLoader#631d75b9
at org.jbehave.core.io.LoadFromClasspath.resourceAsStream(LoadFromClasspath.java:80)
at org.jbehave.core.io.LoadFromClasspath.loadResourceAsText(LoadFromClasspath.java:65)
at org.jbehave.core.io.LoadFromClasspath.loadStoryAsText(LoadFromClasspath.java:74)
at org.jbehave.core.embedder.PerformableTree.storyOfPath(PerformableTree.java:261)
at org.jbehave.core.embedder.StoryManager.storyOfPath(StoryManager.java:61)
at org.jbehave.core.embedder.StoryManager.storiesOf(StoryManager.java:92)
at org.jbehave.core.embedder.StoryManager.runStoriesAsPaths(StoryManager.java:86)
at org.jbehave.core.embedder.Embedder.runStoriesAsPaths(Embedder.java:213)
at org.jbehave.core.junit.JUnitStories.run(JUnitStories.java:20)
at TestRunner.run(TestRunner.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
However, I have my .story file in the same location at which the code tries to find it. To find the .story file, I have used the below code:
#Override
protected List<String> storyPaths() {
/*
* return new StoryFinder().findPaths(
* CodeLocations.codeLocationFromClass(this.getClass()), "**.story",
* "");
*/
String placetoSearch = System.getProperty("user.dir") + "\\src\\BusinessCase1.story";
/*return new StoryFinder().findPaths(CodeLocations.codeLocationFromClass(this.getClass()), placetoSearch, "");*/
return Arrays
.asList(placetoSearch);
}
Any help or reference in this regard would be appreciated.
There's a difference between looking for a file, and looking for a resource.
JBehave uses the classloader you set it up with to look for the story as a resource. A resource is normally part of the packages you're running. That means it needs a filename relative to the root of your classes, rather than an absolute path.
(If you were using myClass.getResource() rather than myClassLoader.getResource() it would be relative to your class.)
You can also use unix-style slashes if you want to. Try "/BusinessCase1.story" as the filename.

JAVACV : Webcam capturing using javacv

Tried to capture from a webcam using the JAVACV library. But it throws an UnsatisfiedLinkError.
Stack trace is as follows:
Exception in thread "main" java.lang.UnsatisfiedLinkError:
C:\Users\anooj\AppData\Local\Temp\javacpp7955905460040\jniopencv_core.dll: %1 is not a valid Win32 application
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1928)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1825)
at java.lang.Runtime.load0(Runtime.java:792)
at java.lang.System.load(System.java:1059)
at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:418)
at com.googlecode.javacpp.Loader.load(Loader.java:368)
at com.googlecode.javacpp.Loader.load(Loader.java:315)
at com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:131)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.googlecode.javacpp.Loader.load(Loader.java:334)
at com.googlecode.javacv.cpp.opencv_imgproc.<clinit>(opencv_imgproc.java:96)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.googlecode.javacpp.Loader.load(Loader.java:334)
at com.googlecode.javacv.cpp.opencv_highgui.<clinit>(opencv_highgui.java:91)
at com.googlecode.javacv.OpenCVFrameGrabber.start(OpenCVFrameGrabber.java:170)
at javaapplication16.JavaApplication16.captureframe(JavaApplication16.java:24)
at javaapplication16.JavaApplication16.main(JavaApplication16.java:38)
Java Result: 1
Our code is below:
import com.googlecode.javacv.OpenCVFrameGrabber;
import com.googlecode.javacv.cpp.opencv_core.IplImage;
import static com.googlecode.javacv.cpp.opencv_highgui.cvSaveImage;
public class JavaApplication16 {
/**
* #param args the command line arguments
*/
public static void captureframe()
{
OpenCVFrameGrabber grabber=new OpenCVFrameGrabber(0);
try
{
grabber.start();
IplImage img=grabber.grab();
if(img!=null)
{
cvSaveImage("capture.jpg", img);
}
}
catch(Exception ae)
{
ae.printStackTrace();
}
}
public static void main(String[] args) {
captureframe();
}
}
Make Sure you have installed Microsoft Visual C++ Redistributable
package and setup path variable correctly. Below link explains all
the necessary steps
http://opencvlover.blogspot.in/2012/04/javacv-setup-with-eclipse-on-windows-7.html
Use VideoInputFrameGrabber instead of OpncvFrameGrabber as suggested
in link below
http://code.google.com/p/javacv/wiki/Windows7AndOpenCV#I_cannot_capture_from_my_Webcam_using_opencv_highgui_or_OpenCVFr
Remember that the version of openCV and javaCV must match.
Download latest version openCV 2..46 http://opencv.org/downloads.html
and download the javacp https://code.google.com/p/javacv/downloads/list [Note: choose the javacv-0.6-cppjars.zip 85.0 MB]
In this case you will not get Exception in thread "main" java.lang.UnsatisfiedLinkError:
My Code is running successfully.
see this link to solve the error you got Link1
see this link for the program to capture the image from camera, save it in a JPG format and show it on a canvas Link2
hope it solves your query.

Getting compile error in integration testing with "Getting Started with Grails" ebook

I'm going through the "Getting Started with Grails" ebook and have hit a wall with chapter 4 (Validation) on page 38 (actual page 50). Here is the code:
Oh, there might be a typo in the code in the book, though it didn't affect the behavior or error messages I got, on the following line:
def code = badField?.codes.find {
it == 'race.startDate.validator.invalid'
}
As I said, it doesn't affect the main execution, but was just curious if I'm right or if this is something in Groovy I haven't run across yet. I put what I thought it should be below.
package racetrack
import groovy.util.GroovyTestCase
class RaceIntegrationTests extends GroovyTestCase {
void testRaceDatesBeforeToday() {
def lastWeek = new Date() - 7
def race = new Race(startDate:lastWeek)
assertFalse "Validation should not succeed", race.validate()
// It should have errors after validation fails
assertTrue "There should be errors", race.hasErrors()
println "\nErrors:"
println race.errors ?: "no errors found"
def badField = race.errors.getFieldError('startDate')
println "\nBadField:"
println badField ?: "startDate wasn't a bad field"
assertNotNull "Expecting to find an error on the startDate field", badField
def code = badField ?: codes.find {
it == 'race.startDate.validator.invalid'
}
println "\nCode:"
println code ?:"the custom validator for startDate wasn't found"
assertNotNull "startDate field should be the culprit", code
}
}
where, when running "grails test-app", I get the following:
Error executing script TestApp: java.lang.RuntimeException: Could not load class in test type 'integration'
java.lang.RuntimeException: Could not load class in test type 'integration'
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:391)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:590)
at gant.Gant.executeTargets(Gant.groovy:589)
Caused by: java.lang.RuntimeException: Could not load class in test type 'integration'
at _GrailsTest_groovy$_run_closure4.doCall(_GrailsTest_groovy:261)
at _GrailsTest_groovy$_run_closure4.call(_GrailsTest_groovy)
at _GrailsTest_groovy$_run_closure2.doCall(_GrailsTest_groovy:228)
at _GrailsTest_groovy$_run_closure1_closure21.doCall(_GrailsTest_groovy:187)
at _GrailsTest_groovy$_run_closure1.doCall(_GrailsTest_groovy:174)
at TestApp$_run_closure1.doCall(TestApp.groovy:82)
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
... 10 more
The book is using Grails 1.2.x and I'm using 1.3.x and already noticed some discrepancies between the versions (nothing unsurmountable), so it could be something like that, but I can't seem to figure it out. Being new to Groovy and Grails isn't helping! :-D
Can anyone explain what I can do to get past this?
I just got this error, my cause was that my test class was in the wrong package.
I could not find a way to get a clearer description of the problem, even running with the --stacktrace option showed no more information.
It seems like this error can be caused by different compilation issues, perhaps?
I had the same problem (although I'm using Grails 2.3.4) - I fixed it by explicitly including
import racetrack.Race
instead of
package racetrack
Interestingly, after I tried this I commented it out and everything still worked - until I did a grails clean. Then it failed again. Suspect something not quite 100% in the grails / groovy auto compilation stuff.
I hit this problem with Grails 2.4.2. The cause was I had a test file named FooTest, but the class was named FooTest**s**.
Running grails test-app --stacktrace helped find the offending class.
First of all, I don't think you need this to be an 'integration' test. Place it under the 'src/test/unit/...' directory structure. Second of all, if you want to test the Grails 'validate()' method that is going to be injected by the Grails framework based on your 'constraints' block, you must make the test extend 'GrailsUnitTest' and call 'mockDomain(Race)' on the first line of your unit test method. If that is unclear, ping me and I'll post code but my guess is your book has a pretty good example of this. Here is some 'free hand' code that might fix it...
class RaceTests extends GrailsUnitTest {
void testRaceDatesBeforeToday() {
mockDomain(Race)
...
please make sure that your package name is correct, the above error means that its trying to run the test but since the package name is specified wrong its not able to find the file with that particular package name.

UrlMappingsTests - Could not load class in test type 'integration'?

I'm trying to create a UrlMappingsTest for my grails project, and I'm getting the following exception:
java.lang.RuntimeException: Could not load class in test type 'integration'
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:391)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:590)
at gant.Gant.executeTargets(Gant.groovy:589)
My class is pretty simple, and I tried to follow the example. What's going on?
import grails.test.GrailsUrlMappingsTestCase
class UrlMappingTests extends GrailsUrlMappingsTestCase {
// static mappings = UrlMappings
void testForwardingUrls(){
assertForwardUrlMapping( "/rest/users/stefan/files", controller: "file", action: "allFiles" );
}
}
With the static line uncommented, I get
[groovyc] You attempted to reference a variable in the binding or an instance variable from a static context.
[groovyc] You misspelled a classname or statically imported field. Please check the spelling.
[groovyc] You attempted to use a method 'UrlMappings' but left out brackets in a place not allowed by the grammar.
[groovyc] # line 7, column 21.
[groovyc] static mappings = UrlMappings
[groovyc]
^
If you look at the source for GrailsUrlMappingsTestCase you'll see that (as you maybe suspect) static mappings = UrlMappings isn't needed, since it does that by default if you don't specify a static mappings variable. Do you get a nested exception under the java.lang.RuntimeException: Could not load class in test type 'integration' when you leave the line commented out? Post the full stacktrace, it should work. What version of grails are you using?
I've logged a ticket on the grails bugtracker for this.

Resources