OrderService#getOrders mis-behaving

The above throws an exception that i have not been able to determine, am invoking into this from a module which was working before but i can’t know what messed around with it to fail as of yesterday even when i run the old code onto which it was working.

when debugging the compiler falls onto http://grepcode.com/file/repo1.maven.org/maven2/org.springframework/spring/2.0.8/org/springframework/aop/support/AopUtils.java#309 which then throws an InvocationTargetException with almost no useful logs.

here is all the logs i could find after severe torture of the instance:

http://pastebin.com/4rkvdSJ3

Any help will be most highly appreciated

Here is the main log:

http://pastebin.com/yLsHACsV

tomcat registers nothing but i get this in the ui

org.hibernate.HibernateException: Unable to locate named class SIMPLE
      org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
      org.openmrs.api.db.hibernate.HibernateOrderDAO.getOrders(HibernateOrderDAO.java:151)
      org.openmrs.api.impl.OrderServiceImpl.getAllOrdersByPatient(OrderServiceImpl.java:476)

This was caused by drug_order.dosing_type storing SIMPLE instead of org.openmrs.SimpleDosingInstructions, as last changed in 1.11.5 at:

this property is meant to store a class reference string either org.openmrs.SimpleDosingInstructions or org.openmrs.FreeTextDosingInstructions instead of, ‘SIMPLE’ or ‘FREE_TEXT’ as of the above last changeset.

A quick fix is to manually update the database or run it in a module’s liquibase changeset.

I have filed an intro ticket to get this fixed and most essentially back ported to all craving platform versions for this change such as 1.11.x.

Hmm, so to be clear, it looks like that changeset, which was written in Dec 2013, has always been wrong, ever since the Platform 1.10.0 release.

Since nobody has reported this error before, I guess that nobody has upgraded a database from pre-1.10 to 1.10+ that contains drug orders, and then tried to use those drug orders!

2 Likes