Good day everyone,
I have followed the guide from OpenMRS SDK - Documentation - OpenMRS Wiki to create a basic module with some UI (a simple Web page accessible from the Admin Console). I was able to build and deploy the module. The default boilerplate code added a link in the admin console (see screenshot below), but when I click on it, I land on the error page shown in the second screenshot.
[update] this issue has been reported here as well, I have tested the solutions suggested there by @dkayiwa and @wyclif with no success.
Error returned when clicking on the link:
I am not sure which changes I need to make on the default auto-generated code to display the default JSP page that was generated by the openmrs SDK.
I included below the content of the webModuleApplicationContext.xml
and config.xml
webModuleApplicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.0.xsd">
<context:component-scan base-package="org.openmrs.module.dhis2.data.agent.web.controller" />
</beans>
config.xml
<?xml version="1.0" encoding="UTF-8"?>
<module configVersion="1.2">
<!-- Base Module Properties -->
<id>${project.parent.artifactId}</id>
<name>${project.parent.name}</name>
<version>${project.parent.version}</version>
<package>org.openmrs.module.dhis2.data.agent</package>
<author>Jembi Health Systems</author>
<description>
${project.parent.description}
</description>
<activator>org.openmrs.module.dhis2.data.agent.DHIS2DataAgentActivator</activator>
<!-- <updateURL>https://modules.openmrs.org/modules/download/@MODULE_ID@/update.rdf</updateURL> -->
<!-- /Base Module Properties -->
<require_version>1.11.6</require_version>
<!-- Extensions -->
<extension>
<point>org.openmrs.admin.list</point>
<class>org.openmrs.module.dhis2.data.agent.extension.html.AdminList</class>
</extension>
<aware_of_modules>
<aware_of_module>org.openmrs.module.legacyui</aware_of_module>
</aware_of_modules>
<!-- AOP
<advice>
<point>org.openmrs.api.FormService</point>
<class>@MODULE_PACKAGE@.advice.DuplicateFormAdvisor</class>
</advice>
/AOP -->
<!-- Required Privileges
<privilege>
<name>Form Entry</name>
<description>Allows user to access Form Entry pages/functions</description>
</privilege>
/Required Privileges -->
<!-- Required Global Properties
<globalProperty>
<property>@MODULE_ID@.someProperty</property>
<defaultValue></defaultValue>
<description>
A description of the global property goes here. The description
should explain enough for administrators to understand the purpose
and possible values for the global property.
</description>
</globalProperty>
/Required Global Properties -->
<!--
<dwr>
<allow>
<create creator="new" javascript="DWRFormEntryService">
<param name="class" value="org.openmrs.module.@MODULE_ID@.web.DWRFormEntryService"/>
<include method="enterForm"/>
</create>
</allow>
<signatures>
<![CDATA[
import @MODULE_PACKAGE@.web.DWRFormEntryService;
DWRFormEntryService.enterForm(Integer patientId, Integer formId, boolean useEncounter, List<String> fields);
]]>
</signatures>
</dwr>
-->
<!-- Servlets -->
<!-- Accessed through the url /pageContext()/moduleServlet/<moduleId>/<servlet-name>
<servlet>
<servlet-name>formDownload</servlet-name>
<servlet-class>@MODULE_PACKAGE@.web.FormDownloadServlet</servlet-class>
</servlet>
-->
<!-- /Servlets -->
<!-- Internationalization -->
<!-- All message codes should start with @MODULE_ID@.* -->
<messages>
<lang>en</lang>
<file>messages.properties</file>
</messages>
<messages>
<lang>fr</lang>
<file>messages_fr.properties</file>
</messages>
<messages>
<lang>es</lang>
<file>messages_es.properties</file>
</messages>
<!-- /Internationalization -->
</module>