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; 'com.fasterxml.jackson.core.util.JacksonFeatureSet com.fasterxml.jackson.core.JsonParser.getReadCapabilities()' #47

Open
Jens2205 opened this issue Sep 23, 2024 · 2 comments

Comments

@Jens2205
Copy link

Hi Jan,
I hope I'm not bothering you with these issues, but I have no clue how to fix this one—maybe because it's Monday. :-)

I am using Talend TOS 8.0.1 to set up an API example. When using the tJSONDoc components, I get the following error when sending the request:

java.lang.RuntimeException: java.lang.NoSuchMethodError: 'com.fasterxml.jackson.core.util.JacksonFeatureSet com.fasterxml.jackson.core.JsonParser.getReadCapabilities()'
	at test_gsta.my_rest_service_0_1.My_REST_Service.tRESTRequest_1_LoopProcess(My_REST_Service.java:1716)
	at test_gsta.my_rest_service_0_1.My_REST_Service$RestServiceProviderImpl4TalendJob.processRequest(My_REST_Service.java:445)
	at test_gsta.my_rest_service_0_1.My_REST_Service$RestServiceProviderImpl4TalendJob.Get_an_employee_by_ID(My_REST_Service.java:559)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179)
	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:201)
	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:104)
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265)
	at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:247)
	at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:79)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:190)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:516)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.NoSuchMethodError: 'com.fasterxml.jackson.core.util.JacksonFeatureSet com.fasterxml.jackson.core.JsonParser.getReadCapabilities()'
	at com.fasterxml.jackson.databind.DeserializationContext.<init>(DeserializationContext.java:227)
	at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.<init>(DefaultDeserializationContext.java:51)
	at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext$Impl.<init>(DefaultDeserializationContext.java:413)
	at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext$Impl.createInstance(DefaultDeserializationContext.java:442)
	at com.fasterxml.jackson.databind.ObjectMapper.createDeserializationContext(ObjectMapper.java:4968)
	at com.fasterxml.jackson.databind.ObjectMapper._readTreeAndClose(ObjectMapper.java:4943)
	at com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:3280)
	at com.jayway.jsonpath.spi.json.JacksonJsonNodeJsonProvider.parse(JacksonJsonNodeJsonProvider.java:52)
	at com.jayway.jsonpath.internal.ParseContextImpl.parse(ParseContextImpl.java:37)
	at de.jlo.talendcomp.json.JsonDocument.<init>(JsonDocument.java:100)
	at test_gsta.get_my_rest_service_0_1.GET_My_REST_Service.tJSONDocOpen_1Process(GET_My_REST_Service.java:541)
	at test_gsta.get_my_rest_service_0_1.GET_My_REST_Service.runJobInTOS(GET_My_REST_Service.java:1247)
	at test_gsta.get_my_rest_service_0_1.GET_My_REST_Service.runJob(GET_My_REST_Service.java:995)
	at test_gsta.my_rest_service_0_1.My_REST_Service.tRunJob_1Process(My_REST_Service.java:1034)
	at test_gsta.my_rest_service_0_1.My_REST_Service.tRESTRequest_1_LoopProcess(My_REST_Service.java:1617)
	... 36 more

Before bringing this example API into TOS, I developed it in Talend Enterprise Studio, and everything was fine. I updated the Jackson libraries to a newer version via the Modules view, but this had no effect.

Do you have any idea how to fix this error?

Thank you, and have a nice week!
Best regards,
Jens

@jlolling
Copy link
Owner

I have just tested it in a normal job and here it works well.

@jlolling
Copy link
Owner

I can just reproduce this error in services also running in the studio.

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