I get the following error when executing my Grails application in Spring Tool Suite:
| Error 2015-06-12 18:19:18,357 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate - Unsuccessful: alter table meta_data_master_template add index FK6FD57D1CFA081AA2 (protocol_id), add constraint FK6FD57D1CFA081AA2 foreign key (protocol_id) references protocol (protocol_id)
| Error 2015-06-12 18:19:18,357 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate - Cannot add or update a child row: a foreign key constraint fails (
datumrite
.#sql-1204_4
, CONSTRAINTFK6FD57D1CFA081AA2
FOREIGN KEY (protocol_id
) REFERENCESprotocol
(protocol_id
))| Error 2015-06-12 18:19:21,887 [localhost-startStop-1] ERROR context.GrailsContextLoader - Error executing bootstraps: Error creating bean with name 'org.grails.activiti.springsecurity.SetAuthenticatedUserIdFilters': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: Lorg/apache/ibatis/session/SqlSessionFactory;
Message: Error creating bean with name 'org.grails.activiti.springsecurity.SetAuthenticatedUserIdFilters': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: Lorg/apache/ibatis/session/SqlSessionFactory;
Caused by BeanCreationException: Error creating bean with name 'processEngine': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: Lorg/apache/ibatis/session/SqlSessionFactory;
as the message suggests, drop the
CONSTRAINT FK6FD57D1CFA081AA2
from your DB and try again. Alternatively you can removedbCreate = "update"
from your DataSource