# hibernate "NOsuch method error"

**URL:** <https://talk.openmrs.org/t/hibernate-nosuch-method-error/17917>\
**Category:** Development\
**Created:** [May 7, 2018, 3:41am UTC](https://talk.openmrs.org/t/hibernate-nosuch-method-error/17917 "2018-05-07T03:41:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mozzy](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mozzy/32/11815_2.png) [@mozzy](https://talk.openmrs.org/u/mozzy)\
**Post date:** [May 7, 2018, 3:41am UTC](https://talk.openmrs.org/t/hibernate-nosuch-method-error/17917/1 "2018-05-07T03:41:47Z")

</div>

i have added a service class to my module, added a table to the database using LIquibase,configured the hibernete.xml file and the module applicationcontext.xml file . but when i i try to run the module link from administration page , it gives me the following error

[erro\_log](https://hastebin.com/hepoqurusi.swift)

and here is my module on it hub [myFacelist\_module](https://github.com/mozzy11/myFaceList_module)

. i have tried to google , one of the suggested cause was about the spring and hibernate version incompatibility.

@dkayiwa@tendomart@wyclif @ssmusoke@k.joseph

---

<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:** [May 8, 2018, 9:57am UTC](https://talk.openmrs.org/t/hibernate-nosuch-method-error/17917/2 "2018-05-08T09:57:02Z")

</div>

Did you get a chance to look at this? [https://wiki.openmrs.org/display/docs/Supporting+Platform+2.0+and+below](https://wiki.openmrs.org/display/docs/Supporting+Platform+2.0+and+below)

---

<div class="post-metadata">

**Author:** ![mozzy](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mozzy/32/11815_2.png) [@mozzy](https://talk.openmrs.org/u/mozzy)\
**Post date:** [May 8, 2018, 10:07am UTC](https://talk.openmrs.org/t/hibernate-nosuch-method-error/17917/3 "2018-05-08T10:07:30Z")

</div>

thx @dkayiwa… let me surely look at it

---

<div class="post-metadata">

**Author:** ![mozzy](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mozzy/32/11815_2.png) [@mozzy](https://talk.openmrs.org/u/mozzy)\
**Post date:** [May 8, 2018, 1:12pm UTC](https://talk.openmrs.org/t/hibernate-nosuch-method-error/17917/4 "2018-05-08T13:12:26Z")

</div>

but am still confused on how to use the Dbsession class in my DAO. Do i have first have to copy the whole Dbsession class code into my project… and that woud also ,mean copying the DBsessionFactory class code? .

yet wen i copy the whole DbsessionFactory class code , it returns errors 🤔

ive failed to configure how to use the db session 😣

---

<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:** [May 8, 2018, 2:00pm UTC](https://talk.openmrs.org/t/hibernate-nosuch-method-error/17917/5 "2018-05-08T14:00:10Z")

</div>

If you find the DbSession option to be complicated, then you may just do this: [https://github.com/openmrs/openmrs-module-xforms/commit/5d79f327d27777a40ec755a90433e4dc69067e4a](https://github.com/openmrs/openmrs-module-xforms/commit/5d79f327d27777a40ec755a90433e4dc69067e4a)

---

<div class="post-metadata">

**Author:** ![mozzy](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mozzy/32/11815_2.png) [@mozzy](https://talk.openmrs.org/u/mozzy)\
**Post date:** [May 11, 2018, 9:35am UTC](https://talk.openmrs.org/t/hibernate-nosuch-method-error/17917/6 "2018-05-11T09:35:13Z")

</div>

Thank u sir , i finally solved t. my problem was that , eventhe openmrs-api my module was using doesnt contain the hibernate-compatibility source code as most of the references in that document. so i had to first include the hibernate-compatibility module to be able to use the DbSessionFactory class

---

<div class="post-metadata">

**Author:** ![ayesh](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ayesh/32/10674_2.png) [@ayesh](https://talk.openmrs.org/u/ayesh)\
**Post date:** [May 8, 2020, 9:58am UTC](https://talk.openmrs.org/t/hibernate-nosuch-method-error/17917/7 "2020-05-08T09:58:05Z")

</div>

Exactly what I was looking for 🤣

Thanks again @dkayiwa and @mozzy

---

<div class="post-metadata">

**Author:** ![mozzy](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mozzy/32/11815_2.png) [@mozzy](https://talk.openmrs.org/u/mozzy)\
**Post date:** [May 8, 2020, 2:32pm UTC](https://talk.openmrs.org/t/hibernate-nosuch-method-error/17917/8 "2020-05-08T14:32:59Z")

</div>

oops , i even had forgotten about some of these posts i used to make 😃
