Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-4813

SQLException during the initial setup on MySQL 5.7

    Details

    • Complexity:
      Low

      Description

      When configuring a new OpenMRS server (initial setup), an SQL exception is thrown:
      Error executing SQL UPDATE person_attribute_type as A JOIN person_attribute_type as B ON A.name = B.name SET A.sort_weight = (select count from (select * from person_attribute_type) pat where pat.name < A.name) WHERE A.sort_weight is null: You can't specify target table 'A' for update in FROM clause: Caused By: You can't specify target table 'A' for update in FROM clause Error while trying to update to the latest database version

      Full stacktrace and screenshot are in attachment.
      I use the latest MySQL server version (5.7.10)

      To reproduce this, download the openmrs war file from https://sourceforge.net/projects/openmrs/files/releases/OpenMRS_Platform_2.0.0/ and follow the .war package install instructions in the readme.txt as below:
      1. Install Apache Tomcat.
      2. Install MySQL 5.7 or higher.
      3. Put openmrs.war into <tomcathome>/webapps.
      Notice that the war file exceeds 50MB which is the default maximum war file size accepted by
      tomcat and therefore you may have to look into https://talk.openmrs.org/t/openmrs-war-file-
      exceeding-50mbs-configured-for-tomcat/861 to solve the error you may get while uploading it
      into tomcat
      4. Visit http://localhost:8080/openmrs and run the installation wizard. You can choose the "Simple" installation type.

      You could also see https://wiki.openmrs.org/display/docs/Installing+OpenMRS

        Gliffy Diagrams

          Attachments

          1. logs.txt
            4 kB
          2. screenshot.jpg
            screenshot.jpg
            702 kB

            Attachments-Category-Modification

              Activity

                People

                • Assignee:
                  dkayiwa Daniel Kayiwa
                  Reporter:
                  dkayiwa Daniel Kayiwa
                  Watchers:
                  Alexander Berg, Daniel Kayiwa, Fabien Testaniere, NAGASOWMYA MAJETY, Namrata Nehete, PaweĊ‚ Gutkowski, Shreyans Sheth, Wyclif Luyima
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 1 hour
                    1h