xchange-stream icon indicating copy to clipboard operation
xchange-stream copied to clipboard

OkCoinStreamingExchange throws java.lang.NullPointerException

Open quorak opened this issue 6 years ago • 1 comments

I had the same issue on the XChange project https://github.com/timmolter/XChange/issues/1316 . Anything changed since?

2018-03-17 10:49:48.548  INFO 56214 --- [           main] i.b.x.okcoin.OkCoinStreamingExchange     : Calling Remote Init...
2018-03-17 10:49:48.548  INFO 56214 --- [           main] i.b.x.okcoin.OkCoinStreamingExchange     : No remote initialization implemented for OKCoin. The exchange meta data for this exchange is loaded from a json file containing hard-coded exchange meta-data. This may or may not be OK for you, and you should understand exactly how this works. Each exchange can either 1) rely on the hard-coded json file that comes packaged with XChange's jar, 2) provide your own override json file, 3) properly implement the `remoteInit()` method for the exchange (please submit a pull request so the whole community can benefit) or 4) a combination of hard-coded JSON and remote API calls. For more info see: https://github.com/timmolter/XChange/wiki/Design-Notes#exchange-metadata
2018-03-17 10:49:48.561  INFO 56214 --- [           main] i.b.x.okcoin.OkCoinStreamingService      : Connecting to wss://real.okcoin.com:10440/websocket
2018-03-17 10:49:50.453  INFO 56214 --- [ntLoopGroup-2-1] i.b.x.s.netty.WebSocketClientHandler     : WebSocket Client connected!
2018-03-17 10:49:50.455  INFO 56214 --- [           main] i.b.x.okcoin.OkCoinStreamingService      : Subscribing to channel ok_sub_spot_btc_usd_depth
java.lang.NullPointerException
	at info.bitrich.xchangestream.service.netty.NettyStreamingService.handleChannelMessage(NettyStreamingService.java:276)
	at info.bitrich.xchangestream.service.netty.NettyStreamingService.handleMessage(NettyStreamingService.java:266)
	at info.bitrich.xchangestream.okcoin.OkCoinStreamingService.handleMessage(OkCoinStreamingService.java:47)
	at info.bitrich.xchangestream.okcoin.OkCoinStreamingService.handleMessage(OkCoinStreamingService.java:11)
	at info.bitrich.xchangestream.service.netty.JsonNettyStreamingService.messageHandler(JsonNettyStreamingService.java:39)
	at info.bitrich.xchangestream.service.netty.NettyStreamingService$$Lambda$128/1729958231.onMessage(Unknown Source)
	at info.bitrich.xchangestream.service.netty.WebSocketClientHandler.channelRead0(WebSocketClientHandler.java:66)
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1389)
	at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1159)
	at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1203)
	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1414)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:945)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:146)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:745)
2018-03-17 10:49:50.899  INFO 56214 --- [ntLoopGroup-2-1] i.b.x.s.netty.WebSocketClientHandler     : WebSocket Client disconnected!
2018-03-17 10:49:50.899  INFO 56214 --- [ntLoopGroup-2-1] i.b.x.okcoin.OkCoinStreamingService      : Reopening websocket because it was closed by the host
2018-03-17 10:49:50.917  INFO 56214 --- [ntLoopGroup-2-1] i.b.x.okcoin.OkCoinStreamingService      : Connecting to wss://real.okcoin.com:10440/websocket
Disconnected from the target VM, address: '127.0.0.1:57534', transport: 'socket'

quorak avatar Mar 17 '18 09:03 quorak

@quorak Check the new updated release, which has an update dependence on XChange.

Flemingjp avatar Oct 30 '18 11:10 Flemingjp