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
Avez-vous paramétré la variable "documed.IncomingFlow.cronexpression" dans le global properties ?
O.
oui : documed.IncomingFlow.cronexpression=23 * * * * ?
Trouvé ! Jar placé dans le mauvais répertoire donc forcément.....
Discussions about Alfresco Content Services and Alfresco Process Services in French
Related:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.