GroovyConnector not found on server

Good morning,
I’m working on a new process and I came to the following issue trying to run it on my Bonita Engine server.
From the portal within the studio, there’s no errors at all and the process runs perfectly well.

The error is : org.bonitasoft.connectors.scripting.GroovyScriptConnector can not be found.

I checked in the Bar file and there’s the file scripting-groovy-script-impl-1.0.2.impl in the connector folder.

Any ideas ?

Thanks.

2016-06-28 06:56:11.254 +0000 org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork org.bonitasoft.engine.log.technical.TechnicalLoggerSLF4JImpl log 
SEVERE: THREAD_ID=88 | HOSTNAME=8d0fa54fb32a | TENANT_ID=1 | The work [ExecuteConnectorOfActivity: flowNodeInstanceId = 7, connectorDefinitionName = test] failed. The failure will be handled.
2016-06-28 06:56:11.280 +0000 org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork org.bonitasoft.engine.log.technical.TechnicalLoggerSLF4JImpl log 
SEVERE: THREAD_ID=88 | HOSTNAME=8d0fa54fb32a | TENANT_ID=1 | org.bonitasoft.engine.core.connector.exception.SConnectorException : "PROCESS_DEFINITION_ID=6532504527787750881 | PROCESS_NAME=Pool | PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=2 | ROOT_PROCESS_INSTANCE_ID=2 | FLOW_NODE_DEFINITION_ID=7791596893337189311 | FLOW_NODE_INSTANCE_ID=7 | FLOW_NODE_NAME=Étape1 | CONNECTOR_IMPLEMENTATION_CLASS_NAME=test | CONNECTOR_INSTANCE_ID=3 | org.bonitasoft.connectors.scripting.GroovyScriptConnector can not be found."
org.bonitasoft.engine.core.connector.exception.SConnectorException: PROCESS_DEFINITION_ID=6532504527787750881 | PROCESS_NAME=Pool | PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=2 | ROOT_PROCESS_INSTANCE_ID=2 | FLOW_NODE_DEFINITION_ID=7791596893337189311 | FLOW_NODE_INSTANCE_ID=7 | FLOW_NODE_NAME=Étape1 | CONNECTOR_IMPLEMENTATION_CLASS_NAME=test | CONNECTOR_INSTANCE_ID=3 | org.bonitasoft.connectors.scripting.GroovyScriptConnector can not be found.
	at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnectorInClassloader(ConnectorServiceImpl.java:270)
	at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnector(ConnectorServiceImpl.java:147)
	at org.bonitasoft.engine.connector.ConnectorServiceDecorator.executeConnector(ConnectorServiceDecorator.java:114)
	at org.bonitasoft.engine.execution.work.ExecuteConnectorWork.work(ExecuteConnectorWork.java:138)
	at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
	at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
	at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
	at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
	at org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork.work(FailureHandlingBonitaWork.java:66)
	at org.bonitasoft.engine.work.BonitaWork.run(BonitaWork.java:56)
	at org.bonitasoft.engine.work.SequenceRunnableExecutor.innerRun(SequenceRunnableExecutor.java:47)
	at org.bonitasoft.engine.work.BonitaRunnable.run(BonitaRunnable.java:35)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.bonitasoft.connectors.scripting.GroovyScriptConnector
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1856)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1705)
	at org.bonitasoft.engine.classloader.VirtualClassLoader.loadClass(VirtualClassLoader.java:88)
	at org.bonitasoft.engine.classloader.BonitaClassLoader.loadClass(BonitaClassLoader.java:169)
	at org.bonitasoft.engine.classloader.VirtualClassLoader.loadClass(VirtualClassLoader.java:86)
	at org.bonitasoft.engine.classloader.BonitaClassLoader.loadClass(BonitaClassLoader.java:169)
	at org.bonitasoft.engine.classloader.VirtualClassLoader.loadClass(VirtualClassLoader.java:86)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:278)
	at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnectorInClassloader(ConnectorServiceImpl.java:266)
	... 14 more

Hi,

check in Configure menu if the correct implementation is associated to groovy-script connector.
Hope this help.

Hi Michele, here are the details :

Definition : Groovy 2.4 (1.0.1)
Implementation : scripting-groovy-script-impl (1.0.2) – Support Groovy 2.2.4

This is an old process from Bonita 6 but the implementation looks as (same as in other Bonita 7 process that I created)
And why does it work running in Bonita Engine on my machine from the studio, and doesn’t work on production server ?

Thanks for your help.

Hi raphael,

in Configuration Menu → process dependencies, you should check if the checkbox scripting-groovy-script-impl-1.0.2 is checked (and if the related jar is checked)
Let me know.

Any help ?

I’m still waiting for a solution :frowning:

Back at work on this monday morning.
Still needing a solution …
Thanks.

Any help ?

Ok I figure out this issue.

I was running Bonita in a Docker container running in a VirtualBox, running on a Windows machine.
The fact that I redirected /opt/bonita to a local folder on my Windows harddrive was the issue.

I tried differents things to realise that :

Bonita Engine stadalone on Windows
Bonita Engine on Linux
Bonita Engine on Docker inside Linux
Bonita Engine on Docker on Windows without the file redirection.

All of those solutions worked.

yes both the jar and the connector are checked.

Do you have bonita-connector-scripting-groovy-script-impl-1.0.2.jar into $BONITA_HOME/workspace/default/lib?

Yes, it works well on my computer with the Studio.

But it doesn’t work on production server, with the Engine only.

The file bonita-connector-scripting-groovy-script-impl-1.0.2.jar is embedded into the BAR file as far as I’ve checked that.

Hi raphael, check if, when you export your *.bar file to install process in production environment, it contains a folder named connector that contains bonita-connector-scripting-groovy-script-impl-1.0.2.jar.

Let me know

Hmmm,
the file in the folder connector is named “scripting-groovy-script-impl-1.0.2.impl

I’m sorry, you’re right, the correct name is scripting-groovy-script-impl-1.0.2.impl.

What if you type find / -name bonita-connector-scripting in production environment?

it looks like this :

root@8d0fa54fb32a:/opt/bonita# find / -name bonita-connector-scripting*
/opt/bonita/BonitaBPMCommunity-7.2.3-Tomcat-7.0.67/temp/tempBarFolder4139429807337507797.tmp/classpath/bonita-connector-scripting-groovy-script-impl-1.0.2.jar
/opt/bonita/BonitaBPMCommunity-7.2.3-Tomcat-7.0.67/temp/tempBarFolder4545029184813328854.tmp/classpath/bonita-connector-scripting-groovy-script-impl-1.0.2.jar
/opt/bonita/BonitaBPMCommunity-7.2.3-Tomcat-7.0.67/temp/tempBarFolder6657436500570937556.tmp/classpath/bonita-connector-scripting-groovy-script-impl-1.0.2.jar