can't find Hibernate ORM File and the class extends BaseOpenmrsObject implements Serializable

hello everyone. i’m new in openmrs… after creating my first module and inserting it on the platform(according to the book’s “openmrs-devmanual” indications)… i can’t find the class extends BaseOpenmrsObject implements Serializable and .hbm.xml file to update.

and i have this page when i go on “manage module”"

someone please help me!

Hey @dlector, are you creating a refrence module/platform module / OWA?

What are you really trying to create(reference and application). that page shows 404 meaning the page is not found. j guess the error may not come from hibernate class in the first case, Can you first run as maven test(jetty:run) and see the output from console. j suggest you first run the tests .@dlector

Hello @rushikesh … platform module .

i trying to create a platform module but when i set up the server i have chosen “Distribution”… i will set up another server. @sharif

1 Like

@dlector, reference application is not a server though it uses many servers but specifically it uses tomcat server thats why you need to locate localhost:8080/ after starting the reference application. can you please paste the error in the pastebin or share the screen shot, it will be ses the error and help you thanks

i meant “Distribution”… i think I am a little lost. I had this error while uploading the module “Request processing failed; nested exception is java.lang.IllegalStateException: BeanFactory not initialized or already closed - call ‘refresh’ before accessing beans via the ApplicationContext” …
I restarted my computer, I saw the module using this page http://localhost:8081/openmrs/admin/… (i chose 8081 as port) when i click on it i have "HTTP status 404 " @sharif

can you paste the whole log( the whole error log) into pastebin. this is the link to

  • Hi @dlector, have you uploaded what your trying to work on to git hub ?? can you share the github repo here ??

  • About the error , The sdk has a bug, that is the auto-generated controller by the sdk cant map to the Hello-world jsp page created , and that hasnt yet been worked on, so its a little work needed to debug that in your module

@sharif if i want to insert a module that will be able to communicate (both ways) data with openmrs database. I have to configure which server? i choose which approach openmrs SDK or openmrs standalone …?

Hello @mozzy… I’m just trying to insert the basic module before attacking the project I’m working on. I have not created a repo on git yet. How can I fix the bug?

what do you intend to mean ??

Anyway can you share the controller class created here ??

1 Like

j think he is trying to mean that he created a module but when he is trying to upload it openmrs standalone, it brings error. @mozzy j think we need to upload “omod” into the openmrs standalone. @dlector, we need to see the code example or the log error atleast…

1 Like

hi @dlector , i hope i haven’t misunderstood you.

  • Have you built/compiled your module yet?
  • Have you uploaded it to an Openmrs server ?

yes … I follow the indications of the book “open-mrs devmanual”… I think I made a mistake. when i set up the Openmrs server i chose “distribution” when i created the module i chose “platform”

what is more easy for you ,

  • create a platform or reference application module(depending on what you want) using the sdk.
  • Then deploy the module in a standalone application not the SDK server. life will be easier for you running a standalone (either platform or reference apllication), depending on the kind of module you created
1 Like

I have not written any code yet. I followed these instructions @sharif

can you list down the steps so far what you have done??

  • set up the environnement( jdk 1.8, mysql 5.7, maven 3.6, openmrs sdk 3.13 )

  • Create OpenMRS Instance with this command “mvn openmrs-sdk:setup”(i chose Distribution and setup reference application)

  • i create a project " mvn openmrs-sdk:create-project " i choose platform module"

  • then mvn clean install openmrs-sdk:run -DserverId=your_server_id_here

  • Log in with user: admin password :Admin123

  • i uploaded the module and i have “HTTP status 404” @mozzy

1 Like

can I have two openmrs server? setup Distribution after setup platform with the same link for the database , the same username ,the same password , the same port or another port… like platform use 8080, Distribution use 8081…

1 Like