03-02-2009 10:53 AM
16:46:40,723 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [es.binovo.alfresco.action.LegalXMLParser] for bean with name
'legal-xml-parser' defined in file [/var/lib/tomcat5.5/shared/classes/alfresco/extension/legal-xml-parser-context.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/alfresco/repo/action/executer/ActionExecuterAbstractBase
Caused by: java.lang.NoClassDefFoundError: org/alfresco/repo/action/executer/ActionExecuterAbstractBase
package es.binovo.alfresco.action;
import java.util.List;
import org.alfresco.repo.action.ParameterDefinitionImpl;
import org.alfresco.repo.action.executer.ActionExecuterAbstractBase;
import org.alfresco.service.cmr.action.Action;
import org.alfresco.service.cmr.action.ParameterDefinition;
import org.alfresco.service.cmr.model.FileFolderService;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.apache.log4j.Logger;
/**
* @author iblanco
*
*/
public class LegalXMLParser extends ActionExecuterAbstractBase {
public final static String NAME = "legal-xml-parse";
/** The NodeService to be used by the bean */
protected NodeService nodeService;
/** The FileFolderService to be used by teh bean */
protected FileFolderService fileFolderService;
private static Logger logger = Logger.getLogger(LegalXMLParser.class);
@Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) {
// TODO Auto-generated method stub
if (logger.isDebugEnabled()) logger.debug("Inside executeImpl");
//Map<QName, Serializable> properties = nodeService.getProperties(actionedUponNodeRef);
ContentReader rawXML = fileFolderService.getReader(actionedUponNodeRef);
rawXML.setMimetype("text/xml");
String message = rawXML.getContentString();
logger.debug(message);
}
/* (non-Javadoc)
* @see org.alfresco.repo.action.ParameterizedItemAbstractBase#addParameterDefinitions(java.util.List)
*/
@Override
protected void addParameterDefinitions(List<ParameterDefinition> paramList) {
// TODO Auto-generated method stub
logger.debug("Inside addParameterDefinitions");
}
/**
* @param nodeService The NodeService to set.
*
* Este método es el que proporciona un enganche para que con la configuración
* Spring que hagamos de esta acción de podamos pasar el servicio de nodos
* de Alfresco.
*
*/
public void setNodeService(NodeService nodeService) {
this.nodeService = nodeService;
}
public void setFileFolderService(FileFolderService fileFolderService){
this.fileFolderService = fileFolderService;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!– Parse generated XML –>
<bean id="legal-xml-parser" class="es.binovo.alfresco.action.LegalXMLParser" parent="action-executer">
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="fileFolderService">
<ref bean="FileFolderService" />
</property>
<property name="publicAction">
<value>true</value>
</property>
</bean>
</beans>
03-06-2009 07:17 AM
04-20-2015 12:13 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.