OpenFeign / feign

Feign makes writing java http clients easier
Apache License 2.0
9.51k stars 1.93k forks source link

java.lang.NoSuchMethodError: 'void feign.AsynchronousMethodHandler$Factory.<init>(feign.vertx.VertxHttpClient, feign.Retryer, java.util.List, feign.Logger, feign.Logger$Level, boolean)' #2568

Closed jakub-bochenski closed 4 weeks ago

jakub-bochenski commented 1 month ago

fegin: 13.4 fegin-vertx: 6.0

Wasn't version 6.0 supposed to handle 13.x?

2024-09-27 16:13:08,554 ERROR [vert.x-eventloop-thread-4] c.z.p.server.impl.RESTServerImpl - B2C verticle failed to deploy                                                                   
java.lang.NoSuchMethodError: 'void feign.AsynchronousMethodHandler$Factory.<init>(feign.vertx.VertxHttpClient, feign.Retryer, java.util.List, feign.Logger, feign.Logger$Level, boolean)'    
        at feign.VertxFeign$Builder.internalBuild(VertxFeign.java:397)                                                                                                                       
        at feign.VertxFeign$Builder.internalBuild(VertxFeign.java:84)                                                                                                                        
        at feign.BaseBuilder.build(BaseBuilder.java:299)                                                                                                                                     
        at feign.VertxFeign$Builder.target(VertxFeign.java:389)                                                                                                                              
        at feign.VertxFeign$Builder.target(VertxFeign.java:376)                                                                                                                              
        at REDACTED                                                                                                          
        at io.vertx.kotlin.coroutines.CoroutineVerticle$start$1.invokeSuspend(CoroutineVerticle.kt:53)                                                                                       
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)                                                                                            
        at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:367)                                                                         
        at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:30)                                                                                          
        at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable$default(Cancellable.kt:25)                                                                                  
        at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:110)                                                                                                                   
        at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)                                                                                                              
        at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)                                                                                                    
        at kotlinx.coroutines.BuildersKt.launch(Unknown Source)                                                                                                                              
        at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47)                                                                                            
        at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source)                                                                                                                      
        at io.vertx.kotlin.coroutines.CoroutineVerticle.start(CoroutineVerticle.kt:51)                                                                                                       
        at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$5(DeploymentManager.java:210)                                                                                                
        at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:279)                                                                                                             
        at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:261)                                                                                                             
        at io.vertx.core.impl.ContextInternal.lambda$runOnContext$0(ContextInternal.java:59)                                                                                                 
        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)                                                                                            
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)                                                                                        
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)                                                                                
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:408)                                                                                                                
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)                                                                                      
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)                                                                                                         
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)                                                                                             
        at java.base/java.lang.Thread.run(Thread.java:1583)                                                                                                                                  
jakub-bochenski commented 1 month ago

Also fails on 13.3 and 13.2

jakub-bochenski commented 1 month ago

13.1 and 13.0 fails

so it doesn't work with 13.x at all

jakub-bochenski commented 1 month ago

Also fails for 12.5

jakub-bochenski commented 1 month ago

Fails for 12.0 but with different error: java.lang.NoSuchMethodError: 'java.lang.Object feign.VertxFeign$Builder.build()'

java.lang.NoSuchMethodError: 'java.lang.Object feign.VertxFeign$Builder.build()'                                       
        at feign.VertxFeign$Builder.target(VertxFeign.java:389)                                                        
        at feign.VertxFeign$Builder.target(VertxFeign.java:376)                                                        
        at REDACTED                                  
        at io.vertx.kotlin.coroutines.CoroutineVerticle$start$1.invokeSuspend(CoroutineVerticle.kt:53)                 
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)                      
        at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:367)   
        at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:30)                    
        at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable$default(Cancellable.kt:25)            
        at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:110)                                             
        at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)                                        
        at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)                              
        at kotlinx.coroutines.BuildersKt.launch(Unknown Source)                                                        
        at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47)                      
        at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source)                                                
        at io.vertx.kotlin.coroutines.CoroutineVerticle.start(CoroutineVerticle.kt:51)                                 
        at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$5(DeploymentManager.java:210)                          
        at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:279)                                       
        at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:261)                                       
        at io.vertx.core.impl.ContextInternal.lambda$runOnContext$0(ContextInternal.java:59)                           
        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)                      
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)                  
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)          
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:408)                                          
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)                
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)                                   
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)                       
        at java.base/java.lang.Thread.run(Thread.java:1583)                                                            
jakub-bochenski commented 1 month ago

I was able to get this to work with 11.10 and 5.1.1

jakub-bochenski commented 1 month ago

versions 12.1, 12.2, 12.3, and 12.4 also fail wtih java.lang.NoSuchMethodError: 'java.lang.Object feign.VertxFeign$Builder.build()'

jakub-bochenski commented 1 month ago

Was the version 6.0 tested at all before release? It doesn't work with any of the claimed 12.x or 13.x versions

hosuaby commented 4 weeks ago

Checking it now. Probably some weird code compatibility issues...

hosuaby commented 4 weeks ago

Hello @jakub-bochenski

Thanks again for the bug report. Version 6.0.1 of feign-vertx just came out fixing compatibility with feign 13. As architectureof feign v12, for some reason, was seriously altered, I declared this version insupported.

hosuaby commented 4 weeks ago

@velo

This issue was soved and can be closed.

velo commented 4 weeks ago

Thanks again for the bug report. Version 6.0.1 of feign-vertx just came out fixing compatibility with feign 13. As architectureof feign v12, for some reason, was seriously altered, I declared this version insupported.

Major releases are the place for breaking changes.

v14 on my mind, all deprecated api will be deleted

hosuaby commented 4 weeks ago

@velo thanks for the info. I have some free time now. So will reflect again if it is appropriate to merge feign-vertx into the main project.

By the way, may I ask you something. If I make no mistake, Feign do not have native support for OAuth2 flows? Even Spring has them now. Would you will be interested to integrate such extention?

velo commented 4 weeks ago

So will reflect again if it is appropriate to merge feign-vertx into the main project.

That I think would be awesome... feign-core can be a bit more accomodating to vertx project, but feign-vertx would live on it's own module, like feign-forms

Feign do not have native support for OAuth2 flows?

Main project knows nothing about oauth2, yes, it can be added as a module, if you keen, another nice addition.