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

NoSuchMethodError: org.apache.camel.util.StringHelper.replaceAll #1513

Closed
glew02 opened this issue Feb 27, 2023 · 1 comment
Closed

NoSuchMethodError: org.apache.camel.util.StringHelper.replaceAll #1513

glew02 opened this issue Feb 27, 2023 · 1 comment

Comments

@glew02
Copy link

glew02 commented Feb 27, 2023

Hi,

To get this error, I was using the 3.18.2 CAMEL-HTTPS-KAFKA-CONNECTOR SINK. I'm getting this error:

java.lang.NoSuchMethodError: 'java.lang.String org.apache.camel.util.StringHelper.replaceAll(java.lang.String, java.lang.String, java.lang.String)'
	at org.apache.camel.impl.DefaultCamelContext.doDumpRoutes(DefaultCamelContext.java:156)
	at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:3293)
	at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:2951)
	at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2902)
	at org.apache.camel.support.service.BaseService.start(BaseService.java:119)
	at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2586)
	at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:247)
	at org.apache.camel.main.SimpleMain.doStart(SimpleMain.java:43)
	at org.apache.camel.support.service.BaseService.start(BaseService.java:119)
	at org.apache.camel.kafkaconnector.CamelSinkTask.start(CamelSinkTask.java:152)
	at org.apache.kafka.connect.runtime.WorkerSinkTask.initializeAndStart(WorkerSinkTask.java:312)
	at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:186)
	at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:243)
	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)

Looking at the camel-util-3.18.2.jar:
https://jar-download.com/artifacts/org.apache.camel/camel-util/3.18.2/source-code/org/apache/camel/util/StringHelper.java

The code in the StringHelper class no longer has the method replaceAll.

Looking at the camel-util-3.14.2.jar:
https://jar-download.com/artifacts/org.apache.camel/camel-util/3.14.0/source-code/org/apache/camel/util/StringHelper.java

The code in the StringHelper class has this method.

So the issue seems to be that the StringHelper.replaceAll method was removed from the latest package for being obsolete (since you guys want to use String.replace). But not all the calls to the method were removed.

@oscerd
Copy link
Contributor

oscerd commented Feb 28, 2023

@oscerd oscerd closed this as completed Mar 28, 2023
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

No branches or pull requests

2 participants