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

Unique attribute key name clash #354

Closed
NiteshKant opened this issue May 5, 2015 · 0 comments
Closed

Unique attribute key name clash #354

NiteshKant opened this issue May 5, 2015 · 0 comments
Milestone

Comments

@NiteshKant
Copy link
Member

ClientRequestResponseConverter uses statically created AttributeKey instances here which will cause issues in few cases:

  • If the handler is loaded in multiple classloaders.
  • If the handler is in a shaded rxnetty jar.

The error stack will be something like this:

2015-05-04 21:19:11 WARN  ChannelInitializer:151 rxnetty-nio-eventloop-7-1 - Failed to initialize a channel. Closing: [id: 0x9e4943d9]
java.lang.ExceptionInInitializerError
    at iep.io.reactivex.netty.protocol.http.client.ClientRequiredConfigurator.configureNewPipeline(ClientRequiredConfigurator.java:42)
    at iep.io.reactivex.netty.pipeline.PipelineConfiguratorComposite.configureNewPipeline(PipelineConfiguratorComposite.java:55)
    at iep.io.reactivex.netty.pipeline.PipelineConfiguratorComposite.configureNewPipeline(PipelineConfiguratorComposite.java:55)
    at iep.io.reactivex.netty.client.RxClientImpl$2.initChannel(RxClientImpl.java:127)
    at io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:69)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandlerContext.java:158)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRegistered(AbstractChannelHandlerContext.java:144)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRegistered(DefaultChannelPipeline.java:732)
    at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:443)
    at io.netty.channel.AbstractChannel$AbstractUnsafe.access$100(AbstractChannel.java:375)
    at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:419)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:370)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
    at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: 'rxnetty_http_conn_keep_alive_timeout_millis' is already in use
    at io.netty.util.UniqueName.<init>(UniqueName.java:53)
    at io.netty.util.AttributeKey.<init>(AttributeKey.java:47)
    at io.netty.util.AttributeKey.valueOf(AttributeKey.java:39)
    at iep.io.reactivex.netty.protocol.http.client.ClientRequestResponseConverter.<clinit>(ClientRequestResponseConverter.java:84)
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

1 participant