SHRIRANGPINJARKAR-5271 avatar image
0 Votes"

classCastException: Cannot convert RpcHttpRequestDataSource to type HttpRequestMessage<Optional<EventGridEvent>>

I am implementing claim check cloud pattern using Java Azure function, event grid and blob storage. I have implemented this in C# dot net core. It worked like a charm but when used java got the above issue.
I have created an issue on GitHub and also provided the entire code. Please take a look. I am not able to find anything on the internet.

Issue created:

I am getting the below error when posting requests locally and on azure as well.

Check my code

Executed 'Functions.UsageDetailPublisherFunction' (Failed, Id=475b0106-0d71-4e23-a7b4-edb885a599e8, Duration=239ms) [2021-10-25T16:26:05.414Z] System.Private.CoreLib: Exception while executing function: Functions.UsageDetailPublisherFunction. System.Private.CoreLib: Result: Failure [2021-10-25T16:26:05.414Z] Exception: ClassCastException: Cannot convert type<java.util.Optional<>> [2021-10-25T16:26:05.414Z] Stack: java.lang.ClassCastException: Cannot convert type<java.util.Optional<>> [2021-10-25T16:26:05.414Z] at [2021-10-25T16:26:05.414Z] at [2021-10-25T16:26:05.414Z] at [2021-10-25T16:26:05.414Z] at [2021-10-25T16:26:05.414Z] at [2021-10-25T16:26:05.415Z] at

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers