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

Confluent Kafka Connect requires an empty constructor #41

Open
dev-mansonthomas opened this issue Jan 7, 2022 · 1 comment
Open

Confluent Kafka Connect requires an empty constructor #41

dev-mansonthomas opened this issue Jan 7, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@dev-mansonthomas
Copy link
Contributor

dev-mansonthomas commented Jan 7, 2022

Hello There,

I've tried to deploy this sample code into Conlufent Kafka Connect 6.2.1,

https://github.com/SolaceProducts/pubsubplus-connector-kafka-source/blob/master/src/main/java/com/solace/connector/kafka/connect/source/msgprocessors/SolSampleSimpleMessageProcessor.java

and I've got the following error :

[2022-01-07 10:56:14,604] ERROR WorkerSourceTask{id=SolaceSourceConnectorConnector_0-0} Task threw an uncaught and unrecoverable exception. Task is being killed and will not recover until manually restarted (org.apache.kafka.connect.runtime.WorkerTask)
org.apache.kafka.connect.errors.ConnectException: Encountered exception in creating the message processor.
	at com.solace.connector.kafka.connect.source.SolaceSourceTask.start(SolaceSourceTask.java:73)
	at org.apache.kafka.connect.runtime.WorkerSourceTask.initializeAndStart(WorkerSourceTask.java:231)
	at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:186)
	at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:237)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.apache.kafka.common.KafkaException: Could not find a public no-argument constructor for com.solace.connector.kafka.connect.source.SolMessageProcessorIF
	at org.apache.kafka.common.utils.Utils.newInstance(Utils.java:391)
	at org.apache.kafka.common.config.AbstractConfig.getConfiguredInstance(AbstractConfig.java:395)
	at org.apache.kafka.common.config.AbstractConfig.getConfiguredInstance(AbstractConfig.java:430)
	at org.apache.kafka.common.config.AbstractConfig.getConfiguredInstance(AbstractConfig.java:415)
	at com.solace.connector.kafka.connect.source.SolaceSourceTask.start(SolaceSourceTask.java:70)
	... 8 more
Caused by: java.lang.NoSuchMethodException: com.solace.connector.kafka.connect.source.SolMessageProcessorIF.<init>()
	at java.base/java.lang.Class.getConstructor0(Class.java:3349)
	at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2553)
	at org.apache.kafka.common.utils.Utils.newInstance(Utils.java:389)
	... 12 more
[2022-01-07 10:56:14,607] INFO ================ Shutting down PubSub+ Source Connector (com.solace.connector.kafka.connect.source.SolaceSourceTask)

adding

    public SourceMessageProcessor(){    
}

fix the issue.

So I guess the sample should be modified to add a default constructor

@Nephery Nephery added the bug Something isn't working label Jan 21, 2022
@kbreit-insight
Copy link

kbreit-insight commented Oct 10, 2024

I am seeing this same error using Strimzi provided Kafka. Has anyone been able to fix or workaround the problem?

2024-10-10 13:28:49,532 INFO [solace-source-connector|task-0] ==================Initialize Connector properties (com.solace.connector.kafka.connect.source.SolaceSourceConnectorConfig) [task-thread-solace-source-connector-0]
2024-10-10 13:28:49,533 ERROR [solace-source-connector|task-0] WorkerSourceTask{id=solace-source-connector-0} Task threw an uncaught and unrecoverable exception. Task is being killed and will not recover until manually restarted (org.apache.kafka.connect.runtime.WorkerTask) [task-thread-solace-source-connector-0]
org.apache.kafka.connect.errors.ConnectException: Encountered exception in creating the message processor.
	at com.solace.connector.kafka.connect.source.SolaceSourceTask.start(SolaceSourceTask.java:74)
	at org.apache.kafka.connect.runtime.AbstractWorkerSourceTask.initializeAndStart(AbstractWorkerSourceTask.java:278)
	at org.apache.kafka.connect.runtime.WorkerTask.doStart(WorkerTask.java:175)
	at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:224)
	at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:280)
	at org.apache.kafka.connect.runtime.AbstractWorkerSourceTask.run(AbstractWorkerSourceTask.java:78)
	at org.apache.kafka.connect.runtime.isolation.Plugins.lambda$withClassLoader$1(Plugins.java:237)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: org.apache.kafka.common.KafkaException: Could not find a public no-argument constructor for com.solace.connector.kafka.connect.source.SolMessageProcessorIF
	at org.apache.kafka.common.utils.Utils.newInstance(Utils.java:401)
	at org.apache.kafka.common.config.AbstractConfig.getConfiguredInstance(AbstractConfig.java:397)
	at org.apache.kafka.common.config.AbstractConfig.getConfiguredInstance(AbstractConfig.java:436)
	at org.apache.kafka.common.config.AbstractConfig.getConfiguredInstance(AbstractConfig.java:421)
	at com.solace.connector.kafka.connect.source.SolaceSourceTask.start(SolaceSourceTask.java:71)
	... 11 more
Caused by: java.lang.NoSuchMethodException: com.solace.connector.kafka.connect.source.SolMessageProcessorIF.<init>()
	at java.base/java.lang.Class.getConstructor0(Class.java:3585)
	at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2754)
	at org.apache.kafka.common.utils.Utils.newInstance(Utils.java:399)
	... 15 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants