0

我正在为 java eventthub 库使用最新的 0.8.2 jar,并使用以下代码将数据发送到 azure eventthub:

ConnectionStringBuilder connStr = new ConnectionStringBuilder(connectionstring); 
byte[] payloadBytes = valueChangeMessage.data.get().toString().getBytes("UTF-8");
EventData sendEvent = new EventData(payloadBytes);
EventHubClient ehClient = EventHubClient.createFromConnectionStringSync(connStr.toString());
ehClient.sendSync(sendEvent);

但我收到以下错误:

Sep 15, 2016 3:31:25 PM org.apache.qpid.proton.engine.impl.ssl.SslEngineFacadeFactory getClass
WARNING: unable to load org.bouncycastle.openssl.PEMReader
Sep 15, 2016 3:31:25 PM org.apache.qpid.proton.engine.impl.ssl.SslEngineFacadeFactory <clinit>
WARNING: unable to load bouncycastle provider
Sep 15, 2016 3:31:26 PM com.microsoft.azure.servicebus.MessagingFactory$RunReactor run
WARNING: UnHandled exception while processing events in reactor:
java.lang.IllegalArgumentException
org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:112)
org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:309)
org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:277)
com.microsoft.azure.servicebus.MessagingFactory$RunReactor.run(MessagingFactory.java:332)
java.lang.Thread.run(Thread.java:745)Cause: null
java.nio.Buffer.position(Buffer.java:244)
org.apache.qpid.proton.engine.impl.ssl.SimpleSslTransportWrapper.pop(SimpleSslTransportWrapper.java:411)
org.apache.qpid.proton.engine.impl.ssl.SslImpl$UnsecureClientAwareTransportWrapper.pop(SslImpl.java:185)
org.apache.qpid.proton.engine.impl.TransportImpl.pop(TransportImpl.java:1476)
org.apache.qpid.proton.reactor.impl.SelectorImpl.select(SelectorImpl.java:145)
org.apache.qpid.proton.reactor.impl.IOHandler.handleQuiesced(IOHandler.java:57)
org.apache.qpid.proton.reactor.impl.IOHandler.onUnhandled(IOHandler.java:381)
org.apache.qpid.proton.engine.BaseHandler.onReactorQuiesced(BaseHandler.java:87)
org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:206)
org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108)
org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:309)
org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:277)
com.microsoft.azure.servicebus.MessagingFactory$RunReactor.run(MessagingFactory.java:332)
java.lang.Thread.run(Thread.java:745)
Sep 15, 2016 3:31:26 PM com.cognizant.iotworkbench.Channel.CatChannel sendPOST
SEVERE: null
com.microsoft.azure.servicebus.ServiceBusException: java.lang.IllegalArgumentException, TrackingId: a9055d98-2dff-4cc0-af1f-38a9718b3cf5, at: 2016-09-15T15:31:26.462+05:30[Asia/Calcutta]
    at com.microsoft.azure.servicebus.MessagingFactory$RunReactor.run(MessagingFactory.java:357)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException
    at java.nio.Buffer.position(Buffer.java:244)
    at org.apache.qpid.proton.engine.impl.ssl.SimpleSslTransportWrapper.pop(SimpleSslTransportWrapper.java:411)
    at org.apache.qpid.proton.engine.impl.ssl.SslImpl$UnsecureClientAwareTransportWrapper.pop(SslImpl.java:185)
    at org.apache.qpid.proton.engine.impl.TransportImpl.pop(TransportImpl.java:1476)
    at org.apache.qpid.proton.reactor.impl.SelectorImpl.select(SelectorImpl.java:145)
    at org.apache.qpid.proton.reactor.impl.IOHandler.handleQuiesced(IOHandler.java:57)
    at org.apache.qpid.proton.reactor.impl.IOHandler.onUnhandled(IOHandler.java:381)
    at org.apache.qpid.proton.engine.BaseHandler.onReactorQuiesced(BaseHandler.java:87)
    at org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:206)
    at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108)
    at org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:309)
    at org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:277)
    at com.microsoft.azure.servicebus.MessagingFactory$RunReactor.run(MessagingFactory.java:332)
    ... 1 more

谁能帮我找到可能的问题?

4

0 回答 0