Details
-
Bug
-
Status: Closed
-
TBD
-
Resolution: Won't Fix
-
None
-
None
-
Undetermined
-
Description
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.)