# com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'diagnosis0\_.rank' in 'field list'

**URL:** <https://talk.openmrs.org/t/com-mysql-jdbc-exceptions-jdbc4-mysqlsyntaxerrorexception-unknown-column-diagnosis0-rank-in-field-list/38999>\
**Category:** Ask OpenMRS\
**Created:** [March 14, 2023, 9:55am UTC](https://talk.openmrs.org/t/com-mysql-jdbc-exceptions-jdbc4-mysqlsyntaxerrorexception-unknown-column-diagnosis0-rank-in-field-list/38999 "2023-03-14T09:55:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ornella](https://talk.openmrs.org/letter_avatar/ornella/32/5_5575768a8748004e209b776fc1b2916d.png) [@ornella](https://talk.openmrs.org/u/ornella)\
**Post date:** [March 14, 2023, 9:55am UTC](https://talk.openmrs.org/t/com-mysql-jdbc-exceptions-jdbc4-mysqlsyntaxerrorexception-unknown-column-diagnosis0-rank-in-field-list/38999/1 "2023-03-14T09:55:25Z")

</div>

Hi, my server stop working but i had the backup so i restore my database and everything is working except the search when click on it to find the patient and write the patient name i find nothing and when i click on the the name displayed on screenshoot i get this error below

 ![image](https://talk.openmrs.org/uploads/default/original/3X/3/1/3127870a1047552d065b5d1283e94aac258a0d1f.png)

 ![image](https://talk.openmrs.org/uploads/default/original/3X/d/1/d1c824015b8a4c8ed1e27ee4e53945175cf05ff4.png)

@ibacher , @dkayiwa , @ruhanga , @herbert24 Any idea on how to solve it.

Thank you

---

<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 14, 2023, 11:51am UTC](https://talk.openmrs.org/t/com-mysql-jdbc-exceptions-jdbc4-mysqlsyntaxerrorexception-unknown-column-diagnosis0-rank-in-field-list/38999/2 "2023-03-14T11:51:24Z")

</div>

Which OpenMRS platform version are you running?

---

<div class="post-metadata">

**Author:** ![ornella](https://talk.openmrs.org/letter_avatar/ornella/32/5_5575768a8748004e209b776fc1b2916d.png) [@ornella](https://talk.openmrs.org/u/ornella)\
**Post date:** [March 14, 2023, 11:56am UTC](https://talk.openmrs.org/t/com-mysql-jdbc-exceptions-jdbc4-mysqlsyntaxerrorexception-unknown-column-diagnosis0-rank-in-field-list/38999/3 "2023-03-14T11:56:45Z")

</div>

@dkayiwa reference application 2.10

---

<div class="post-metadata">

**Author:** ![ornella](https://talk.openmrs.org/letter_avatar/ornella/32/5_5575768a8748004e209b776fc1b2916d.png) [@ornella](https://talk.openmrs.org/u/ornella)\
**Post date:** [March 15, 2023, 9:24am UTC](https://talk.openmrs.org/t/com-mysql-jdbc-exceptions-jdbc4-mysqlsyntaxerrorexception-unknown-column-diagnosis0-rank-in-field-list/38999/4 "2023-03-15T09:24:32Z")

</div>

I restore de backup in another server version 2.10 i get this error, anyone got the same issue ?

---

<div class="post-metadata">

**Author:** ![josephbate](https://talk.openmrs.org/user_avatar/talk.openmrs.org/josephbate/32/11477_2.png) [@josephbate](https://talk.openmrs.org/u/josephbate)\
**Post date:** [March 15, 2023, 3:29pm UTC](https://talk.openmrs.org/t/com-mysql-jdbc-exceptions-jdbc4-mysqlsyntaxerrorexception-unknown-column-diagnosis0-rank-in-field-list/38999/5 "2023-03-15T15:29:39Z")

</div>

can you share your log errors if possible in pastebin

---

<div class="post-metadata">

**Author:** ![ornella](https://talk.openmrs.org/letter_avatar/ornella/32/5_5575768a8748004e209b776fc1b2916d.png) [@ornella](https://talk.openmrs.org/u/ornella)\
**Post date:** [March 15, 2023, 3:46pm UTC](https://talk.openmrs.org/t/com-mysql-jdbc-exceptions-jdbc4-mysqlsyntaxerrorexception-unknown-column-diagnosis0-rank-in-field-list/38999/6 "2023-03-15T15:46:59Z")

</div>

@josephbate here is the log: [Pastebin.com - #1 paste tool since 2002!](https://pastebin.com/?s=yIyuKWgRx5KyIQw&&oMe0X3K2PV9NCTY)

---

<div class="post-metadata">

**Author:** ![josephbate](https://talk.openmrs.org/user_avatar/talk.openmrs.org/josephbate/32/11477_2.png) [@josephbate](https://talk.openmrs.org/u/josephbate)\
**Post date:** [March 15, 2023, 4:19pm UTC](https://talk.openmrs.org/t/com-mysql-jdbc-exceptions-jdbc4-mysqlsyntaxerrorexception-unknown-column-diagnosis0-rank-in-field-list/38999/7 "2023-03-15T16:19:53Z")

</div>

you’ve shared unempty link i dont see any error logs 😟

---

<div class="post-metadata">

**Author:** ![ornella](https://talk.openmrs.org/letter_avatar/ornella/32/5_5575768a8748004e209b776fc1b2916d.png) [@ornella](https://talk.openmrs.org/u/ornella)\
**Post date:** [March 15, 2023, 5:51pm UTC](https://talk.openmrs.org/t/com-mysql-jdbc-exceptions-jdbc4-mysqlsyntaxerrorexception-unknown-column-diagnosis0-rank-in-field-list/38999/8 "2023-03-15T17:51:53Z")

</div>

@josephbate sorry here is the log [Caused by: org.hibernate.exception.SQLGrammarException: could not extract Result - Pastebin.com](https://pastebin.com/X27H7gyp)

---

<div class="post-metadata">

**Author:** ![josephbate](https://talk.openmrs.org/user_avatar/talk.openmrs.org/josephbate/32/11477_2.png) [@josephbate](https://talk.openmrs.org/u/josephbate)\
**Post date:** [March 16, 2023, 7:30am UTC](https://talk.openmrs.org/t/com-mysql-jdbc-exceptions-jdbc4-mysqlsyntaxerrorexception-unknown-column-diagnosis0-rank-in-field-list/38999/9 "2023-03-16T07:30:44Z")

</div>

hello @ornellai think your encountering a non-existing or renamed attributed in either pojo class or the data-base

> 1. Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column ‘diagnosis0\_.rank’ in ‘field list’

i might suggect you review the specific class in which this attribute exist according to the version your runing or the uptodate version to check for any naming convetion changes and adjust acordingly or maybe use the current version

i believe that may solve the problem

---

<div class="post-metadata">

**Author:** ![josephbate](https://talk.openmrs.org/user_avatar/talk.openmrs.org/josephbate/32/11477_2.png) [@josephbate](https://talk.openmrs.org/u/josephbate)\
**Post date:** [March 16, 2023, 7:33am UTC](https://talk.openmrs.org/t/com-mysql-jdbc-exceptions-jdbc4-mysqlsyntaxerrorexception-unknown-column-diagnosis0-rank-in-field-list/38999/10 "2023-03-16T07:33:25Z")

</div>

but still either way you need to find out what changes were made so you can check for that on the github account [OpenMRS · GitHub](https://github.com/openmrs)
