Missing module/class wheen setting up platform from SDK

Hello, I am trying to set up a server using the sdk on ubuntu 24.04, using java 21.

I have tried multiple times, with these versions of platform:

  1. 3.0.0-SNAPSHOT
  2. 2.8.2-SNAPSHOT
  3. 2.8.1
  4. 2.7.3

and and i get the same error :java.lang.NoClassDefFoundError: org/openmrs/module/web/extension /AdministrationSectionExt. the stacktrace is here: https://pastebin.com/CPeBSXXh

This error appears when i try to run the server, after it has applied a long list of liquibase changestes (maybe all??).

The platform setup via sdk has the follwong modules:

  • omod.fhir2=2.7.0
  • omod.owa=1.15.0
  • omod.webservices.rest=2.50.0
  • owa.openmrs-owa-addonmanager=1.1.0

but it seems the class is defined in openmrs/openmrs-module-legacyui · omod/src/main/java/org/openmrs/module/web/extension/AdministrationSectionExt.java.

So i though about adding that module (versioni 1.23.0) to the modules folder (donwnloaded from https://addons.openmrs.org/show/org.openmrs.module.legacyui) and adding omod.legacyui=1.23.0 to openmrs-distro.properties and openmrs-server.properties as I saw that modules are declared there.

But the i face this other issue:

ERROR - Listener.contextInitialized(262) |2025-10-10T11:31:52,565| Failed to obtain JDBC connection org.openmrs.module.ModuleException: Unable to start OpenMRS. Error thrown was: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘serviceContext$child#0’ defined in URL [jar:file:/home/bledi/openmrs/platform281/.openmrs-lib-cache/legacyui/lib/legacyui-api-1.23.0.jar!/moduleApplicationContext.xml]: Cannot resolve reference to bean ‘patientService’ while setting bean property ‘patientService’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘patientService’ defined in class path resource [applicationContext-service.xml]: Cannot resolve reference to bean ‘patientServiceTarget’ while setting bean property ‘target’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘patientServiceTarget’ defined in class path resource [applicationContext-service.xml]: Initialization of bean failed; nested exception is org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class org.openmrs.api.impl.PatientServiceImpl

Any help on how to proceed and also any indication on how to fix this for others also, would be great (i could do the changes needed and make a PR )

You can ignore the ClassNotFoundException for AdministrationSectionExt

What happens when you run this command export MAVEN_OPTS="--add-opens=java.base/java.lang=ALL-UNNAMED"

And then run the sdk again for platform 2.8.1?

Thank you for the feedback, was trying just that, i also made a fresh setup just to be sure there were no issues from the various tests i made. Still fails, here is the full log from start: openmrsrun - Pastebin.com

Can you also replace the fhir2 module with the latest snapshot version compiled from here? https://github.com/openmrs/openmrs-module-fhir2

sure, will try that, thank you

@dkayiwa finally it works, it still shows a warning for the missing class WARN - Module.expandExtensionNames(577) |2025-10-10T15:49:09,596| webservices.rest: Unable to create instance of class defined for extension point: org.openmrs.admin.list java.lang.NoClassDefFoundError: org/openmrs/module/web/extension/AdministrationSectionExt

Thank you very much for your help. Is there anything i can do to help change/fix/configure also the sdk part?

@bl1 are you simply asking for any OpenMRS SDK ticket to work on?

I was thinking if there is anything to be done so othera dont face the same.issue using the sdk. Otherwise any issue i could work with woukd be fine, I am a jav dev.

Thank you so much @bl1 :smiley:

What do you think about this? Jira

Very interesting topic, I am not deep in docker land though, I think i could be of more value in something more related to java/maven etc. Do you think there is anything in that area valuable to community priorities?

We have a list of community priority tickets here: Issue navigator - OpenMRS Issues

Do you find any of them interesting? :slight_smile:

unfortunately i get this: We couldn’t find this filter

This filter may not exist, or you don’t have permissions to view it.

Try searching for another filter, or start a new search.

I am logged in

Can you share a screenshot?

@sharitech is this what you were facing?

this was my problem I was seeing my jira page like this

but f i go te filters like “Open work items“ from the menu on the left, under filters, it works fine, so I was thinking maybe your filter might not be public

Click the top leftmost icon and you will see an option to log in.

I am logged in, should i request any particular permissions? I have not done the resquet for permission for jira and wiki

You need to.

done, will write back here once it is done, hopefully with at least one ticket to work on :). Thank you so much