Hello, I have created my own module for OpenMRS based on OpenMRS SDK - Documentation - OpenMRS Wiki.
OpenMRS version is 2.3.0. Java version and Tomcat version are also correct.
First, the legacy UI was working fine but after deploying my module the UI is failing.
Maybe there is a problem with the RequestMapping of the Controller. But I am not sure because no error is given by OpenMRS. Or maybe its because of my config.xml, the code is given below.
Nevertheless, always a HTTPS Status 404 - Not Found error occurs when running the system.
The code for the request mapping is the following:
@Controller(“deviceconnector.DeviceconnectorController”)
@RequestMapping(value = “module/deviceconnector/deviceconnector.form”)
public class DeviceconnectorController {
/** Logger for this class and subclasses */
protected final Log log = LogFactory.getLog(getClass());
@Autowired
UserService userService;
/** Success form view name */
private final String VIEW = “/module/${rootArtifactid}/${rootArtifactid}”;
/**
Initially called after the getUsers method to get the landing form name
The problem is in your configurations in moduleApplicationContext.xml file, it shows either you didn’t define your bean class package path to the exact controller class.
Thats why deviceConnector.List Url path was not reached by the ui controller file check how we define our path in any module
Thanks for your answer. But how do I know what to write in my bean class? When I look into the other module beans then there is “a lot of” code. So what I am supposed to write when beginning from scratch? I am not quiet sure what code is mandatory that it works and what is not…
Cant exactly tell what you are trying to accomplish because this is basing on code. is this something on GitHub that you can share and i give you a draft about how it can be done
Can you please first take a look at this /chapter: Creating-Your-First-Module / OpenMRS Developers Guide. make sure you follow the convention of how they created each step of the workflow, it will give you a basic overview of how you can spear head your module. thanks