Camunda springboot groovy execution error

Hello

I try to run a simple groovy script in my bpmn and I get org.camunda.bpm.engine.exception.NullValueException: Can’t find scripting engine for ‘groovy’: scriptEngine is null error :(.
I have check in the pom and the dependency contains the groovy.
Do you have any idea why don’t know the Camunda the groovy?

thanks: Gábor

Without knowing more details I can only guess that you don’t have groovy support within your Java container. For WildFly, in some circumstances, you need to add an “extension” or module that references the Groovy library. This is done in the WildFly standalone.xml file with an entry something like this:

<server xmlns="urn:jboss:domain:4.0">
    <extensions>
...
        <extension module="org.codehaus.groovy.groovy-all"/>
    </extensions>

I hope this helps.

Hello

I tried with Camunda Springboot application. I have no idea how can I set
the groovy. I added the groovy as dependency.

Regard: SG

Üdv: SG
2017.02.25. 16:31 ezt írta (“Mppfor Manu” forum@camunda.com):

Sorry, Gabor, I’ve never used that. We build our stuff in Eclipse using the now deprecated Eclipse plugin and run in the prepackaged WildFly distribution Camunda provides.

My point was that it’s possible that the Camunda BPMN engine itself is lacking a dependency as I remember reading about having to explicitly include expression language support when using languages other than FEEL and JUEL. This is probably version dependent also. My thinking is that whatever Java container you’re using should provide some form of global “module” (Java library, etc.) support so that all applications running within it can use that library.

We use Camunda as shared engine more than a year and we have never met this
problem but last time I tried the Camunda springboot version :frowning: .
I will try a clean Springboot and Camunda and maybe that will be working.

Hi Gabor,

I cannot reproduce this issue … I just created an empty camunda spring boot module and added groovy-all as a dependency … and I was able to use a script task.

have a look at https://github.com/springbootcamp/camunda-springboot-examples/tree/master/camunda-springboot-groovy

Jan

1 Like

Hello Jan,

I have added the groovy to my pom as your project but the situation is the same :(.
Here is my all project:https://github.com/lizergsav/springbootExample

Gabor

Hi Gabor …

first a word of advise: you should not publish the oracle jar on github … if oracle does not share it freely, you mustn’t do so yourself. To avoid legal issues, include it in your gitignore asap …

Then: Though I am always interested in looking at other peoples projects to see how they work with the extension, I just won’t have the time to do so this week. Please try it the other way around: check my example and confirm that groovy+camunda-spring-boot-starter works … it which case your problems must lie somewhere else.

From I first look at your pom, I discovered that you use camunda 7.5 and the starter in 2.0.0 … we do state that 2.0.0 requires 7.6.0 (https://github.com/camunda/camunda-bpm-spring-boot-starter/blob/master/docs/src/main/asciidoc/changelog/200.adoc), so although I doubt that this is related to your problems, you should decide to either switch to 7.6 or go back to 1.3.0 with the starter …

good luck searching … do not hesitate to come back with concrete questions, just bare with me when it comes to concrete answers, it might take a while.

Jan

1 Like

Hello Jangalinski

Thank you very much your help. I deleted the oracle jar ( I have forgotten to add the jar to the gitignore)
I changed the Camunda version from 7.5 to 7.6 and it is working :)!

We would like to create a demo application that is the reason why I would like to try your Springboot Camunda version.
I will update my project on my git repo continuously.

Thank you very much again your help.

Regards: Gáboir

cool. Sometimes (well, more: most of the times :-)), its the little things …

1 Like

Hi

I am facing the problem as below when starting the workflow. Workflow is deployed on embedded Camunda in a micro service.

Cannot instantiate process definition bpm-drug:1:505ff1f2-7153-11e9-a44d-ded63d2e4778: Can’t find scripting engine for ‘groovy’: scriptEngine is null

Can you please let me know what may be the problem. Just to give the background I used DMN as part of BPMN. In DMN, decision table uses groovy expression.

Here is my pom.xml:
pom.xml (6.2 KB)

thank you

Hi @sudargudipati,

you should move your groovy depedency to somewhere below line 75, to be part of your dependencies.

And remove the type pom.

Hope this helps, Ingo

1 Like

groovy-all dependency is too big (look at all the dependencies). In my case it started ignoring JUnit tests during maven build.
This should be sufficient:

<dependency>
	<groupId>org.codehaus.groovy</groupId>
	<artifactId>groovy-jsr223</artifactId>
	<scope>compile</scope>
</dependency>
2 Likes

@Roman_Pipik exclude the groovy test cases dependency

<exclusions>
				<exclusion>
					<groupId>org.codehaus.groovy</groupId>
					<artifactId>groovy-test</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.codehaus.groovy</groupId>
					<artifactId>groovy-test-junit5</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.codehaus.groovy</groupId>
					<artifactId>groovy-testng</artifactId>
				</exclusion>
<exclusions>