# Issue: HTTP Status 500 - BeanFactory Not Initialized After Uploading new Platform Module

**URL:** <https://talk.openmrs.org/t/issue-http-status-500-beanfactory-not-initialized-after-uploading-new-platform-module/45194>\
**Category:** Development\
**Tags:** module, error, developers-forum\
**Created:** [March 6, 2025, 8:50am UTC](https://talk.openmrs.org/t/issue-http-status-500-beanfactory-not-initialized-after-uploading-new-platform-module/45194 "2025-03-06T08:50:51Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaushika](https://talk.openmrs.org/user_avatar/talk.openmrs.org/kaushika/32/20742_2.png) [@kaushika](https://talk.openmrs.org/u/kaushika)\
**Post date:** [March 6, 2025, 8:50am UTC](https://talk.openmrs.org/t/issue-http-status-500-beanfactory-not-initialized-after-uploading-new-platform-module/45194/1 "2025-03-06T08:50:51Z")

</div>

I generated a new OpenMRS platform module using the SDK with the command: **mvn openmrs-sdk:create-project**

The module was built successfully, and I uploaded the `.omod` file through the OpenMRS admin panel. However, after uploading, I encountered this error:

 ![image](https://talk.openmrs.org/uploads/default/original/3X/8/2/82368295999850d61ec94a361ff7a0dcaf4ebde3.png)

```auto
HTTP Status 500 – Internal Server Error
Type Exception Report

Message Request processing failed; nested exception is java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)

```

I didn’t modify any generated code, so this error is occurring with the default setup. Can anyone help me to setup platform module successfully

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [March 6, 2025, 9:00am UTC](https://talk.openmrs.org/t/issue-http-status-500-beanfactory-not-initialized-after-uploading-new-platform-module/45194/2 "2025-03-06T09:00:11Z")

</div>

Share the server side log via [pastebin.com](http://pastebin.com)

---

<div class="post-metadata">

**Author:** ![kaushika](https://talk.openmrs.org/user_avatar/talk.openmrs.org/kaushika/32/20742_2.png) [@kaushika](https://talk.openmrs.org/u/kaushika)\
**Post date:** [March 6, 2025, 9:20am UTC](https://talk.openmrs.org/t/issue-http-status-500-beanfactory-not-initialized-after-uploading-new-platform-module/45194/3 "2025-03-06T09:20:58Z")

</div>

Sure [WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2034) |2025-03-06T12:24:38,2 - Pastebin.com](https://pastebin.com/iSUxKLP6)

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [March 6, 2025, 9:40am UTC](https://talk.openmrs.org/t/issue-http-status-500-beanfactory-not-initialized-after-uploading-new-platform-module/45194/4 "2025-03-06T09:40:47Z")

</div>

`basicexample-1.0.0-SNAPSHOT.omod is already associated with a loaded module.` you are trying to upload a module which already exists.

---

<div class="post-metadata">

**Author:** ![kaushika](https://talk.openmrs.org/user_avatar/talk.openmrs.org/kaushika/32/20742_2.png) [@kaushika](https://talk.openmrs.org/u/kaushika)\
**Post date:** [March 6, 2025, 9:58am UTC](https://talk.openmrs.org/t/issue-http-status-500-beanfactory-not-initialized-after-uploading-new-platform-module/45194/5 "2025-03-06T09:58:02Z")

</div>

but I created different module name **mynewmodule-1.0.0-SNAPSHOT.omod** and deployed but i still coming same error. plz help me

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [March 6, 2025, 11:03am UTC](https://talk.openmrs.org/t/issue-http-status-500-beanfactory-not-initialized-after-uploading-new-platform-module/45194/6 "2025-03-06T11:03:17Z")

</div>

That is because you did not change the module id for the different module.

---

<div class="post-metadata">

**Author:** ![kaushika](https://talk.openmrs.org/user_avatar/talk.openmrs.org/kaushika/32/20742_2.png) [@kaushika](https://talk.openmrs.org/u/kaushika)\
**Post date:** [March 6, 2025, 11:12am UTC](https://talk.openmrs.org/t/issue-http-status-500-beanfactory-not-initialized-after-uploading-new-platform-module/45194/7 "2025-03-06T11:12:53Z")

</div>

ok so how do I reset the OPEN MRS SDK server . or what steps I should take to resolve this error

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [March 6, 2025, 1:18pm UTC](https://talk.openmrs.org/t/issue-http-status-500-beanfactory-not-initialized-after-uploading-new-platform-module/45194/8 "2025-03-06T13:18:57Z")

</div>

Can we look at your module?

---

<div class="post-metadata">

**Author:** ![kaushika](https://talk.openmrs.org/user_avatar/talk.openmrs.org/kaushika/32/20742_2.png) [@kaushika](https://talk.openmrs.org/u/kaushika)\
**Post date:** [March 6, 2025, 1:42pm UTC](https://talk.openmrs.org/t/issue-http-status-500-beanfactory-not-initialized-after-uploading-new-platform-module/45194/9 "2025-03-06T13:42:21Z")

</div>

sure here is the module I → module repo link [https://github.com/kaushikaW/mynewmodule](https://github.com/kaushikaW/mynewmodule)

I have executed the following steps to create above module .

```auto
mvn openmrs-sdk:create-project

```

```auto
Specify module ID : mynewmodule.

```

```auto
What kind of project would you like to create?: 
1) Platform module 

```

Then after creating the project i build it using the command `mvn clean install` and got build successful message then tried to deploy it using the Admin interface
