AnsweredAssumed Answered

Java Backed webscript: NoClassDefFoundError

Question asked by peds on Jul 17, 2008
Latest reply on Aug 1, 2008 by slothrop
Hello,

I am trying to make a Java backed webscript, bascially modeled of a tutorial found here: http://ecmarchitect.com/images/articles/alfresco-webscripts/web-script-article.pdf.

I have a Java class that extends
org.alfresco.web.scripts.DeclarativeWebScript

and overrides a method:
executeImpl(org.alfresco.web.scripts.WebScriptRequest req, org.alfresco.web.scripts.WebScriptRequest status)

The problem I have is when starting Alfresco there is an error:
java.lang.NoClassDefFoundError: org/alfresco/scripts/WebScriptStatus

As far as I can tell, the tutorial I am using is from an older version of Alfresco (2.1?) that is not compatible with 2.9b, which I have.

I found here: http://forums.alfresco.com/en/viewtopic.php?f=4&t=10904, that the "WebScriptStatus" class has been renamed "Status." However, when I change the Java code to use
org.alfresco.web.scripts.Status
it "cannot be resolved to a type" and I get an error about not properly overriding the superclass method.

I have the 2.9b sdk and 2.9b alfresco, and I haven't had any luck finding documentation, so I'm hoping that someone here can point me in the right direction.

Thanks,
Ben

Outcomes