Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Java Azure Event Hubs 0.8.1 Problem

$
0
0

Hi,

I have been using the following article to get started with event hubs

https://azure.microsoft.com/en-us/documentation/articles/event-hubs-java-ephcs-getstarted/

I followed the instructions for c# and everything worked correctly

As I will have Java Clients as well as C# I tried the same setup but using a Jave Sender and Receiver. 

For the Sender[Send.java] I am getting the following error

Sep 09, 2016 2:39:50 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:307)
org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:276)
com.microsoft.azure.servicebus.MessagingFactory$RunReactor.run(MessagingFactory.java:327)
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:307)
org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:276)
com.microsoft.azure.servicebus.MessagingFactory$RunReactor.run(MessagingFactory.java:327)
java.lang.Thread.run(Thread.java:745)
Exception in thread "main" java.util.concurrent.ExecutionException: com.microsoft.azure.servicebus.ServiceBusException: java.lang.IllegalArgumentException, TrackingId: 5ce6b7af-dc3e-4d65-a1d3-ff1efe836dc7, at: 2016-09-09T14:39:50.415+01:00[Europe/London]
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at com.microsoft.azure.eventhubs.samples.Send.main(Send.java:49)
Caused by: com.microsoft.azure.servicebus.ServiceBusException: java.lang.IllegalArgumentException, TrackingId: 5ce6b7af-dc3e-4d65-a1d3-ff1efe836dc7, at: 2016-09-09T14:39:50.415+01:00[Europe/London]
at com.microsoft.azure.servicebus.MessagingFactory$RunReactor.run(MessagingFactory.java:349)
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:307)
at org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:276)
at com.microsoft.azure.servicebus.MessagingFactory$RunReactor.run(MessagingFactory.java:327)
... 1 more

I have used the same credentials as the C# and I believe I have configured them correctly using the following syntax

Endpoint=sb://[namespace].servicebus.windows.net/;SharedAccessKeyName=[sasKeyName];SharedAccessKey=[key]

Can you confirm if the [namespace] is case sensitive. It is camelcase in Azure and I have tried camel case and lower case in Azure but no success. 

For the Receiver(EventProcessorSample.java] I get the following error;

Registering host named javahost-c39e8d21-e744-4209-8a70-16009cf790a2
Press enter to stop
Sep 09, 2016 2:43:44 PM com.microsoft.azure.eventprocessorhost.EventProcessorHost log
SEVERE: host javahost-c39e8d21-e744-4209-8a70-16009cf790a2: Exception from partition manager main loop, shutting down
Sep 09, 2016 2:43:44 PM com.microsoft.azure.eventprocessorhost.EventProcessorHost log
SEVERE: host javahost-c39e8d21-e744-4209-8a70-16009cf790a2: Caught java.lang.NullPointerException
Sep 09, 2016 2:43:44 PM com.microsoft.azure.eventprocessorhost.EventProcessorHost log
SEVERE: host javahost-c39e8d21-e744-4209-8a70-16009cf790a2: java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
Sep 09, 2016 2:43:44 PM com.microsoft.azure.eventprocessorhost.EventProcessorHost log
SEVERE: host javahost-c39e8d21-e744-4209-8a70-16009cf790a2: com.microsoft.azure.eventprocessorhost.Pump.addPump(Pump.java:29)
Sep 09, 2016 2:43:44 PM com.microsoft.azure.eventprocessorhost.EventProcessorHost log
SEVERE: host javahost-c39e8d21-e744-4209-8a70-16009cf790a2: com.microsoft.azure.eventprocessorhost.PartitionManager.runLoop(PartitionManager.java:394)
Sep 09, 2016 2:43:44 PM com.microsoft.azure.eventprocessorhost.EventProcessorHost log
SEVERE: host javahost-c39e8d21-e744-4209-8a70-16009cf790a2: com.microsoft.azure.eventprocessorhost.PartitionManager.runAndCleanUp(PartitionManager.java:169)
Sep 09, 2016 2:43:44 PM com.microsoft.azure.eventprocessorhost.EventProcessorHost log
SEVERE: host javahost-c39e8d21-e744-4209-8a70-16009cf790a2: com.microsoft.azure.eventprocessorhost.PartitionManager.lambda$0(PartitionManager.java:159)
Sep 09, 2016 2:43:44 PM com.microsoft.azure.eventprocessorhost.EventProcessorHost log
SEVERE: host javahost-c39e8d21-e744-4209-8a70-16009cf790a2: java.util.concurrent.FutureTask.run(FutureTask.java:266)
Sep 09, 2016 2:43:44 PM com.microsoft.azure.eventprocessorhost.EventProcessorHost log
SEVERE: host javahost-c39e8d21-e744-4209-8a70-16009cf790a2: java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
Sep 09, 2016 2:43:44 PM com.microsoft.azure.eventprocessorhost.EventProcessorHost log
SEVERE: host javahost-c39e8d21-e744-4209-8a70-16009cf790a2: java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
Sep 09, 2016 2:43:44 PM com.microsoft.azure.eventprocessorhost.EventProcessorHost log
SEVERE: host javahost-c39e8d21-e744-4209-8a70-16009cf790a2: java.lang.Thread.run(Thread.java:745)
SAMPLE: Host javahost-c39e8d21-e744-4209-8a70-16009cf790a2 received general error notification during Partition Manager Main Loop: java.lang.NullPointerException

Also when I try to run the c# version the Receiver no longer works and there is no exception thrown. 

Are there any logs and\or daskboards in Azure Portal that tell me if the connection details are correct?

Are there logs to tell my why the Receiver has stopped receiving events?

Is there another Java example I should be using?

Bar translation of the message can you confirm if there is any issues with using different combinations of C# and Java Sender & Receivers?

thanks,

Joe



Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>