Search code examples
olingo

Unable to implement Olingo Tutorial example for creating service


I followed the sample provided by Olingo: https://olingo.apache.org/doc/odata4/tutorials/read/tutorial_read.html

Maven build was successful, but on running service I got error: java.lang.ClassCastException: serviceProvider.service.DemoEntityCollectionProcessor cannot be cast to org.apache.olingo.server.api.processor.Processor

Code is: handler.register((Processor)

Can anyone suggest what I might be doing wrong?


Solution

  • got it to work, I missed using 'implements EntityCollectionProcessor' in my *EntityCollectionProcessor class. it is working fine now