Available connectors

Hi camunda,

i am currently trying to develop some reusable connectors for camunda as my final study project. But i still dont know how to make my connector work, therefore i hope you can help me understand the problem.

Disregarding from my own code i tried to deploy your webinar-file-connector example to find out what i exactly have to do. i set up a maven project and copy-pasted all your code. Beside that i created a .jar-file from it and put it also into these following directories:

camunda-bpm-wildfly-7.13.0-alpha1\modules\org\camunda\connect\webinar-file-connector
and
camunda-bpm-wildfly-7.13.0-alpha1\server\wildfly-18.0.0.Final\modules\org\camunda\connect\webinar-file-connector
both directories have a module.xml with the following content:

<module xmlns="urn:jboss:module:1.0" name="org.camunda.connect.webinar-file-connector">
  <resources>
    <resource-root path="webinar-file-connector.jar" />
  </resources>

  <dependencies>
    <module name="javax.api"/>
    <module name="org.camunda.commons.camunda-commons-logging" />
    <module name="org.camunda.commons.camunda-commons-utils" />

    <module name="org.camunda.connect.camunda-connect-core" />
    <module name="org.camunda.connect.camunda-connect-http-client" />

    <module name="org.apache.httpcomponents.httpclient" />
  </dependencies>
</module>

(i saw these steps in the topic „Create “Global” Module in WildFly for Custom Library Using Java Delegate Classes“ and this seemed like exactly what i was looking for)

i also created a manifestentry like:

<manifestEntries>
    <Dependencies>org.camunda.connect.webinar-file-connector</Dependencies>
</manifestEntries>

But when i try to run the camunda distribution i always end up getting this error:

Failed to start service org.camunda.bpm.platform.process-engine.default: org.jboss.msc.service.StartException in service org.camunda.bpm.platform.process-engine.default: org.camunda.bpm.engine.ProcessEngineException: Could not load ‘com.camunda.demo.connector.file.impl.FileConnectorProviderImpl’: the class must be visible from the camunda-wildfly-subsystem module.
at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController$1.run(MscManagedProcessEngineController.java:98)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: org.camunda.bpm.engine.ProcessEngineException: Could not load ‘com.camunda.demo.connector.file.impl.FileConnectorProviderImpl’: the class must be visible from the camunda-wildfly-subsystem module.
at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController.createInstance(MscManagedProcessEngineController.java:229)
at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController.addProcessEnginePlugins(MscManagedProcessEngineController.java:190)
at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController.startProcessEngine(MscManagedProcessEngineController.java:176)
at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController$2.run(MscManagedProcessEngineController.java:132)
at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController$2.run(MscManagedProcessEngineController.java:130)
at org.camunda.bpm.container.impl.jboss.util.Tccl.runWithTccl(Tccl.java:54)
at org.camunda.bpm.container.impl.jboss.util.Tccl.runUnderClassloader(Tccl.java:46)
at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController.startInternal(MscManagedProcessEngineController.java:130)
at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController$1.run(MscManagedProcessEngineController.java:91)
… 8 more
Caused by: java.lang.ClassNotFoundException: com.camunda.demo.connector.file.impl.FileConnectorProviderImpl from [Module “org.camunda.bpm.wildfly.camunda-wildfly-subsystem” version 7.13.0-alpha1 from local module loader @5f2108b5 (finder: local module finder @31a5c39e (roots: D:\camunda-bpm-wildfly-7.13.0-alpha1\server\wildfly-18.0.0.Final\modules,D:\camunda-bpm-wildfly-7.13.0-alpha1\server\wildfly-18.0.0.Final\modules\system\layers\base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController.createInstance(MscManagedProcessEngineController.java:225)

or is this approach not the righ way because the file connector does not use java delegate? i cannot find out what i did wrong :confused:

Hello

You need to register the org.camunda.connect.webinar-file-connector module at the camunda-engine-plugins module to reexport. See <wildfly>/modules/org/camunda/bpm/camunda-engine-plugins/main/module.xml

<dependencies>
    <!-- Add custom engine plugins here -->
     <module name="org.camunda.bpm.camunda-engine-plugins" export="true" />
  </dependencies>
</module>

hi roman-mkh,

thank you for your reply. this indeed solved my problem. afterwards i had a compile version problem but i solved it on my own. now i get the following error:

Failed to start service org.camunda.bpm.platform.process-engine.default: org.jboss.msc.service.StartException in service org.camunda.bpm.platform.process-engine.default: org.camunda.bpm.engine.ProcessEngineException: Process engine plugin 'com.camunda.demo.connector.file.impl.FileConnectorProviderImpl' does not implement interface org.camunda.bpm.engine.impl.cfg.ProcessEnginePlugin'.
    at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController$1.run(MscManagedProcessEngineController.java:98)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348)
    at java.lang.Thread.run(Thread.java:748)
    at org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: org.camunda.bpm.engine.ProcessEngineException: Process engine plugin 'com.camunda.demo.connector.file.impl.FileConnectorProviderImpl' does not implement interface org.camunda.bpm.engine.impl.cfg.ProcessEnginePlugin'.
    at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController.addProcessEnginePlugins(MscManagedProcessEngineController.java:192)
    at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController.startProcessEngine(MscManagedProcessEngineController.java:176)
    at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController$2.run(MscManagedProcessEngineController.java:132)
    at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController$2.run(MscManagedProcessEngineController.java:130)
    at org.camunda.bpm.container.impl.jboss.util.Tccl.runWithTccl(Tccl.java:54)
    at org.camunda.bpm.container.impl.jboss.util.Tccl.runUnderClassloader(Tccl.java:46)
    at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController.startInternal(MscManagedProcessEngineController.java:130)
    at org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController$1.run(MscManagedProcessEngineController.java:91)
    ... 8 more

maybe my approach for making the connector available was not right?! the docs say:

To provide a custom connector, you have to

* Provide a custom implementation of  `org.camunda.connect.spi.Connector`
* Provide a custom implementation of  `org.camunda.connect.spi.ConnectorProvider`
* Add the provider’s fully qualified classname to a file named  `META-INF/services/org.camunda.connect.spi.ConnectorProvider`
* Ensure that the artifact containing the provider is reachable from Connect’s classloader

i think there might be a mistake in the 3rd and 4th point. but i copied the path from the file “FileConnnectorProviderImpl” and pasted it into the services-file in META-INF. so i assume that the path at this point should be right. what exactly is the Connect’s classloader?

Hello Sandra,

I think, you registered your provider as a Camunda Plugin at standalone.xml. But you provider is neither a plugin, nor supposed to be.

  1. You need in you jar (I assume webinar-file-connector.jar) create a text file “org.camunda.connect.spi.ConnectorProvider” inside folder META-INF/services/. This file should contains a single line full qualified name of you coinnector provider com.camunda.demo.connector.file.impl.FileConnectorProviderImpl (implementation of org.camunda.connect.spi.ConnectorProvider)
  2. Create camunda connect plugin class Probalby, the implementation could be empty, or check it please with examples.
  3. Register your plugin at standalone.xml under process-engines/plugins/plugins.

Good luck

  • R
1 Like

Thank you for your support, roman-mkh! My custom connector is working now. Actually I did what the docs say:

  1. Provide a implementation of .Connector & .ConnectorProvider
  2. The file called “org.camunda.connect.spi.ConnectorProvider” with the qualified full pathname in META-INF/services
  3. I placed the .jar and module.xml in this directory:

wildfly-18.0.0.Final\modules\org\camunda\connect\san-file-connector

  1. I placed my module reference in the module.xml of the org\camnda\bpm\camunda-engine-plugin-connect\main with the following:

<module name="org.camunda.connect.san-file-connector" services="import" />

Beside that, I removed the maninfestEntry in the pom.xml.

I think my main problem was the misunderstanding of how wildfly module system works. but i think i got it now. :slight_smile: happy… well at least i’m closer than yesterday. step by step!

thanks again :slight_smile: