Questions tagged [groovyclassloader]

GroovyClassLoader is a ClassLoader for loading Groovy classes.

GroovyClassLoader is a ClassLoader for loading Groovy classes.

39 questions
0
votes
1 answer

Loading groovy classes with conflicting names

I use GroovyScriptEngine inside my Java application to load code dynamically from different sources. Let's say I have two folders sources_A\ and sources_B\. GroovyScriptEngine engine = new GroovyScriptEngine(new String[]{ "sources_A",…
0
votes
0 answers

Configure GrrovyClassLoader to honor @CompileStatic annotation

I have a custom Java libary that implements business rules implemented in Groovy and provided via configuration file. I use the GroovyClassLoader to compile the business rules and return the desired class as follows: public class…
vjanzaldi
  • 1
  • 1
0
votes
1 answer

Groovy - is it possible to load binary class?

I have a Java application that uses multiple groovy scripts, the scripts get cached in memory after compilation Using GroovyShell.parse(text) method. Is it possible to compile these script only once and keep binary classes on disk/database? The…
Pma
  • 1,063
  • 1
  • 16
  • 30
0
votes
1 answer

Can't unloaded Groovy classes - PermGen Erros

I have a legacy system that is extensively using Groovy version 1.0 and currently I can not update Groovy to an updated version. From time to time I'm getting a PermGen error due to the fact that all the Groovy classes/scripts are kept in memory…
0
votes
1 answer

Execute groovy script in java project, why the operator “>” is converted to ">"?

This is my groovy script: def map = ["curr_dept":codes.get("ICU_DEPT").value]; def list = getActLists(visit,"TRAN",map,[]); boolean flag = false; if(null!=list && list.size()>=1){ return true; } return false; This is my java code for executing…
Rocky Yu
  • 23
  • 4
0
votes
1 answer

Groovy unable to resolve class in CloudHub

Have the following errors for the following scripts in a Mule flow when I run the application in CloudHub. When I run it on Anypoint studio, there's no issues. I checked the deployed application archive file and in the classes folder is the…
EdC
  • 194
  • 1
  • 15
0
votes
1 answer

How to cast an object in class loaded in classloader

I am new to Stack Overflow. I have created a Groovy class loader's object in which I have loaded all the classes required by my script. I have task of serializing and deserializing an object created of one of the class that is loaded in class…
likhy
  • 13
  • 4
0
votes
2 answers

Injecting spring service in external groovy class created at runtime

I have an Spring-powered app and want to integrate groovy. Specifically, I have one abstract java class with a set of abstract method definitions and one repository inyected with autowired. This class must be implemented by several final groovy…
Antonio Acevedo
  • 1,480
  • 3
  • 21
  • 39
-1
votes
1 answer

Running and optimizing Groovy Scripts dynamic execution in Java application

I have been exploring methods of dynamically running groovy scripts in the java application. I've gone through methods like: 1. Groovy Shell binding.setVariable("x", 5); String script = "y = x * x" GroovyShell gs = new GroovyShell(); Script script =…
1 2
3