當我嘗試在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憑據的代碼看起來有問題 –