Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: SJMS2 connector is incompatible with activemq-all #378

Closed
orpiske opened this issue Aug 17, 2020 · 6 comments · Fixed by #415
Closed

Documentation: SJMS2 connector is incompatible with activemq-all #378

orpiske opened this issue Aug 17, 2020 · 6 comments · Fixed by #415
Assignees

Comments

@orpiske
Copy link
Contributor

orpiske commented Aug 17, 2020

Activemq All (org.apache.activemq:activemq-all:jar:5.16.0) contains some Camel classes that conflict with the version of Camel packaged in 0.4.0 (and probably future versions as well):

jar -tvf camel-sjms2-kafka-connector/activemq-all-5.16.0.jar | grep -i main
   365 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/Main.class
   403 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/impl/MainSupport.class
     0 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/main/
  4934 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/main/Main.class
  6286 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/main/MainDurationEventNotifier.class
  1446 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/main/MainLifecycleStrategy.class
   400 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/main/MainListener.class
  1008 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/main/MainListenerSupport.class
  1202 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/main/MainSupport$1.class
  1335 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/main/MainSupport$2.class
  1596 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/main/MainSupport$3.class
  1389 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/main/MainSupport$4.class
  1600 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/main/MainSupport$5.class
  1169 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/main/MainSupport$6.class
  1389 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/main/MainSupport$7.class
  1334 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/main/MainSupport$8.class
  1274 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/main/MainSupport$HangupInterceptor.class
  2093 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/main/MainSupport$Option.class
  2361 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/main/MainSupport$ParameterOption.class
 18329 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/main/MainSupport.class
  9595 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/spring/Main.class
  1425 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/spring/Main$2.class
  4562 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/spring/util/MainRunner.class
  1421 Thu Jun 25 07:49:44 CEST 2020 org/apache/camel/spring/Main$1.class
  1079 Thu Jun 25 07:49:44 CEST 2020 org/apache/activemq/console/Main$1.class
 12293 Thu Jun 25 07:49:44 CEST 2020 org/apache/activemq/console/Main.class
...

When trying to boot a connector using this jar, it causes the following error:

[2020-08-17 16:26:12,539] ERROR WorkerSinkTask{id=CamelJmsSinkConnector-0} Task threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerTask:186)
java.lang.NoSuchMethodError: org.apache.camel.main.Main.configure()Lorg/apache/camel/main/MainConfigurationProperties;
	at org.apache.camel.kafkaconnector.utils.CamelMainSupport.<init>(CamelMainSupport.java:77)
	at org.apache.camel.kafkaconnector.CamelSinkTask.start(CamelSinkTask.java:98)
	at org.apache.kafka.connect.runtime.WorkerSinkTask.initializeAndStart(WorkerSinkTask.java:305)
	at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:193)
	at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:184)
	at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:234)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Maybe we need to document this as a known incompatibility in the SJMS2 component.

@oscerd
Copy link
Contributor

oscerd commented Aug 17, 2020

We could exclude activemq-camel from activemq-all

@oscerd oscerd self-assigned this Aug 17, 2020
@oscerd
Copy link
Contributor

oscerd commented Aug 17, 2020

I'll do that.

@oscerd
Copy link
Contributor

oscerd commented Sep 2, 2020

Currently I don't see activemq-all in the connector jars.

@orpiske
Copy link
Contributor Author

orpiske commented Sep 2, 2020

Currently I don't see activemq-all in the connector jars.

It's not on our connector jars, but users can download it separately. I created this issue in a situation like that: a user deployed one of the project connectors (I think camel-sjms2 one), tried to use the activemq-all in order to add the required client dependencies and when tried to run, the code would throw this exception.

In terms of packaging, I think we are fine.

Edit: added more info about the scenario.

@oscerd
Copy link
Contributor

oscerd commented Sep 2, 2020

Ok, so I believe we can stress this in the connector documentation, let me add a note :-)

@orpiske
Copy link
Contributor Author

orpiske commented Sep 2, 2020

Ok, so I believe we can stress this in the connector documentation, let me add a note :-)

Cool! I had added a note here: https://github.com/apache/camel-kafka-connector/blob/master/docs/modules/ROOT/pages/troubleshooting.adoc#known-incompatibilities.

Maybe we need to elaborate more because users might end up seeing that after they already have a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants