cancel
Showing results for 
Search instead for 
Did you mean: 

Error Deploying a Java-backed web script

andrea_girardi
Champ in-the-making
Champ in-the-making
Hi all,

I'm newbie in Alfresco and I'm reading the book Professional Alfresco and Alfresco wiki to understand how to write my service using Javascript and Java.

For reference here are the listing of the files and their locations:

Via Alfresco Explorer: Company Home -> Data Dictionary -> Web Scripts Extensions -> org -> example -> javadir.get.desc.xml  
Via Alfresco Explorer: Company Home -> Data Dictionary -> Web Scripts Extensions -> org -> example -> javadir.get.html.ftl

Created and copied the javadir-context.xml into tomcat/shared/classes/alfresco/extension

Created and copied the classes into tomcat/shared/classes/org/example/JavaDir.class

When I try to restart tomcat, I can see that DeclarativeWebScript class is missing:

"problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/springframework/extensions/webscripts/DeclarativeWebScript"

How can I fix that problem?

thanks,
Andrea
1 REPLY 1

andrea_girardi
Champ in-the-making
Champ in-the-making
Hi all,

I found the problem: I copyed on tomcat/shared/lib the .jar needed on my class. But, when I try to restart the tomcat I can see that exception on log:

Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.alfresco.repo.model.Repository' to required type 'org.alfresco.repo.model.Repository' for property 'repository'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.alfresco.repo.model.Repository] to required type [org.alfresco.repo.model.Repository] for property 'repository': no matching editors or conversion strategy found

any suggest?

Another question, why the org.alfresco.service.cmr.repository.NodeRef; is missing on alfresco jar 3.4-d?

Andrea