当我尝试在grails 1.3.7上使用jcaptcha插件时,我正面临以下错误。在grails 1.3.7上使用jcaptcha插件时出现错误1.3.7
org.codehaus.groovy.runtime.typehandling.GroovyCastException:
Cannot cast object '{}' with class 'groovy.util.ConfigObject' to class 'com.octo.captcha.service.CaptchaService' due to:
groovy.lang.GroovyRuntimeException: Could not find matching constructor for: com.octo.captcha.service.CaptchaService(groovy.util.ConfigObject)
at org.grails.plugin.jcaptcha.JcaptchaService.getCaptchaService(JcaptchaService.groovy:42)
at org.grails.plugin.jcaptcha.JcaptchaService$$FastClassByCGLIB$$98874858.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.grails.plugin.jcaptcha.JcaptchaService$$EnhancerByCGLIB$$468f85f9.getCaptchaService(<generated>)
at org.grails.plugin.jcaptcha.JcaptchaService$getCaptchaService.call(Unknown Source)
at org.grails.plugin.jcaptcha.JcaptchaController$_closure1.doCall(JcaptchaController.groovy:29)
at org.grails.plugin.jcaptcha.JcaptchaController$_closure1.doCall(JcaptchaController.groovy)
at java.lang.Thread.run(Thread.java:619)
同样的任何指针都会很有帮助。 在此先感谢。
如果你可以显示你用来集成JCaptcha的(控制器)代码,它会有所帮助。从上面的堆栈跟踪看来,您尝试从配置文件中检索您的jcaptcha凭据的代码看起来有问题 –