Aparna
Aparna

Reputation: 845

In Azure Eventhub error in @Override when receiving messages with EventProcessorHost in Java

I have an eventhub and I am sending data to it. Now I need to recieve that data. So I followed the tutorial in the eventhub page

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

"Receive messages with EventProcessorHost in Java"

In all the classes it is not letting me @Override. It gives me the following error.

Multiple markers at this line
- implements com.microsoft.azure.eventprocessorhost.IEventProcessor.onOpen
- The method onOpen(PartitionContext) of type EventProcessor must override a superclass 

I have added the dependencies specified in the pom(I am using a maven project).

<dependencies>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-eventhubs</artifactId>
<version>0.7.2</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-eventhubs-eph</artifactId>
<version>0.7.2</version>
</dependency>
</dependencies>

Upvotes: 0

Views: 176

Answers (2)

Sreeram Garlapati
Sreeram Garlapati

Reputation: 4993

Change your project references to point to jdk1.8.

This is a very common error when you are trying to compile Java projects with jdk1.5. @Override annotations' specification changed in jdk1.5 to jdk1.6.

HTH!

Upvotes: 1

JTaub
JTaub

Reputation: 1283

This is most likely happening because the Maven dependencies are configured incorrectly.

  1. Right click the project select Configure --> Convert to Maven Project, and complete the wizard.
  2. Open the pom using the maven explorer and click on Dependencies
  3. Add in the proper packages.

If you cant get this to work, then you can download the source for Event Hubs and build that yourself.

Upvotes: 0

Related Questions