Error when executing Grails application in Spring Tool Suite

182 views Asked by At

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, CONSTRAINT FK6FD57D1CFA081AA2 FOREIGN KEY (protocol_id) REFERENCES protocol (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;

1

There are 1 answers

4
injecteer On BEST ANSWER

as the message suggests, drop the CONSTRAINT FK6FD57D1CFA081AA2 from your DB and try again. Alternatively you can remove dbCreate = "update" from your DataSource