uiframework error (missing property) only in development mode

I have just tried for the first time to use the uiframework development mode (on allergyui) as described here: https://wiki.openmrs.org/display/docs/Using+the+UI+Framework+in+Your+Module. Normally I can run openmrs-core 1.11.x with the referenceapp modules on jetty with no problem. However as soon as I add the VM argument for development mode (in my case -DuiFramework.development.allergyui=/e/git/openmrs-module-allergyui), I get the following exception r.e. a missing property:

“org.openmrs.ui.framework.ViewException: *** In view ‘allergies’, could not find property ‘allergies’.”

I also know that I correctly specified the development folder, because I get the following log messages on startup: WARN - UiFrameworkUtil.addPossibleDevFolder(592) |2016-01-18 18:12:28,281| Folder E:\git\openmrs-module-allergyui\omod\target\classes successfully set as developmentFolder mode folder for provider allergyui WARN - UiFrameworkUtil.addPossibleDevFolder(592) |2016-01-18 18:12:28,282| Folder E:\git\openmrs-module-allergyui\omod\src\main\webapp\pages successfully set as developmentFolder mode folder for provider allergyui WARN - UiFrameworkUtil.addPossibleDevFolder(592) |2016-01-18 18:12:28,284| Folder E:\git\openmrs-module-allergyui\omod\target\classes successfully set as developmentFolder mode folder for provider allergyui WARN - UiFrameworkUtil.addPossibleDevFolder(592) |2016-01-18 18:12:28,285| Folder E:\git\openmrs-module-allergyui\omod\src\main\webapp\fragments successfully set as developmentFolder mode folder for provider allergyui WARN - UiFrameworkUtil.addPossibleDevFolder(592) |2016-01-18 18:12:28,286| Folder E:\git\openmrs-module-allergyui\omod\src\main\webapp\resources successfully set as developmentFolder mode folder for provider allergyui

As I am completely unfamiliar with uiframework, can someone suggest why turning on development mode could cause these errors? I have no idea where to even begin.

For reference, the full error is here: http://pastebin.com/Z2AuDCWU

I determined that dev mode does work for allergyui version 1.2 but broke as of the following commit: https://github.com/openmrs/openmrs-module-allergyui/commit/092fe0689878b233693911e0f64db24b36e556b0

Will file a JIRA

I don’t see a JIRA project for allergyui…

I have made a commit to the uiframework module at:

https://github.com/openmrs/openmrs-module-uiframework/commit/d67c1d4ae9848a3810ed0e07b71c9e5c38a25c4b

Just pull this change and adjust your vm argument value to include the full path to the src folder as: /e/git/openmrs-module-allergyui/web-1.9

Thanks @dkayiwa. As it turns out, this was the mystery problem I was running into as well that I mentioned today on that commit re: changing allergyui to depend on allergyapi. I have switched this back to be “aware of” and pushed up my commit.

This should probably be documented somewhere. Also, @darius, @cioan, @mseaton, fyi for your dev environments.

How will changing the path to web-1.9 help? The files I want to dynamically reload are gsp files (pages and fragments) that are still located under omod webapp dir, not under web-1.9. I assume uiframework still needs to pick up the omod paths…

Reading between the lines, I guess the issue is that the controllers are now in a conditionally-loaded web-1.9 or web-2.0 maven module, and the views are in the omod maven module?

Stepping back, I think that part of this fix is that this module no longer has the simple, conventional file layout assumed by StandardModuleUiConfiguration. I would think it makes sense to

  1. introduce a new more-powerful bean to represent this configuration, hopefully in a generalized way in uiframework
  2. also, make some changes similar to what @dkayiwa did on his recent commit (but I would revert that and try a more fundamental change, with the idea that the module’s configuration should be telling you where the files live)
  3. use this new approach instead of this one-liner in allergyui

PS- shouldn’t the modules be called web-1.x and web-2.x?

Not sure if this is 100% related, but I’m running into another error when running the latest version of Allergy UI. In this case, I’m running Jetty, with some modules in dev mode, but not allergyui. This is running on OpenMRS platform 1.10. This is where Allergy API has been degraded to an “aware of” module. Looks like it’s correctly in finding the Allergy UI controller, but now it can’t find the the Allergy API PatientService. If I change this back so that it requires Allergy API, things work.

HTTP ERROR: 500

org/openmrs/module/allergyapi/api/PatientService RequestURI=/openmrs/coreapps/clinicianfacing/patient.page

Caused by:

java.lang.NoClassDefFoundError: org/openmrs/module/allergyapi/api/PatientService at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2615) at java.lang.Class.privateGetPublicMethods(Class.java:2733) at java.lang.Class.getMethods(Class.java:1472) at org.openmrs.ui.framework.UiFrameworkUtil.findControllerMethodForHttpRequestMethod(UiFrameworkUtil.java:83) at org.openmrs.ui.framework.UiFrameworkUtil.executeControllerMethod(UiFrameworkUtil.java:61) at org.openmrs.ui.framework.fragment.FragmentFactory.handleRequestWithController(FragmentFactory.java:232) at org.openmrs.ui.framework.fragment.FragmentFactory.processThisFragment(FragmentFactory.java:152) at org.openmrs.ui.framework.fragment.FragmentFactory.process(FragmentFactory.java:116) at org.openmrs.ui.framework.page.PageContext.includeFragment(PageContext.java:75) at org.openmrs.ui.framework.UiUtils.includeFragment(UiUtils.java:157) at sun.reflect.GeneratedMethodAccessor875.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:132) at SimpleTemplateScript33$_run_closure3.doCall(SimpleTemplateScript33.groovy:79) 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.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886) at groovy.lang.Closure.call(Closure.java:282) at groovy.lang.Closure.call(Closure.java:295) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1220) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1196) at org.codehaus.groovy.runtime.dgm$110.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:270) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124) at SimpleTemplateScript33.run(SimpleTemplateScript33.groovy:77) at groovy.text.SimpleTemplateEngine$SimpleTemplate$1.writeTo(SimpleTemplateEngine.java:165) at groovy.text.SimpleTemplateEngine$SimpleTemplate$1.toString(SimpleTemplateEngine.java:177) at org.openmrs.ui.framework.page.GroovyPageView.render(GroovyPageView.java:43) at org.openmrs.ui.framework.page.PageFactory.processThisFragment(PageFactory.java:185) at org.openmrs.ui.framework.page.PageFactory.process(PageFactory.java:114) at org.openmrs.ui.framework.page.PageFactory.handle(PageFactory.java:84) at org.openmrs.module.uiframework.PageController.handlePath(PageController.java:115) at org.openmrs.module.uiframework.PageController.handleUrlWithDotPage(PageController.java:82) 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.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:61) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:72) at org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:54) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:107) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488) Caused by: java.lang.ClassNotFoundException: org.openmrs.module.allergyapi.api.PatientService at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:375) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337) at org.openmrs.module.ModuleClassLoader.loadClass(ModuleClassLoader.java:486) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) … 98 more Caused by:

java.lang.ClassNotFoundException: org.openmrs.module.allergyapi.api.PatientService at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:375) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337) at org.openmrs.module.ModuleClassLoader.loadClass(ModuleClassLoader.java:486) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2615) at java.lang.Class.privateGetPublicMethods(Class.java:2733) at java.lang.Class.getMethods(Class.java:1472) at org.openmrs.ui.framework.UiFrameworkUtil.findControllerMethodForHttpRequestMethod(UiFrameworkUtil.java:83) at org.openmrs.ui.framework.UiFrameworkUtil.executeControllerMethod(UiFrameworkUtil.java:61) at org.openmrs.ui.framework.fragment.FragmentFactory.handleRequestWithController(FragmentFactory.java:232) at org.openmrs.ui.framework.fragment.FragmentFactory.processThisFragment(FragmentFactory.java:152) at org.openmrs.ui.framework.fragment.FragmentFactory.process(FragmentFactory.java:116) at org.openmrs.ui.framework.page.PageContext.includeFragment(PageContext.java:75) at org.openmrs.ui.framework.UiUtils.includeFragment(UiUtils.java:157) at sun.reflect.GeneratedMethodAccessor875.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:132) at SimpleTemplateScript33$_run_closure3.doCall(SimpleTemplateScript33.groovy:79) 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.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886) at groovy.lang.Closure.call(Closure.java:282) at groovy.lang.Closure.call(Closure.java:295) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1220) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1196) at org.codehaus.groovy.runtime.dgm$110.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:270) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124) at SimpleTemplateScript33.run(SimpleTemplateScript33.groovy:77) at groovy.text.SimpleTemplateEngine$SimpleTemplate$1.writeTo(SimpleTemplateEngine.java:165) at groovy.text.SimpleTemplateEngine$SimpleTemplate$1.toString(SimpleTemplateEngine.java:177) at org.openmrs.ui.framework.page.GroovyPageView.render(GroovyPageView.java:43) at org.openmrs.ui.framework.page.PageFactory.processThisFragment(PageFactory.java:185) at org.openmrs.ui.framework.page.PageFactory.process(PageFactory.java:114) at org.openmrs.ui.framework.page.PageFactory.handle(PageFactory.java:84) at org.openmrs.module.uiframework.PageController.handlePath(PageController.java:115) at org.openmrs.module.uiframework.PageController.handleUrlWithDotPage(PageController.java:82) 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.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:61) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:72) at org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:54) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:107) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488) Powered by Jetty://

@mogoodrich i tried and completely failed to reproduce this on master and 1.11.x But good enough i was able to reproduce it on 1.10.x and after running in debug mode to see what is going on, i ended up with this pull request

https://github.com/openmrs/openmrs-core/pull/1679

which turns out to be

https://issues.openmrs.org/browse/TRUNK-4487 :smile:

Do you have any objections to merging this for 1.10.x?

@dkayiwa, thank you so much!!

I have no objections with backporting to 1.10.x, as long as you don’t see any issues with it… we will definitely need it. Let me know what else you need from me.

Merged at

https://github.com/openmrs/openmrs-core/commit/02314a3556d4034202b2937296ab500a3e387755

I only need you to test and confirm that all is well. :smile:

Looks great, thanks @dkayiwa!

So, to verify, we have resolved @mogoodrich issue, but not @kristopherschmidt’s issue, right?

Regarding @kristopherschmidt’s issue that started this thread, I think we should revert @dkayiwa’s commit, and introduce some more powerful way for a module to tell the uiframework how it is laid out. (This should be a one-time-per-module configuration, not a per-developer configuration.)

Created ticket

for which i made the commit

https://github.com/openmrs/openmrs-module-uiframework/commit/4491343711d4b27f46ea11bddaa107d9488ef3a5

and an example configuration for the allergyui module at

https://github.com/openmrs/openmrs-module-allergyui/commit/114863a0d91b299680beeede60717836ddca9da5

@kristopherschmidt can you update the allergyui and uiframework modules to test again? The vm argument will stay as you originally had it: -DuiFramework.development.allergyui=/e/git/openmrs-module-allergyui

@dkayiwa, this seems like the kind of exploratory coding that would benefit from either (a) proposing a solution and waiting for feedback before implementing, or (b) branch + pull request. :slight_smile:

I intended that “StandardModuleUiConfiguration” was supposed to be a simple way of setting up the common configuration, and if you needed something more advanced, you’d set it up manually (or using a to-be-written new bean for more complex configs).

So I definitely don’t like the amount of repetition that your current commit requires (because 99.9% of the time the controllers and views for pages and fragments will be together).

Are we sure that the only variation that people will want to make is based on the running OpenMRS version? The naming of the new properties you introduced presumes that, but really the properties should be named like “versionToDirectoryMap” so it’s clear what’s happening.

I would prefer if the module configuration looks more like this:

Also, in the code you replaced the “developmentFolder” property with “resourceDirectories”, but this new name no longer conveys the critical piece of information that this is about development mode, not production.

Yes i also noticed some config repetition after committing. I also felt that it should have been a pull request but became a bit lazy to turn it into so after having realised that i was already working on master. :smile:

Let me revert and convert into pull request.

Not quite sure, where are we with this? Is there a way to run with the allergyui module in development mode? I just discovered the following (relatively minor) bug (see below), but am loath to work on it until I can access the module in development mode. I’m also prefer if the 1.9 and 2.0 controllers were merged so I wasn’t duplicating my code everywhere, seems like a recipe for disaster.

If you can get a clever way of merging those controllers and make them work for both platform 2.0 and below, that will be awesome! :smile:

As for getting the allegyui (or any other module with such multiple folders) work in development mode, if you cannot wait until when that ticket will be completed, simply use the pull request i made. It is just waiting for some one to redo with the better design, but it does the job well in its current state. It is the one am actually using, for now. :smile:

I’m not in a huge hurry. I can wait as long as someone is planning on reviewing it.

Thanks!

I already made pretty extensive comments earlier on the thread

and (maybe also) on the commit that you reverted, @dkayiwa. I wasn’t planning to go remake those same comments on the PR. Any chance you can move them over?