Hi. I’m trying to make a custom API for creating documents. I’m following the example, but getting ClassCastException
with the wpm.createObject()
method.
HippoDocument hippoDocument = (HippoDocument) wpm.getObject(beanPath); //works
EventDocument eventDocumentBean = (EventDocument) wpm.getObject(beanPath); //doesn't work
java.lang.ClassCastException: class org.hippoecm.hst.content.beans.standard.HippoDocument$EventDocument$4vkQoxwy cannot be cast to class org.sae.cm.modules.document.EventDocument (org.hippoecm.hst.content.beans.standard.HippoDocument$EventDocument$4vkQoxwy and org.sae.cm.modules.document.EventDocument are in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @3bb44eac)
Any ideas?
Thank you.