Cannot create docker image for radiology with LH legacyui-1.2-SNAPSHOT

openmrs
docker

(Acha Bill) #1

As part of polishing the radiology project forked from OpenMRS, I’m trying to create a docker image on lh-toolkit using the lh-toolkit-legacy-ui by @sunbiz.

I get the following exception when building the image.

java.lang.NullPointerException
23:36:21.133 TC> at org.openmrs.module.ModuleFileParser.parse(ModuleFileParser.java:276)
23:36:21.134 TC> at org.openmrs.module.ModuleFactory.getModuleFromFile(ModuleFactory.java:535)
23:36:21.134 TC> at org.openmrs.module.ModuleFactory.loadModule(ModuleFactory.java:107)
23:36:21.141 TC> at org.openmrs.module.ModuleFactory.loadModules(ModuleFactory.java:193)
23:36:21.141 TC> at org.openmrs.module.ModuleFactory.loadModules(ModuleFactory.java:173)
23:36:21.141 TC> at org.openmrs.module.ModuleUtil.startup(ModuleUtil.java:77)
23:36:21.142 TC> at org.openmrs.api.context.Context.startup(Context.java:832)
23:36:21.142 TC> at org.openmrs.web.Listener.startOpenmrs(Listener.java:244)
23:36:21.142 TC> at org.openmrs.web.WebDaemon$1.run(WebDaemon.java:42)
23:36:21.172 TC> ERROR - ModuleFactory.getModuleFromFile(539) |2017-01-24 22:36:21,143| Error getting module object from file legacyui-1.2-SNAPSHOT.omod
23:36:21.172 TC> org.openmrs.module.ModuleException: Unable to get jar file Module: legacyui-1.2-SNAPSHOT.omod
23:36:21.173 TC> at org.openmrs.module.ModuleFileParser.parse(ModuleFileParser.java:146)
23:36:21.174 TC> at org.openmrs.module.ModuleFactory.getModuleFromFile(ModuleFactory.java:535)
23:36:21.174 TC> at org.openmrs.module.ModuleFactory.loadModule(ModuleFactory.java:107)
23:36:21.181 TC> at org.openmrs.module.ModuleFactory.loadModules(ModuleFactory.java:193)
23:36:21.181 TC> at org.openmrs.module.ModuleFactory.loadModules(ModuleFactory.java:173)
23:36:21.181 TC> at org.openmrs.module.ModuleUtil.startup(ModuleUtil.java:77)
23:36:21.181 TC> at org.openmrs.api.context.Context.startup(Context.java:832)
23:36:21.181 TC> at org.openmrs.web.Listener.startOpenmrs(Listener.java:244)
23:36:21.182 TC> at org.openmrs.web.WebDaemon$1.run(WebDaemon.java:42)
23:36:21.182 TC> Caused by: java.util.zip.ZipException: error in opening zip file
23:36:21.182 TC> at java.util.zip.ZipFile.open(Native Method)
23:36:21.182 TC> at java.util.zip.ZipFile.<init>(ZipFile.java:219)
23:36:21.194 TC> at java.util.zip.ZipFile.<init>(ZipFile.java:149)
23:36:21.194 TC> at java.util.jar.JarFile.<init>(JarFile.java:166)
23:36:21.194 TC> at java.util.jar.JarFile.<init>(JarFile.java:130)
23:36:21.194 TC> at org.openmrs.module.ModuleFileParser.parse(ModuleFileParser.java:142)
23:36:21.195 TC> ... 8 more
23:36:22.319 TC> WARN - Module.expandExtensionNames(574) |2017-01-24 22:36:22,314| webservices.rest: Unable to find class definition for extension: org.openmrs.admin.list
23:36:22.319 TC> java.lang.NoClassDefFoundError: org/openmrs/module/web/extension/AdministrationSectionExt
23:36:22.320 TC> at java.lang.ClassLoader.defineClass1(Native Method)
23:36:22.321 TC> at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
23:36:22.322 TC> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
23:36:22.327 TC> at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
23:36:22.329 TC> at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
23:36:22.329 TC> at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
23:36:22.329 TC> at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
23:36:22.341 TC> at java.security.AccessController.doPrivileged(Native Method)
23:36:22.341 TC> at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
23:36:22.341 TC> at org.openmrs.module.ModuleClassLoader.loadClass(ModuleClassLoader.java:637)
23:36:22.341 TC> at org.openmrs.module.ModuleClassLoader.loadClass(ModuleClassLoader.java:556)
23:36:22.341 TC> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
23:36:22.341 TC> at org.openmrs.module.Module.expandExtensionNames(Module.java:566)
23:36:22.341 TC> at org.openmrs.module.Module.getExtensions(Module.java:494)
23:36:22.342 TC> at org.openmrs.module.ModuleFactory.startModuleInternal(ModuleFactory.java:698)
23:36:22.342 TC> at org.openmrs.api.context.Daemon$1.run(Daemon.java:74)
23:36:22.342 TC> Caused by: java.lang.ClassNotFoundException: org.openmrs.module.web.extension.AdministrationSectionExt
23:36:22.342 TC> at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1892)
23:36:22.342 TC> at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735)
23:36:22.342 TC> at org.openmrs.module.ModuleClassLoader.loadClass(ModuleClassLoader.java:563)
23:36:22.342 TC> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
23:36:22.342 TC> ... 16 more

Same exception is thrown when using this webservices.rest-2.17-SNAPSHOT.32bae9.omod from @sunbiz. But it works fine using OpenMRS’ legacy-ui and webservices.

Any help here?


(Saptarshi Purkayastha) #2

Looks like a corrupt omod or zip. Can you open it using a zip viewer like 7zip?