Unable to compile class for JSP

Hello … i tried to create a module Department as per the instruction on http://en.flossmanuals.net/openmrs-developers-guide/hello-world-module/ . But When i compiled the module and tried to load my module in the openmrs-core project … It loads but with the following error.Anyone… please suggest me solution for that . http://pastebin.com/pBh2L8wC

Sorry … again … but Now i am stucked at getting 2 type of errors while using response type get and post on the controller file …now … http://pastebin.com/C6Uv3Eii http://pastebin.com/jFC7gxES

Make sure your controller method that’s mapped to the URL has the @RequestMapping annoation with either no method attribute specified since it is the default or it is explicitly set to GET

Dear wyclif , i tried not specifying the method attribute but stilll results thesame error

http://pastebin.com/C6Uv3Eii

Could you please review the code of my AdminList, Controller amd jsp file and explain me the solution.

http://pastebin.com/iWkX08sB

@niraj here is an example of how you can fix the hibernate exception in HibernateDepartmentDAO

1 Like

Dear dkayiwa, sorry but …I am still confused how sessionFactory.getCurrentSession() can be replaced with only getCurrentSession() .

The getCurrentSession() that is called is not the same sessionFactory.getCurrentSession(). The getCurrentSession() is a private method that returns sessionFactory.getCurrentSession(). Look at the bottom of the file you will see where its defined.

1 Like

I’m not sure if you omitted some code, but i don’t see your controller’s code?

1 Like

Thanks … dkayiwa … this has helped to to solve the problem … :slight_smile: :slight_smile:

Yeh … thanks … stupidity of mine :slight_smile: :slight_smile:

I have this issue solved … thanks !!

:slight_smile: we all did that at some point in time. Always feel free to ask when you are stuck.

1 Like

I came across similar issue while accessing DHIS2 module… I guess similar changes required in ./api/src/main/java/org/openmrs/module/dhisreport/api/db/hibernate/HibernateDHIS2ReportingDAO.java