org.openmrs.api.db.DAOException: Error while running sql: CREATE TABLE IF NOT EXISTS `xforms_xform` ( `form_id` int(11) NOT NULL, `xform_xml` longtext, `layout_xml` longtext, `creator` int(11) NOT NULL default '0', `date_created` datetime NOT NULL default '0000-00-00 00:00:00', `changed_by` int(11) default NULL, `date_changed` datetime default NULL, PRIMARY KEY (`form_id`), KEY `user_who_created_xform` (`creator`), KEY `form_with_which_xform_is_related` (`form_id`), CONSTRAINT `user_who_created_xform` FOREIGN KEY (`creator`) REFERENCES `users` (`user_id`), CONSTRAINT `user_who_last_changed_xform` FOREIGN KEY (`changed_by`) REFERENCES `users` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 . Message: Unknown data type: "USER_WHO_CREATED_XFORM"; SQL statement: CREATE TABLE IF NOT EXISTS `xforms_xform` ( `form_id` int(11) NOT NULL, `xform_xml` longtext, `layout_xml` longtext, `creator` int(11) NOT NULL default '0', `date_created` datetime NOT NULL default '0000-00-00 00:00:00', `changed_by` int(11) default NULL, `date_changed` datetime default NULL, PRIMARY KEY (`form_id`), KEY `user_who_created_xform` (`creator`), KEY `form_with_which_xform_is_related` (`form_id`), CONSTRAINT `user_who_created_xform` FOREIGN KEY (`creator`) REFERENCES `users` (`user_id`), CONSTRAINT `user_who_last_changed_xform` FOREIGN KEY (`changed_by`) REFERENCES `users` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 [50004-135]

JIRA | Jon Skeet | 2 years ago
  1. 0

    I'm trying to use the XForms 4.3.1 module as a dependency of my own module. The module installs fine in a full OpenMRS environment, but in my development environment I'm getting the following error: WARN - ModuleFactory.startModuleInternal(636) |2014-11-06 12:48:58,663| Error while trying to start module: xforms org.openmrs.api.db.DAOException: Error while running sql: CREATE TABLE IF NOT EXISTS `xforms_xform` ( `form_id` int(11) NOT NULL, `xform_xml` longtext, `layout_xml` longtext, `creator` int(11) NOT NULL default '0', `date_created` datetime NOT NULL default '0000-00-00 00:00:00', `changed_by` int(11) default NULL, `date_changed` datetime default NULL, PRIMARY KEY (`form_id`), KEY `user_who_created_xform` (`creator`), KEY `form_with_which_xform_is_related` (`form_id`), CONSTRAINT `user_who_created_xform` FOREIGN KEY (`creator`) REFERENCES `users` (`user_id`), CONSTRAINT `user_who_last_changed_xform` FOREIGN KEY (`changed_by`) REFERENCES `users` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 . Message: Unknown data type: "USER_WHO_CREATED_XFORM"; SQL statement: CREATE TABLE IF NOT EXISTS `xforms_xform` ( `form_id` int(11) NOT NULL, `xform_xml` longtext, `layout_xml` longtext, `creator` int(11) NOT NULL default '0', `date_created` datetime NOT NULL default '0000-00-00 00:00:00', `changed_by` int(11) default NULL, `date_changed` datetime default NULL, PRIMARY KEY (`form_id`), KEY `user_who_created_xform` (`creator`), KEY `form_with_which_xform_is_related` (`form_id`), CONSTRAINT `user_who_created_xform` FOREIGN KEY (`creator`) REFERENCES `users` (`user_id`), CONSTRAINT `user_who_last_changed_xform` FOREIGN KEY (`changed_by`) REFERENCES `users` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 [50004-135] at org.openmrs.util.DatabaseUtil.executeSQL(DatabaseUtil.java:144) at org.openmrs.api.db.hibernate.HibernateAdministrationDAO.executeSQL(HibernateAdministrationDAO.java:340) at org.openmrs.api.impl.AdministrationServiceImpl.executeSQL(AdministrationServiceImpl.java:802) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at com.sun.proxy.$Proxy30.executeSQL(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:122) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at com.sun.proxy.$Proxy51.executeSQL(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at com.sun.proxy.$Proxy51.executeSQL(Unknown Source) at org.openmrs.module.ModuleFactory.runDiff(ModuleFactory.java:739) at org.openmrs.module.ModuleFactory.startModuleInternal(ModuleFactory.java:567) at org.openmrs.api.context.Daemon$1.run(Daemon.java:58) Caused by: org.h2.jdbc.JdbcSQLException: Unknown data type: "USER_WHO_CREATED_XFORM"; SQL statement: CREATE TABLE IF NOT EXISTS `xforms_xform` ( `form_id` int(11) NOT NULL, `xform_xml` longtext, `layout_xml` longtext, `creator` int(11) NOT NULL default '0', `date_created` datetime NOT NULL default '0000-00-00 00:00:00', `changed_by` int(11) default NULL, `date_changed` datetime default NULL, PRIMARY KEY (`form_id`), KEY `user_who_created_xform` (`creator`), KEY `form_with_which_xform_is_related` (`form_id`), CONSTRAINT `user_who_created_xform` FOREIGN KEY (`creator`) REFERENCES `users` (`user_id`), CONSTRAINT `user_who_last_changed_xform` FOREIGN KEY (`changed_by`) REFERENCES `users` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 [50004-135] at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) [...] I don't understand why this would work in the full environment, but not when the module is just a dependency. Is there another module I should also be depending on? Is there some different version of the XForms module I should be using? (I'm using OpenMRS 1.10.0, and will be integrating with the REST webservices module 2.6 as well.)

    JIRA | 2 years ago | Jon Skeet
    org.openmrs.api.db.DAOException: Error while running sql: CREATE TABLE IF NOT EXISTS `xforms_xform` ( `form_id` int(11) NOT NULL, `xform_xml` longtext, `layout_xml` longtext, `creator` int(11) NOT NULL default '0', `date_created` datetime NOT NULL default '0000-00-00 00:00:00', `changed_by` int(11) default NULL, `date_changed` datetime default NULL, PRIMARY KEY (`form_id`), KEY `user_who_created_xform` (`creator`), KEY `form_with_which_xform_is_related` (`form_id`), CONSTRAINT `user_who_created_xform` FOREIGN KEY (`creator`) REFERENCES `users` (`user_id`), CONSTRAINT `user_who_last_changed_xform` FOREIGN KEY (`changed_by`) REFERENCES `users` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 . Message: Unknown data type: "USER_WHO_CREATED_XFORM"; SQL statement: CREATE TABLE IF NOT EXISTS `xforms_xform` ( `form_id` int(11) NOT NULL, `xform_xml` longtext, `layout_xml` longtext, `creator` int(11) NOT NULL default '0', `date_created` datetime NOT NULL default '0000-00-00 00:00:00', `changed_by` int(11) default NULL, `date_changed` datetime default NULL, PRIMARY KEY (`form_id`), KEY `user_who_created_xform` (`creator`), KEY `form_with_which_xform_is_related` (`form_id`), CONSTRAINT `user_who_created_xform` FOREIGN KEY (`creator`) REFERENCES `users` (`user_id`), CONSTRAINT `user_who_last_changed_xform` FOREIGN KEY (`changed_by`) REFERENCES `users` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 [50004-135]
  2. 0

    I'm trying to use the XForms 4.3.1 module as a dependency of my own module. The module installs fine in a full OpenMRS environment, but in my development environment I'm getting the following error: WARN - ModuleFactory.startModuleInternal(636) |2014-11-06 12:48:58,663| Error while trying to start module: xforms org.openmrs.api.db.DAOException: Error while running sql: CREATE TABLE IF NOT EXISTS `xforms_xform` ( `form_id` int(11) NOT NULL, `xform_xml` longtext, `layout_xml` longtext, `creator` int(11) NOT NULL default '0', `date_created` datetime NOT NULL default '0000-00-00 00:00:00', `changed_by` int(11) default NULL, `date_changed` datetime default NULL, PRIMARY KEY (`form_id`), KEY `user_who_created_xform` (`creator`), KEY `form_with_which_xform_is_related` (`form_id`), CONSTRAINT `user_who_created_xform` FOREIGN KEY (`creator`) REFERENCES `users` (`user_id`), CONSTRAINT `user_who_last_changed_xform` FOREIGN KEY (`changed_by`) REFERENCES `users` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 . Message: Unknown data type: "USER_WHO_CREATED_XFORM"; SQL statement: CREATE TABLE IF NOT EXISTS `xforms_xform` ( `form_id` int(11) NOT NULL, `xform_xml` longtext, `layout_xml` longtext, `creator` int(11) NOT NULL default '0', `date_created` datetime NOT NULL default '0000-00-00 00:00:00', `changed_by` int(11) default NULL, `date_changed` datetime default NULL, PRIMARY KEY (`form_id`), KEY `user_who_created_xform` (`creator`), KEY `form_with_which_xform_is_related` (`form_id`), CONSTRAINT `user_who_created_xform` FOREIGN KEY (`creator`) REFERENCES `users` (`user_id`), CONSTRAINT `user_who_last_changed_xform` FOREIGN KEY (`changed_by`) REFERENCES `users` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 [50004-135] at org.openmrs.util.DatabaseUtil.executeSQL(DatabaseUtil.java:144) at org.openmrs.api.db.hibernate.HibernateAdministrationDAO.executeSQL(HibernateAdministrationDAO.java:340) at org.openmrs.api.impl.AdministrationServiceImpl.executeSQL(AdministrationServiceImpl.java:802) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at com.sun.proxy.$Proxy30.executeSQL(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:122) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at com.sun.proxy.$Proxy51.executeSQL(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at com.sun.proxy.$Proxy51.executeSQL(Unknown Source) at org.openmrs.module.ModuleFactory.runDiff(ModuleFactory.java:739) at org.openmrs.module.ModuleFactory.startModuleInternal(ModuleFactory.java:567) at org.openmrs.api.context.Daemon$1.run(Daemon.java:58) Caused by: org.h2.jdbc.JdbcSQLException: Unknown data type: "USER_WHO_CREATED_XFORM"; SQL statement: CREATE TABLE IF NOT EXISTS `xforms_xform` ( `form_id` int(11) NOT NULL, `xform_xml` longtext, `layout_xml` longtext, `creator` int(11) NOT NULL default '0', `date_created` datetime NOT NULL default '0000-00-00 00:00:00', `changed_by` int(11) default NULL, `date_changed` datetime default NULL, PRIMARY KEY (`form_id`), KEY `user_who_created_xform` (`creator`), KEY `form_with_which_xform_is_related` (`form_id`), CONSTRAINT `user_who_created_xform` FOREIGN KEY (`creator`) REFERENCES `users` (`user_id`), CONSTRAINT `user_who_last_changed_xform` FOREIGN KEY (`changed_by`) REFERENCES `users` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 [50004-135] at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) [...] I don't understand why this would work in the full environment, but not when the module is just a dependency. Is there another module I should also be depending on? Is there some different version of the XForms module I should be using? (I'm using OpenMRS 1.10.0, and will be integrating with the REST webservices module 2.6 as well.)

    JIRA | 2 years ago | Jon Skeet
    org.openmrs.api.db.DAOException: Error while running sql: CREATE TABLE IF NOT EXISTS `xforms_xform` ( `form_id` int(11) NOT NULL, `xform_xml` longtext, `layout_xml` longtext, `creator` int(11) NOT NULL default '0', `date_created` datetime NOT NULL default '0000-00-00 00:00:00', `changed_by` int(11) default NULL, `date_changed` datetime default NULL, PRIMARY KEY (`form_id`), KEY `user_who_created_xform` (`creator`), KEY `form_with_which_xform_is_related` (`form_id`), CONSTRAINT `user_who_created_xform` FOREIGN KEY (`creator`) REFERENCES `users` (`user_id`), CONSTRAINT `user_who_last_changed_xform` FOREIGN KEY (`changed_by`) REFERENCES `users` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 . Message: Unknown data type: "USER_WHO_CREATED_XFORM"; SQL statement: CREATE TABLE IF NOT EXISTS `xforms_xform` ( `form_id` int(11) NOT NULL, `xform_xml` longtext, `layout_xml` longtext, `creator` int(11) NOT NULL default '0', `date_created` datetime NOT NULL default '0000-00-00 00:00:00', `changed_by` int(11) default NULL, `date_changed` datetime default NULL, PRIMARY KEY (`form_id`), KEY `user_who_created_xform` (`creator`), KEY `form_with_which_xform_is_related` (`form_id`), CONSTRAINT `user_who_created_xform` FOREIGN KEY (`creator`) REFERENCES `users` (`user_id`), CONSTRAINT `user_who_last_changed_xform` FOREIGN KEY (`changed_by`) REFERENCES `users` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 [50004-135]
  3. 0

    GitHub comment 22#46846027

    GitHub | 2 years ago | talnicolas
    org.h2.jdbc.JdbcSQLException: The object is already closed [90007-172]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring’s embedded H2 datasource and DB_CLOSE_ON_EXIT

    Stack Overflow | 4 years ago | Michael Piefel
    org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-170]
  6. 0

    org.h2.jdbc.JdbcSQLException: Timeout trying to lock table - while running Junit Benchmark

    Stack Overflow | 2 years ago | Kousik Kumar Gopalan
    org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "RUNS"; SQL statement:

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.h2.jdbc.JdbcSQLException

      Unknown data type: "USER_WHO_CREATED_XFORM"; SQL statement: CREATE TABLE IF NOT EXISTS `xforms_xform` ( `form_id` int(11) NOT NULL, `xform_xml` longtext, `layout_xml` longtext, `creator` int(11) NOT NULL default '0', `date_created` datetime NOT NULL default '0000-00-00 00:00:00', `changed_by` int(11) default NULL, `date_changed` datetime default NULL, PRIMARY KEY (`form_id`), KEY `user_who_created_xform` (`creator`), KEY `form_with_which_xform_is_related` (`form_id`), CONSTRAINT `user_who_created_xform` FOREIGN KEY (`creator`) REFERENCES `users` (`user_id`), CONSTRAINT `user_who_last_changed_xform` FOREIGN KEY (`changed_by`) REFERENCES `users` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 [50004-135]

      at org.h2.message.DbException.getJdbcSQLException()
    2. H2 Database Engine
      DbException.getJdbcSQLException
      1. org.h2.message.DbException.getJdbcSQLException(DbException.java:327)[...]
      1 frame