Skip to content
This repository has been archived by the owner on Jun 8, 2020. It is now read-only.

java.lang.NoSuchMethodError... netty versions? #10

Closed
npomfret opened this issue Jul 14, 2017 · 5 comments
Closed

java.lang.NoSuchMethodError... netty versions? #10

npomfret opened this issue Jul 14, 2017 · 5 comments

Comments

@npomfret
Copy link

I'm just trying to get started with this project. I'm getting the error below, looks like a Netty versioning problem. The code is running inside the same project (& VM) as my regular xchange project. Are they incompatible?

Exception in thread "main" java.lang.NoSuchMethodError: io.netty.handler.ssl.SslContext.newClientContextInternal(Lio/netty/handler/ssl/SslProvider;[Ljava/security/cert/X509Certificate;Ljavax/net/ssl/TrustManagerFactory;[Ljava/security/cert/X509Certificate;Ljava/security/PrivateKey;Ljava/lang/String;Ljavax/net/ssl/KeyManagerFactory;Ljava/lang/Iterable;Lio/netty/handler/ssl/CipherSuiteFilter;Lio/netty/handler/ssl/ApplicationProtocolConfig;JJ)Lio/netty/handler/ssl/SslContext;

@dozd
Copy link
Member

dozd commented Jul 14, 2017

Looks like a problem with netty version on your classpath. You probably have netty dependency from another dependency in your project. Xchange-stream is dependent on io.netty:netty-all:jar:4.1.7.Final.

Try run mvn dependency:tree on your project to see what's your dependencies and find one who is also dependent on netty. Than, you can exclude conflicting (lower) version of netty dependency in pom.xml either from xchange-stream or from that one dependency.

It should work if versions aren't so much different and there is no API breaking change between theese versions.

@npomfret
Copy link
Author

Can't see where it's coming from. The only netty-all I have is io.netty:netty-all:4.1.7.Final. I do see some refs to a netty 4.0.24, but it's coming from this project:

+--- info.bitrich.xchange-stream:xchange-poloniex:4.2.3-SNAPSHOT
| +--- info.bitrich.xchange-stream:xchange-stream-core:4.2.3-SNAPSHOT ()
| +--- info.bitrich.xchange-stream:service-wamp:4.2.3-SNAPSHOT
| | +--- info.bitrich.xchange-stream:service-core:4.2.3-SNAPSHOT (
)
| | +--- ws.wamp.jawampa:jawampa-netty:0.4.2
| | | +--- ws.wamp.jawampa:jawampa-core:0.4.2
| | | | --- org.msgpack:jackson-dataformat-msgpack:0.7.0-p7
| | | | --- org.msgpack:msgpack-core:0.7.0-p7
| | | +--- io.netty:netty-codec-http:4.0.24.Final
| | | | +--- io.netty:netty-codec:4.0.24.Final
| | | | | --- io.netty:netty-transport:4.0.24.Final
| | | | | --- io.netty:netty-buffer:4.0.24.Final
| | | | | --- io.netty:netty-common:4.0.24.Final
| | | | --- io.netty:netty-handler:4.0.24.Final
| | | | +--- io.netty:netty-buffer:4.0.24.Final ()
| | | | +--- io.netty:netty-transport:4.0.24.Final (
)
| | | | --- io.netty:netty-codec:4.0.24.Final (*)

@npomfret
Copy link
Author

Hmm, adding an explicit dependency in my gradle file seem to solve it.

@dozd
Copy link
Member

dozd commented Jul 14, 2017

Explicit dependency on what? I'm thinking of excluding that netty-codec-htttp from jawampa-netty. It can be the cause. Can you try it if i push fix on snapshot verison?

@dozd
Copy link
Member

dozd commented Jul 14, 2017

Can you try it without your explicit dependency? Latest in develop.

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

No branches or pull requests

2 participants