在Spring Tool Suite中执行Grails应用程序时出现以下错误:
|错误2015-06-12 18:19:18,357 [localhost-startStop-1]错误hbm2ddl.SchemaUpdate - 不成功:alter table meta_data_master_template添加索引FK6FD57D1CFA081AA2(protocol_id),添加约束FK6FD57D1CFA081AA2外键(protocol_id)引用协议(protocol_id)
|错误2015-06-12 18:19:18,357 [localhost-startStop-1]错误hbm2ddl.SchemaUpdate - 无法添加或更新子行:外键约束失败(
datumrite
。#sql-1204_4
,CONSTRAINTFK6FD57D1CFA081AA2
外键(protocol_id
)参考protocol
(protocol_id
))|错误2015-06-12 18:19:21,887 [localhost-startStop-1]错误context.GrailsContextLoader - 执行bootstraps时出错:创建名为'org.grails.activiti.springsecurity.SetAuthenticatedUserIdFilters'的bean时出错:bean的初始化失败;嵌套异常是org.springframework.beans.factory.BeanCreationException:创建名为'processEngine'的bean时出错:bean的初始化失败;嵌套异常是java.lang.NoClassDefFoundError:Lorg / apache / ibatis / session / SqlSessionFactory;
消息:创建名为'org.grails.activiti.springsecurity.SetAuthenticatedUserIdFilters'的bean时出错:bean的初始化失败;嵌套异常是org.springframework.beans.factory.BeanCreationException:创建名为'processEngine'的bean时出错:bean的初始化失败;嵌套异常是java.lang.NoClassDefFoundError:Lorg / apache / ibatis / session / SqlSessionFactory;
由BeanCreationException引起:创建名为'processEngine'的bean时出错:bean的初始化失败;嵌套异常是java.lang.NoClassDefFoundError:Lorg / apache / ibatis / session / SqlSessionFactory;
答案 0 :(得分:0)
如消息所示,从您的数据库中删除CONSTRAINT FK6FD57D1CFA081AA2
,然后重试。或者,您可以从数据源中删除dbCreate = "update"