【发布时间】:2012-01-17 03:30:31
【问题描述】:
我做了一些看似无害的更改(添加了一些域类,添加了插件购物车),现在显然 BootStrap.groovy 类根本不执行。
虽然我对 BootStrap.groovy 进行了一些更改,但我恢复了一个以前运行良好的文件,但被错误吓傻了。此外,在良好的(旧的)BootStrap.groovy 中,我在 init 操作的顶部放置了一些 println 语句,但这些语句没有打印出来,甚至似乎都没有到达。最后,我卸载了插件,然后手动删除了购物车插件文件夹。
您知道这个错误是什么,或者有任何调试指导吗? (正在运行 Grails 1.3.7)
Running Grails application..
Configuring Spring Security ...
Configuring Spring Security UI ...
2011-12-09 13:51:33,036 [main] 错误 context.GrailsContextLoader - 执行引导程序时出错:使用名称创建 bean 时出错 'messageSource': bean 初始化失败;嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 创建名为“transactionManager”的bean:无法解析引用 在设置 bean 属性 'sessionFactory' 时 bean 'sessionFactory'; 嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 创建名为“sessionFactory”的bean:调用init方法 失败的;嵌套异常是 org.hibernate.MappingException: Type [null] 不是基本类型或域类,不能被映射。 在 [mapping] 块中指定类型或使用基本类型 (字符串、整数等) org.springframework.beans.factory.BeanCreationException:错误 创建名为'messageSource'的bean:bean的初始化 失败的;嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 创建名为“transactionManager”的bean:无法解析引用 在设置 bean 属性 'sessionFactory' 时 bean 'sessionFactory'; 嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 创建名为“sessionFactory”的bean:调用init方法 失败的;嵌套异常是 org.hibernate.MappingException: Type [null] 不是基本类型或域类,不能被映射。 在 [mapping] 块中指定类型或使用基本类型 (字符串、整数等)在 org.grails.tomcat.TomcatServer.startSecure(TomcatServer.groovy:289) 在 grails.web.container.EmbeddableServer$startSecure.call(未知 来源)在 _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy:152) 在 _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy) 在 _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280) 在 _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy) 在 _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:149) 在 _GrailsRun_groovy$_run_closure5.call(_GrailsRun_groovy) at _GrailsRun_groovy.runInline(_GrailsRun_groovy:116) at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy) at _GrailsRun_groovy$_run_closure2.doCall(_GrailsRun_groovy:66) at RunApp ) 在 gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381) 在 gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415) 在 gant.Gant$_dispatch_closure7.doCall(Gant.groovy) 在 gant.Gant.withBuildListeners(Gant.groovy:427) 在 gant.Gant.this$2$withBuildListeners(Gant.groovy) 在 gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source) at gant.Gant.dispatch(Gant.groovy:415) 在 gant.Gant.this$2$dispatch(Gant.groovy) 在 gant.Gant.invokeMethod(Gant.groovy) 在 gant.Gant.executeTargets(Gant.groovy:590) 在 gant.Gant.executeTargets(Gant.groovy:589) 在 com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) 引起:org.springframework.beans.factory.BeanCreationException: 创建名为“transactionManager”的 bean 时出错:无法解析 在设置 bean 属性时引用 bean 'sessionFactory' '会话工厂';嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 创建名为“sessionFactory”的bean:调用init方法 失败的;嵌套异常是 org.hibernate.MappingException: Type [null] 不是基本类型或域类,不能被映射。 在 [mapping] 块中指定类型或使用基本类型 (字符串,整数等)... 24 更多原因: org.springframework.beans.factory.BeanCreationException:错误 创建名为“sessionFactory”的bean:调用init方法 失败的;嵌套异常是 org.hibernate.MappingException: Type [null] 不是基本类型或域类,不能被映射。 在 [mapping] 块中指定类型或使用基本类型 (字符串,整数等)... 24 更多原因: org.hibernate.MappingException:类型 [null] 不是基本类型或 域类,无法映射。在 [映射] 阻止或使用基本类型(字符串、整数等)... 24 更多
进程以退出代码 1 结束
【问题讨论】:
-
我尝试了“帮助”并将上面的内容放到一个代码块中,所以我不必缩进每一行,但解释的帮助机制似乎不起作用...... ?
标签: grails