Uploaded image for project: 'Groovy Module'
  1. Groovy Module
  2. GRV-35

Error with OpenMRS 1.11: A javascript error has occurred: [Ljava.lang.StackTraceElement; cannot be cast

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: TBD
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Groovy Module 2.3
    • Labels:
      None
    • Complexity:
      Undetermined

      Description

      I tried to run the following Groovy script on OpenMRS Version: 1.11.0 SNAPSHOT Build 48e575 at http://uat01.openmrs.org:8080/openmrs

      def sql(s) { admin.executeSQL(s,false) }
      rs = sql("SELECT secret_answer FROM `users` WHERE system_id=admin")
      println "User Secrets ${rs}"
      

      It gave me the following error: A javascript error has occurred: [Ljava.lang.StackTraceElement; cannot be cast to [F
      The full stacktrace for this error can usually be found in your server's error logs. Hide error

      The SQL Groovy code example...

      /*
       * Easy SQL example, displays number of users in database
       */
       
      def sql(s) { admin.executeSQL(s,false) }
      rs = sql("select count(*) from users")
      println "Number of users ${rs}"
      

      ...from the wiki, https://wiki.openmrs.org/display/docs/Groovy+Module#GroovyModule-ExecuteSQLcommands, also fails with the error.

      This happens with Groovy Module 2.2.4.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mseaton Mike Seaton
              Reporter:
              arbaughj James Arbaugh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: