AnsweredAssumed Answered

Alfresco 5.2 - Spring job sur Centos

Question asked by anakin59490 on Sep 5, 2018
Latest reply on Sep 5, 2018 by anakin59490

Bonjour à tous

 

j'ai un job qui s'exécute parfaitement sur windows mais qui ne se lance pas sur Centos : pas de message d'erreur dans le fichier de log mais pas de trace du job

 

y-a-t-il un paramétrage spécifique sur Alfresco à ajouter pour l'exécution des jobs sur Linux ?

 

Voici le paramétrage actuel :

<?xml version='1.0' encoding='UTF-8'?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

<bean id="com.mc.huissier.job.IncomingFlowExecuter" class="com.mc.huissier.job.IncomingFlowExecuter" />

<bean id="com.mc.huissier.job.IncomingFlow.jobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">

<property name="jobClass">
<value>com.mc.huissier.job.IncomingFlow</value>
</property>
<property name="jobDataAsMap">
<map>
<entry key="incomingFlowExecuter">
<ref bean="com.mc.huissier.job.IncomingFlowExecuter" />
</entry>
<entry key="jobLockService">
<ref bean="jobLockService" />
</entry>
</map>
</property>
</bean>

<bean id="com.mc.huissier.job.IncomingFlow.trigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="com.mc.huissier.job.IncomingFlow.jobDetail" />
</property>
<property name="cronExpression">
<value>${documed.IncomingFlow.cronexpression}</value>
</property>
<!-- <property name="startDelay"> -->
<!-- <value>${documed.DocumedJob.cronstartdelay}</value> -->
<!-- </property> -->
</bean>

<bean id="schedulerDocumed"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="com.mc.huissier.job.IncomingFlow.trigger" />
</list>
</property>
</bean>
</beans>

 

IncomingFlow.java :

 

public class IncomingFlow extends AbstractScheduledLockedJob implements StatefulJob {

@Override
public void executeJob(JobExecutionContext context) throws JobExecutionException {
JobDataMap jobData = context.getJobDetail().getJobDataMap();

// Extract the Job executer to use
Object executerObj = jobData.get("incomingFlowExecuter");
if (executerObj == null || !(executerObj instanceof IncomingFlowExecuter)) {
throw new AlfrescoRuntimeException("IncomingFlowExecuter data must contain valid 'Executer' reference");
}

final IncomingFlowExecuter IncomingFlowExecuter = (IncomingFlowExecuter) executerObj;

AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>() {
public Object doWork() throws Exception {
IncomingFlowExecuter.execute();
return null;
}
}, AuthenticationUtil.getSystemUserName());
}

}

 

IncomingFlowExecuter.java :

public class IncomingFlowExecuter {
private static final Logger logger = LoggerFactory.getLogger(IncomingFlowExecuter.class);

/**
* Executer implementation
*/
public void execute() {

logger.debug("job incoming document");
...

}
}

}

 

Mais, contrairement à Windows,  aucune trace de cette log dans le fichier alfresco.log et aucun traitement de ce job n'est lancé

 

Merci de votre aide

Outcomes