AnsweredAssumed Answered

ApplicationModel NoClassDefFoundError

Question asked by simon on Nov 12, 2007
Latest reply on Nov 12, 2007 by simon
Alfresco,

I'm trying to implement my own bean that looks very similar as the SimpleWorkflow one. It should move a document when the action is triggered.

Here is a part of the code:

final NodeRef docNodeRef = new NodeRef(Repository.getStoreRef(), id);
NodeRef newParent = (NodeRef)nodeService.getProperty(docNodeRef, ApplicationModel.PROP_APPROVE_FOLDER);
nodeService.moveNode(docNodeRef,
      newParent,
      ContentModel.ASSOC_CONTAINS,
      nodeService.getPrimaryParent(docNodeRef).getQName());

The ContentModel seems to work fine but the ApplicationModel gives an error:

javax.faces.el.EvaluationException: Exception while invoking expression #{MyBean.approve}
caused by: java.lang.NoClassDefFoundError: org/alfresco/model/ApplicationModel

Any idea why? I imported the org.alfresco.model.ApplicationModel but should I register this in the faces-config as well (some Spring related issue maybe)? The ContentModel isn't and that doesn't break…

The error seems to indicate there is something missing but I suppose something as important as the ApplicationModel should be there, no?

Thanks!

Outcomes