Groovy A javascript error has occurred: [Ljava.lang.StackTraceElement; cannot be cast to [F

Have been running Groovy scripts from OpenMRS version 1.9.7 well, after upgrade to version 1.11.6 I can’t execute any scripts now I get a javascript error has occurred: [Ljava.lang.StackTraceElement; cannot be cast to [F . Have tried all the version of Groovy module. current have using version 2.2.4 of the groovy

Can you share the server side log at pastebin.com?

https://pastebin.com/FnruCvL0

Have shared.

What are the exact steps for one to reproduce locally?

have not understood your comment

What would i do if i wanted to reproduce the exact same problem on my local computer?

OK install OpenMRS version 1.11.6 then upload groovy module then put in any script in the groovy. println(“text groovy”);

dkayiwa, Did you manage to reproduce this error?? Am experiencing the same issue. I upgraded from OpenMRS 1.9.7 to 1.11.6 and now I cannot run any Groovy Script. The error am getting is

A javascript error has occurred: Cannot cast object ‘[Ljava.lang.StackTraceElement;@97a3e14’ with class ‘[Ljava.lang.StackTraceElement;’ to class ‘java.

ang.Number’

Can you give me the detailed instructions on how to reproduce?

Requirements: - Java1.8, Apache/Tomcat7

  1. Install OpenMRS 1.11.6
  2. Upload groovy module v2.2.4
  3. Try writing any valid groovy-script

I have the same exact error with running any groovy scripts.

  1. Using OpenMRS Version: 2.1.3 SNAPSHOT
  2. Using Groovy module 2.2.4
  3. Groovy links do NOT appear on the administration page. It does start with a java.lang.IllegalStateException starts. https://pastebin.com/Ts4PqKRR
  4. Use this link – http://localhost:8080/openmrs/module/groovy/groovy.form
  5. Using the simplest groovy script (same as above): groovy.println(“foobar”);

@danetopot @rugute Was this every fixed?

@dkayiwa Should I open a JIRA ticket?

@ball, this ticket looks related from 2014:

Mike

Hello Ellen, We never got a solution to this.

I spent a little time today trying to throw in a fix for this. I ended up working to add support to run the Groovy Module successfully on OpenMRS 2.x, which can be seen in ticket and commit links here. I expect this should work for all OpenMRS versions from 1.9.9 +. Any further issues, please log tickets.

Mike

Hi Dkayiwa,

This has never been fixed.

Do you have a solution?

@danetopot did you see @mseaton’s comment?