Module won't start

I set up a new module and server based on an sdk project/server creation. I’m running on an imac (Big Sur), using ref app 2.10. SDK: openmrs-sdk-maven-plugin:4.3.0:info

I created the server via sdk. When I attempt to load the module openmrs just indicates it hasn’t started, with no message. I uploaded the source to here

Below is the error message provided in the terminal window. Any help is much appreciated.

Dec 27, 2021 10:09:49 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring FrameworkServlet ‘openmrs_static_content’ Exception in thread “Thread-330” java.lang.LinkageError: loader constraint violation: loader (instance of org/openmrs/module/ModuleClassLoader) previously initiated loading for a different type with name “org/openmrs/module/Extension$MEDIA_TYPE” at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) at java.net.URLClassLoader.access$100(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:368) at java.net.URLClassLoader$1.run(URLClassLoader.java:362) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:361) at org.openmrs.module.ModuleClassLoader.loadClass(ModuleClassLoader.java:646) at org.openmrs.module.ModuleClassLoader.loadClass(ModuleClassLoader.java:565) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.openmrs.module.formsmodule.extension.html.AdminList.getMediaType(AdminList.java:29) at org.openmrs.module.Extension.getExtensionId(Extension.java:123) at org.openmrs.module.Module.expandExtensionNames(Module.java:570) at org.openmrs.module.Module.getExtensions(Module.java:492) at org.openmrs.module.ModuleFactory.startModuleInternal(ModuleFactory.java:675) at org.openmrs.api.context.Daemon$1.run(Daemon.java:80)

Do you think you can upload the module to GitHub?

Many thanks for your quick reply…I’m trying another path which is working so far. If this doesn’t pan out then I’ll upload the module to git and check back in.

Did this eventually work

Thanks for checking. Currently, all is working well.

It greatly helps if you can share how you fixed it. :slightly_smiling_face:

Sure…I was able to generate the new server with SDK without a problem (ref app 2.10). Then, I created a new project and added the module to the server. Finally, I copied the java/gsp files to the new module. I have no idea why this was able to get things working??