function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Anusha VankayalapatiAnusha Vankayalapati 

class java.lang.String cannot be cast to class module api.interaction.Date Only

Hi Team,

I am facing this error 'class java.lang.String cannot be cast to class moduleapi.interaction.DateOnly (java.lang.String is in module java.base of loader 'bootstrap'; moduleapi.interaction.DateOnly is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @58c34bb3)' on case object. Could anyone please let me know why this error occurs?

Thanks-in-advance.
NitishNitish
Hi Anusha,

As per my understanding this is happening because you are sending Date field in String and your API is trying to convert that into Date and you are getting the type casting Error. Try to connect with your API team and debug it.


If this helps kindly mark it as solved so that it may help others in future.

Thanks,
Nitish