Code partagé n'est pas défini pour certains objets

Nous rencontrons depuis un certains temps un comportement anormal concernant le code partagé “ImmoCommonJob”(ImmoJob), ce script content 19 méthodes qu’on utilise dans 19 objets différents pour calculer les indicateurs.

Par moment, on a l’erreur :

org.mozilla.javascript.EcmaError: ReferenceError: "ImmoJob" is not defined.

Or, le script est bien présent et bien lié à l’objet en question.

Exemple, dans la log qui suit, je fait appel aux méthodes “ImmoCompany_CalculIndicateurs” et “ImmoWork_CalculIndicateurs”.

Le premier appel “ImmoCompany_CalculIndicateurs” se passe bien, le deuxième “ImmoWork_CalculIndicateurs” est en erreur, je repasse le premier, il passe bien. Je regarde le code partagé, je vois que les deux objets en question sont bien dans la liste “Utilisation code partagé”.

2020-04-06 23:40:00,203 INFO [com.simplicite.util.CronJob] SIMPLICITE|https://e3m.simplicite.io:10063||ICORECM004|system|com.simplicite.util.CronJob|run||Execute la tâche LogSession à la date 2020-04-06 23:40:00
2020-04-06 23:38:57,895 INFO [com.simplicite.util.ScriptInterpreter] SIMPLICITE|https://e3m.simplicite.io:10063||INFO|designer|com.simplicite.util.ScriptInterpreter|ImmoCompany/the_ajax_ImmoCompany||Evénement: Appel méthode ImmoCompany_CalculIndicateurs
2020-04-06 23:38:08,787 ERROR [com.simplicite.util.RhinoScriptInterpreter] SIMPLICITE|https://e3m.simplicite.io:10063||ECORESC002|designer|com.simplicite.util.RhinoScriptInterpreter|ImmoWork.postValidate||Erreur évaluation script: ImmoWork
    org.mozilla.javascript.EcmaError: ReferenceError: "ImmoJob" is not defined. (ImmoWork#81) in ImmoWork at line number 81
    line 76:
    line 77: /// Calcul du solde à payer :
    line 78: /// Calcul du montant TTC dans le cas d'une régie : :
    line 79: if (!this.isNew()) {
    line 80: console.log("Appel méthode ImmoWork_CalculIndicateurs");
    error81: ImmoJob.ImmoWork_CalculIndicateurs(this,this.getGrant(),0);
    line 82: }
    line 83: /// Envoie de mail aux délégués du bien en cas d'une nouvel ajout d'un alerte :
    line 84: if ((!this.isBatchInstance()) && (this.getField("workStatus").hasChanged()) && (this.getField("workStatus").getValue() == 80)) {
    
2020-04-06 23:38:08,712 INFO [com.simplicite.util.ScriptInterpreter] SIMPLICITE|https://e3m.simplicite.io:10063||INFO|designer|com.simplicite.util.ScriptInterpreter|ImmoWork/the_ajax_ImmoWork||Evénement: Appel méthode ImmoWork_CalculIndicateurs
2020-04-06 23:37:39,654 INFO [com.simplicite.util.ScriptInterpreter] SIMPLICITE|https://e3m.simplicite.io:10063||INFO|designer|com.simplicite.util.ScriptInterpreter|ImmoCompany/the_ajax_ImmoCompany||Evénement: Appel méthode ImmoCompany_CalculIndicateurs
2020-04-06 

Après plusieurs “Full Clear cache”, le pb est réglé et je peu appeler n’importe quelle méthode.

2020-04-06 23:58:40,105 INFO [com.simplicite.util.ScriptInterpreter] SIMPLICITE|https://e3m.simplicite.io:10063||INFO|designer|com.simplicite.util.ScriptInterpreter|ImmoWork/the_ajax_ImmoWork||Evénement: Appel méthode ImmoWork_CalculIndicateurs
2020-04-06 23:58:26,687 INFO [com.simplicite.util.ScriptInterpreter] SIMPLICITE|https://e3m.simplicite.io:10063||INFO|designer|com.simplicite.util.ScriptInterpreter|ImmoCompany/the_ajax_ImmoCompany||Evénement: Appel méthode ImmoCompany_CalculIndicateurs
2020-04-06 23:58:12,143 INFO [com.simplicite.util.ScriptInterpreter] SIMPLICITE|https://e3m.simplicite.io:10063||INFO|designer|com.simplicite.util.ScriptInterpreter|ImmoWork/the_ajax_ImmoWork||Evénement: Appel méthode ImmoWork_CalculIndicateurs
2020-04-06 23:57:55,341 INFO [com.simplicite.util.engine.CoreCache] SIMPLICITE|https://e3m.simplicite.io:10063||INFO|system|com.simplicite.util.engine.CoreCache|serialize||Evénement: Serialization success into dbdoc/cache/core.ser

Quelques fois, il faut enregistrer le code partagé et ensuite faire un full clear cache pour que ca remarche.

Dernière info, je viens de passer plus de 30 minutes à essayer refaire fonctionner le script en faisant des clear cache (ce qui fonctionnait ses derniers temps) sans succès, il a fallu que je fasse un stop/start de Tomcat pour que cela remarche.

Auriez-vous une idée d’où cela peut venir ?


Merci d’avance.
Abed.

Aucune idée, ce problème n’est pas connu, surtout depuis la V4 qui permet de faire du code Java plus robuste, car les scripts partagés sont chargés dans un package “common” dans le classloader dès lors que le code compile, et pas interprété au runtime comme rhino.
.
Ca doit effectivement venir d’un problème de mise en cache du script dans l’interpréteur Rhino dans certains objets.

Est ce que cela se produit en phase de dévelopement avec de nombreux paramétrages et scripts + vidages de cache partiel des objets ? Il y a surement des cas de dépendances qui nécessitent un clear cache global.

Par contre si cela se produit en production où vos modules ne changent jamais, il faudra regarder de plus prêt la cause la perte du script partagé en mémoire, ou s’il existe une pb de dépendances croisées.

Par contre, il est impossible pour un objet donné que son script soit présent pour une méthode et pas pour une autre, car soit le script est chargé dans l’interpréteur soit il ne l’est pas (bug syntaxique qui empêche le script de se charger…).

Quand on change un script partagé, les logs tracent tous les objets qui se rechargent :

Partial clear cache for object xxx

Il faut vérifier que tout est OK à ce niveau également, ou s’il manque des objets (hérités ou autre cas non prévus qui nécessite un clear cache global).

@Francois,

Ce script est utilisé par 19 méthodes appartenant à 19 objets différents (1 méthode par objet). Ces méthodes servent à calculer les indicateurs de chaque objet. Il n’y a donc pas le cas de plusieurs méthodes pour un seul objet.
Je ne sais pas exactement à quel moment ce pb apparaît. Voici un exemple en direct d’une instance Docker :

J’ouvre un objet ImmoProperty et je valide, la méthode “ImmoProperty_CalculIndicateurs” plante (ImmoJob is not define". J’enregistre le script partagé, on voit donc la log qu’il y a bien eu les 19 “Partial clear cache for object XXX”, je revalide l’objet ImmoProperty, le pb reste le même, je fais un full clear cache, je revalide ImmoProperty, le pb est réglé et le script est reconnu. J’essai de valider un autre objet “ImmoCompany”, la méthode “ImmoCompany_CalculIndicateurs” plante à son tour, alors que je viens de faire un clear cache global !

Et maintenant, je vais retenter plusieurs clear cache jusqu’à cela remarche pour les 19 objets utilisant ce code partagé, sinon, je ferai un stop/start de Tomcat.

Est-ce que ce sont des symptôme de dépendances croisées ? comment les détectés ?
Merci encore.

2020-04-07 11:55:08,530 ERROR [com.simplicite.util.RhinoScriptInterpreter] SIMPLICITE|http://7491d8ffa69b:8080||ECORESC002|designer|com.simplicite.util.RhinoScriptInterpreter|ImmoCompany.postValidate||Erreur évaluation script: ImmoCompany
    org.mozilla.javascript.EcmaError: ReferenceError: "ImmoJob" is not defined. (ImmoCompany#1) in ImmoCompany at line number 1
    error1: //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    line 2: ImmoCompany.postLoad = function() {
    line 3: // Pour chaque ligne, il faut que l'utilisateur aie accès en Select (voir même en MAJ) aux (certains) objets associés pour l'autoriser à la voir.
    line 4: this.setSearchSpec(this.getDefaultSearchSpec()+ " AND " + ImmoTool.LinkedObjSelect(this,this.getGrant(),this.getName(),'E'));
    
2020-04-07 11:55:08,529 INFO [com.simplicite.util.ScriptInterpreter] SIMPLICITE|http://7491d8ffa69b:8080||INFO|designer|com.simplicite.util.ScriptInterpreter|ImmoCompany/the_ajax_ImmoCompany||Evénement: Appel méthode ImmoCompany_CalculIndicateurs
2020-04-07 11:55:00,011 INFO [com.simplicite.util.CronJob] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM005|system|com.simplicite.util.CronJob|run||Résultat de la tâche ImportXML : No XML file to import.
2020-04-07 11:55:00,010 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.engine.CronManager|run||Evénement: Cron manager is sleeping for 0:04:59...
...
2020-04-07 11:54:38,389 INFO [com.simplicite.util.ScriptInterpreter] SIMPLICITE|http://7491d8ffa69b:8080||INFO|designer|com.simplicite.util.ScriptInterpreter|ImmoProperty/the_ajax_ImmoProperty||Evénement: Appel méthode ImmoProperty_CalculIndicateurs
2020-04-07 11:54:34,407 INFO [com.simplicite.util.engine.CoreCache] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.engine.CoreCache|serialize||Evénement: Serialization success into dbdoc/cache/core.ser
2020-04-07 11:54:33,840 WARN [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|http://7491d8ffa69b:8080||WARN|system|com.simplicite.util.engine.DynamicClassLoader|loadClass||Evénement: Unable to load class: com.simplicite.workflows.ImmoWorkflow.ImmoCreateLease
2020-04-07 11:54:33,839 WARN [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|http://7491d8ffa69b:8080||WARN|system|com.simplicite.util.engine.DynamicClassLoader|loadClass||Evénement: Unable to load class: com.simplicite.workflows.ImmoWorkflow.ImmoCreateLease
2020-04-07 11:54:33,769 WARN [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|http://7491d8ffa69b:8080||WARN|system|com.simplicite.util.engine.DynamicClassLoader|loadClass||Evénement: Unable to load class: com.simplicite.workflows.ImmoWorkflow.ImmoCreateCompany
2020-04-07 11:54:33,769 WARN [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|http://7491d8ffa69b:8080||WARN|system|com.simplicite.util.engine.DynamicClassLoader|loadClass||Evénement: Unable to load class: com.simplicite.workflows.ImmoWorkflow.ImmoCreateCompany
2020-04-07 11:54:33,707 WARN [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|http://7491d8ffa69b:8080||WARN|system|com.simplicite.util.engine.DynamicClassLoader|loadClass||Evénement: Unable to load class: com.simplicite.workflows.ImmoWorkflow.ImmoCreateProperty
2020-04-07 11:54:33,706 WARN [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|http://7491d8ffa69b:8080||WARN|system|com.simplicite.util.engine.DynamicClassLoader|loadClass||Evénement: Unable to load class: com.simplicite.workflows.ImmoWorkflow.ImmoCreateProperty
2020-04-07 11:54:33,668 WARN [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|http://7491d8ffa69b:8080||WARN|system|com.simplicite.util.engine.DynamicClassLoader|loadClass||Evénement: Unable to load class: com.simplicite.workflows.ImmoWorkflow.ImmoCreateInvestor
2020-04-07 11:54:33,667 WARN [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|http://7491d8ffa69b:8080||WARN|system|com.simplicite.util.engine.DynamicClassLoader|loadClass||Evénement: Unable to load class: com.simplicite.workflows.ImmoWorkflow.ImmoCreateInvestor
2020-04-07 11:54:24,627 INFO [com.simplicite.util.tools.LicenseTool] SIMPLICITE|http://7491d8ffa69b:8080||ICORELI001|system|com.simplicite.util.tools.LicenseTool|isValid||La licence serveur est valide.
2020-04-07 11:54:24,611 INFO [com.simplicite.util.Grant] SIMPLICITE|http://7491d8ffa69b:8080||ICORED0001|designer|com.simplicite.util.Grant|init||Info : designer connected, session ID: 292824DD0BB5384E70D21D9B59F336FF, timeout: 30 min , user agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36
2020-04-07 11:54:22,484 INFO [com.simplicite.util.Grant] SIMPLICITE|http://7491d8ffa69b:8080||ICORED0001|public|com.simplicite.util.Grant|init||Info : public connected, session ID: 292824DD0BB5384E70D21D9B59F336FF, timeout: 5 min , user agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36
2020-04-07 11:54:22,430 INFO [com.simplicite.util.Grant] SIMPLICITE|http://7491d8ffa69b:8080||ICORED0001|public|com.simplicite.util.Grant|init||Info : public connected, session ID: CC7A9F135A952F2203380F60F823B847, timeout: 5 min , user agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36
2020-04-07 11:54:22,319 INFO [com.simplicite.util.engine.GrantManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORED0001|system|com.simplicite.util.engine.GrantManager|clearCache||Info : end
2020-04-07 11:54:22,319 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM001|system|com.simplicite.util.engine.CronManager|start||Le processus de gestion de la Cron a été lancé à Tue Apr 07 11:54:22 CEST 2020
2020-04-07 11:54:22,319 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ImmoInvestorMonth_CalculIndicateurs-Cron a été planifié le: Tue Apr 07 22:45:00 CEST 2020 et suivra le plan: 0 45 22 * * ?
2020-04-07 11:54:22,319 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||PruneSessions a été planifié le: Tue Apr 07 12:05:00 CEST 2020 et suivra le plan: 0 5 0/1 * * ?
2020-04-07 11:54:22,319 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||deadlineState a été planifié le: Tue Apr 07 12:00:00 CEST 2020 et suivra le plan: 0 0 0/1 * * ?
2020-04-07 11:54:22,319 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ImmoTaxHouse_CalculIndicateurs-Cron a été planifié le: Tue Apr 07 12:35:00 CEST 2020 et suivra le plan: 0 35 8,12,18 * * ?
2020-04-07 11:54:22,319 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ObjectDynGC a été planifié le: Tue Apr 07 12:05:00 CEST 2020 et suivra le plan: 0 5/15 * * * ?
2020-04-07 11:54:22,319 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||deadlockActivity a été planifié le: Tue Apr 07 12:00:00 CEST 2020 et suivra le plan: 0 0/15 * * * ?
2020-04-07 11:54:22,319 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ImmoCodePostal_CalculIndicateurs-Cron a été planifié le: Tue Apr 07 12:40:00 CEST 2020 et suivra le plan: 0 40 8,12,18 * * ?
2020-04-07 11:54:22,319 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ImmoWork_CalculIndicateurs-Cron a été planifié le: Tue Apr 07 12:28:00 CEST 2020 et suivra le plan: 0 28 8,12,18 * * ?
2020-04-07 11:54:22,319 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||deadlineActivity a été planifié le: Tue Apr 07 12:00:00 CEST 2020 et suivra le plan: 0 0 0/1 * * ?
2020-04-07 11:54:22,319 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||DesignAudit a été planifié le: Wed Apr 08 06:15:00 CEST 2020 et suivra le plan: 0 15 6 * * ?
2020-04-07 11:54:22,319 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ObjectFullGC a été planifié le: Tue Apr 07 12:03:00 CEST 2020 et suivra le plan: 0 3/30 * * * ?
2020-04-07 11:54:22,319 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ClearUserTokens a été planifié le: Tue Apr 07 12:00:00 CEST 2020 et suivra le plan: 0 0 0/1 * * ?
2020-04-07 11:54:22,319 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||deadlineProcess a été planifié le: Tue Apr 07 12:00:00 CEST 2020 et suivra le plan: 0 0 0/1 * * ?
2020-04-07 11:54:22,319 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ModuleAutoUpdate a été planifié le: Wed Apr 08 04:00:00 CEST 2020 et suivra le plan: 0 0 4 * * ?
2020-04-07 11:54:22,318 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ImmoLoan_CalculIndicateurs-Cron a été planifié le: Tue Apr 07 12:10:00 CEST 2020 et suivra le plan: 0 10 8,12,18 * * ?
2020-04-07 11:54:22,318 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ImmoCompanyMonth_CalculIndicateurs-Cron a été planifié le: Tue Apr 07 23:15:00 CEST 2020 et suivra le plan: 0 15 23 * * ?
2020-04-07 11:54:22,318 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||LicenseReminder a été planifié le: Wed Apr 08 10:15:00 CEST 2020 et suivra le plan: 0 15 10 * * ?
2020-04-07 11:54:22,318 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ImmoCPMonthly_CalculIndicateurs-Cron a été planifié le: Tue Apr 07 22:55:00 CEST 2020 et suivra le plan: 0 55 22 * * ?
2020-04-07 11:54:22,318 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ImmoCompany_CalculIndicateurs-Cron a été planifié le: Tue Apr 07 12:20:00 CEST 2020 et suivra le plan: 0 20 8,12,18 * * ?
2020-04-07 11:54:22,318 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ImmoAccountingFin_RapprocherJob-Cron a été planifié le: Tue Apr 07 12:43:00 CEST 2020 et suivra le plan: 0 43 8,12,18 * * ?
2020-04-07 11:54:22,318 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ImmoTenant_CalculIndicateurs-Cron a été planifié le: Tue Apr 07 12:07:00 CEST 2020 et suivra le plan: 0 7 8,12,18 * * ?
2020-04-07 11:54:22,318 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ImmoPropertyMonth_CalculIndicateurs-Cron a été planifié le: Tue Apr 07 23:05:00 CEST 2020 et suivra le plan: 0 05 23 * * ?
2020-04-07 11:54:22,318 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ImmoContract_CalculIndicateurs-Cron a été planifié le: Tue Apr 07 12:26:00 CEST 2020 et suivra le plan: 0 26 8,12,18 * * ?
2020-04-07 11:54:22,318 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ImportXML a été planifié le: Tue Apr 07 11:55:00 CEST 2020 et suivra le plan: 0 0/5 * * * ?
2020-04-07 11:54:22,318 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ImmoLease_CalculIndicateurs-Cron a été planifié le: Tue Apr 07 12:05:00 CEST 2020 et suivra le plan: 0 5 8,12,18 * * ?
2020-04-07 11:54:22,318 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||PruneLogs a été planifié le: Wed Apr 08 01:15:00 CEST 2020 et suivra le plan: 0 15 1 * * ?
2020-04-07 11:54:22,318 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ImmoProperty_CalculIndicateurs-Cron a été planifié le: Tue Apr 07 12:15:00 CEST 2020 et suivra le plan: 0 15 8,12,18 * * ?
2020-04-07 11:54:22,318 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ImmoContractAss_CalculIndicateurs-Cron a été planifié le: Tue Apr 07 12:27:00 CEST 2020 et suivra le plan: 0 27 8,12,18 * * ?
2020-04-07 11:54:22,318 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||immoDocument_documentControl-Cron a été planifié le: Tue Apr 07 23:30:00 CEST 2020 et suivra le plan: 0 30 23 * * ?
2020-04-07 11:54:22,318 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ImmoInvestor_CalculIndicateurs-Cron a été planifié le: Tue Apr 07 12:25:00 CEST 2020 et suivra le plan: 0 25 8,12,18 * * ?
2020-04-07 11:54:22,318 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||PruneRedoLogs a été planifié le: Tue Apr 07 12:10:00 CEST 2020 et suivra le plan: 0 10 0/1 * * ?
2020-04-07 11:54:22,318 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||PruneJobs a été planifié le: Wed Apr 08 01:00:00 CEST 2020 et suivra le plan: 0 0 1 * * ?
2020-04-07 11:54:22,317 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||HealthCheck a été planifié le: Tue Apr 07 12:00:00 CEST 2020 et suivra le plan: 0 0 0/1 * * ?
2020-04-07 11:54:22,317 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ImmoThirdParty_CalculIndicateurs-Cron a été planifié le: Tue Apr 07 12:30:00 CEST 2020 et suivra le plan: 0 30 8,12,18 * * ?
2020-04-07 11:54:22,317 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM003|system|com.simplicite.util.engine.CronManager|loadTriggers||ImmoAlerte_EnvoyerAlerte-Cron a été planifié le: Tue Apr 07 12:53:00 CEST 2020 et suivra le plan: 0 53 8,12,18 * * ?
2020-04-07 11:54:22,317 INFO [com.simplicite.util.engine.CoreCache] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.engine.CoreCache|loadDynamicJar||Evénement: Loaded dynamic JARs
2020-04-07 11:54:22,317 INFO [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.engine.DynamicClassLoader|DynamicClassLoader||Evénement: Instanciate DynamicClassLoader 699459734
2020-04-07 11:54:21,977 INFO [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.engine.DynamicClassLoader|compile||Evénement: Compiling all classes from src:/usr/local/tomcat/webapps/ROOT/WEB-INF/src to bin:/usr/local/tomcat/webapps/ROOT/WEB-INF/bin
2020-04-07 11:54:21,973 INFO [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.engine.DynamicClassLoader|compile||Evénement: Deleting source and binary directories
2020-04-07 11:54:20,768 INFO [com.simplicite.util.engine.CoreCache] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.engine.CoreCache|initProcessCache||Evénement: PROCESS_CACHE_SIZE=10000
2020-04-07 11:54:20,768 INFO [com.simplicite.util.engine.CoreCache] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.engine.CoreCache|initObjectCache||Evénement: OBJECT_CACHE_SIZE=10000
2020-04-07 11:54:20,760 INFO [com.simplicite.util.engine.GrantManager] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.engine.GrantManager|clearCache||Evénement: Reload core cache...
2020-04-07 11:54:18,936 INFO [com.simplicite.util.engine.GrantManager] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.engine.GrantManager|clearCache||Evénement: Compile resources CSS and JS...
2020-04-07 11:54:18,933 INFO [com.simplicite.util.engine.GrantManager] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.engine.GrantManager|clearCache||Evénement: Clean ObjectLoader and ObjectManager cache...
2020-04-07 11:54:18,932 INFO [com.simplicite.util.tools.DocTool] SIMPLICITE|http://7491d8ffa69b:8080||ICORED0001|system|com.simplicite.util.tools.DocTool|init||Info : 157 MIME types loaded
2020-04-07 11:54:18,931 INFO [com.simplicite.util.engine.GrantManager] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.engine.GrantManager|clearCache||Evénement: Clean Doc cache...
2020-04-07 11:54:18,929 INFO [com.simplicite.util.engine.GrantManager] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.engine.GrantManager|clearCache||Evénement: Reload system params...
2020-04-07 11:54:18,929 INFO [com.simplicite.util.tools.SystemTool] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.tools.SystemTool|forceGC||Evénement: GC forced
2020-04-07 11:54:18,866 INFO [com.simplicite.util.engine.GrantManager] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.engine.GrantManager|clearCache||Evénement: Clean Process loader cache...
2020-04-07 11:54:18,865 INFO [com.simplicite.util.engine.GrantManager] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.engine.GrantManager|initObjectCache||Evénement: GRANT_CACHE_SIZE=0
2020-04-07 11:54:18,859 INFO [com.simplicite.util.tools.SystemTool] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.tools.SystemTool|forceGC||Evénement: GC forced
2020-04-07 11:54:18,785 INFO [com.simplicite.util.engine.GrantManager] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.engine.GrantManager|clearCache||Evénement: Clean grant cache...
2020-04-07 11:54:18,784 INFO [com.simplicite.util.tools.SystemTool] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.tools.SystemTool|forceGC||Evénement: GC forced
2020-04-07 11:54:18,688 INFO [com.simplicite.util.engine.GrantManager] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.engine.GrantManager|clearCache||Evénement: Clean object cache...
2020-04-07 11:54:18,687 INFO [com.simplicite.util.tools.SystemTool] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.tools.SystemTool|clearTempDir||Evénement: Sources and binaries dirs cleared: Sources and binaries dirs cleared
2020-04-07 11:54:18,686 INFO [com.simplicite.util.tools.SystemTool] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.tools.SystemTool|clearTempDir||Evénement: Temporary dir cleared: Temporary dir cleared
2020-04-07 11:54:18,685 INFO [com.simplicite.util.engine.CronManager$CronDaemon] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.engine.CronManager$CronDaemon|run||Evénement: The cron manager has been interrupted.
2020-04-07 11:54:18,685 INFO [com.simplicite.util.engine.CronManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORECM002|system|com.simplicite.util.engine.CronManager|stop||Le processus de gestion de la Cron a été arrêté à Tue Apr 07 11:54:18 CEST 2020
2020-04-07 11:54:18,685 INFO [com.simplicite.util.engine.GrantManager] SIMPLICITE|http://7491d8ffa69b:8080||ICORED0001|system|com.simplicite.util.engine.GrantManager|clearCache||Info : begin
2020-04-07 11:54:18,644 INFO [com.simplicite.objects.System.Theme] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Theme|partialClearCache||Evénement: Partial clear cache for theme ThemeLight
2020-04-07 11:54:18,605 INFO [com.simplicite.objects.System.Theme] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Theme|partialClearCache||Evénement: Partial clear cache for theme ThemeImmoInv
2020-04-07 11:54:18,444 INFO [com.simplicite.objects.System.Theme] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Theme|partialClearCache||Evénement: Partial clear cache for theme ThemeDefault
2020-04-07 11:54:18,401 INFO [com.simplicite.objects.System.Theme] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Theme|partialClearCache||Evénement: Partial clear cache for theme ThemeDark
2020-04-07 11:54:18,327 INFO [com.simplicite.objects.System.Theme] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Theme|partialClearCache||Evénement: Partial clear cache for theme ThemeAdmin
2020-04-07 11:54:18,210 INFO [com.simplicite.util.tools.SystemTool] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.util.tools.SystemTool|resetCache||Evénement: Rebuild themes...
2020-04-07 11:53:53,265 ERROR [com.simplicite.util.RhinoScriptInterpreter] SIMPLICITE|http://7491d8ffa69b:8080||ECORESC002|designer|com.simplicite.util.RhinoScriptInterpreter|ImmoProperty.postValidate||Erreur évaluation script: ImmoProperty
    org.mozilla.javascript.EcmaError: ReferenceError: "ImmoJob" is not defined. (ImmoProperty#1) in ImmoProperty at line number 1
    error1: //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    line 2: ImmoProperty.postLoad = function() {
    line 3: try {
    line 4: if (!this.getGrant().hasResponsibility("IMMO_ADMIN") && !this.getGrant().hasResponsibility("ADMIN")) {
    
2020-04-07 11:53:53,263 INFO [com.simplicite.util.ScriptInterpreter] SIMPLICITE|http://7491d8ffa69b:8080||INFO|designer|com.simplicite.util.ScriptInterpreter|ImmoProperty/the_ajax_ImmoProperty||Evénement: Appel méthode ImmoProperty_CalculIndicateurs
2020-04-07 11:53:37,999 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for object ImmoAccountingFinancial
2020-04-07 11:53:37,902 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for object ImmoPropertyMonthly
2020-04-07 11:53:37,822 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for object ImmoCompanyMonthly
2020-04-07 11:53:37,773 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for object ImmoCodePostalMonthly
2020-04-07 11:53:37,701 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for object ImmoInvestorMonthly
2020-04-07 11:53:37,642 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for object ImmoCodePostal
2020-04-07 11:53:37,510 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for object ImmoAlerte
2020-04-07 11:53:37,432 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for object ImmoInvestorCompany
2020-04-07 11:53:37,281 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for object ImmoInvestor
2020-04-07 11:53:37,172 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for object ImmoThirdParty
2020-04-07 11:53:37,012 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for object ImmoWork
2020-04-07 11:53:36,926 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for object ImmoTenant
2020-04-07 11:53:36,867 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for object ImmoTaxHouse
2020-04-07 11:53:36,584 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for object ImmoProperty
2020-04-07 11:53:36,440 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for object ImmoLoan
2020-04-07 11:53:36,204 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for object ImmoLease
2020-04-07 11:53:36,022 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for object ImmoContractAss
2020-04-07 11:53:35,870 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for object ImmoContract
2020-04-07 11:53:35,692 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for object ImmoCompany
2020-04-07 11:53:35,676 INFO [com.simplicite.objects.System.Script] SIMPLICITE|http://7491d8ffa69b:8080||INFO|system|com.simplicite.objects.System.Script|partialClearCache||Evénement: Partial clear cache for shared code ImmoCommonJob
2020-04-07 11:52:49,942 ERROR [com.simplicite.util.RhinoScriptInterpreter] SIMPLICITE|http://7491d8ffa69b:8080||ECORESC002|designer|com.simplicite.util.RhinoScriptInterpreter|ImmoProperty.postValidate||Erreur évaluation script: ImmoProperty
    org.mozilla.javascript.EcmaError: ReferenceError: "ImmoJob" is not defined. (ImmoProperty#1) in ImmoProperty at line number 1
    error1: //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    line 2: ImmoProperty.postLoad = function() {
    line 3: try {
    line 4: if (!this.getGrant().hasResponsibility("IMMO_ADMIN") && !this.getGrant().hasResponsibility("ADMIN")) {
    
2020-04-07 11:52:49,940 INFO [com.simplicite.util.ScriptInterpreter] SIMPLICITE|http://7491d8ffa69b:8080||INFO|designer|com.simplicite.util.ScriptInterpreter|ImmoProperty/the_ajax_ImmoProperty||Evénement: Appel méthode ImmoProperty_CalculIndicateurs
2020-04-07 11:52:26,825 INFO [com.simplicite.util.tools.LicenseTool] SIMPLICITE|http://7491d8ffa69b:8080||ICORELI001|system|com.simplicite.util.tools.LicenseTool|isValid||La licence serveur est valide.

Merci pour ces précisions,

Tel que décrit ça semble un problème de vidage de cache partiel de tous ces objets en même temps, que le clear cache global ne parvient plus à corriger (cf stop/start tomcat).

Je vais essayer de reproduire le problème sur quelques objets pour comprendre pourquoi le script se perd en route sur certains objets.

Avez vous du code Java par ailleurs ?
je vois des traces suspectes comme :

Unable to load class: com.simplicite.workflows.ImmoWorkflow.ImmoCreateLease

Ces warning sont là depuis très longtemps, après chaque full clear cache, sans impact sur le fonctionnement des 4 process en questions, je les ai donc toujours ignorés :

2020-04-07 13:36:34,340 INFO [com.simplicite.util.engine.CoreCache] SIMPLICITE|http://e3m.simplicite.io:10118||INFO|system|com.simplicite.util.engine.CoreCache|serialize||Evénement: Serialization success into dbdoc/cache/core.ser
2020-04-07 13:36:33,361 WARN [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|http://e3m.simplicite.io:10118||WARN|system|com.simplicite.util.engine.DynamicClassLoader|loadClass||Evénement: Unable to load class: com.simplicite.workflows.ImmoWorkflow.ImmoCreateCompany
2020-04-07 13:36:33,360 WARN [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|http://e3m.simplicite.io:10118||WARN|system|com.simplicite.util.engine.DynamicClassLoader|loadClass||Evénement: Unable to load class: com.simplicite.workflows.ImmoWorkflow.ImmoCreateCompany
2020-04-07 13:36:33,305 WARN [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|http://e3m.simplicite.io:10118||WARN|system|com.simplicite.util.engine.DynamicClassLoader|loadClass||Evénement: Unable to load class: com.simplicite.workflows.ImmoWorkflow.ImmoCreateLease
2020-04-07 13:36:33,303 WARN [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|http://e3m.simplicite.io:10118||WARN|system|com.simplicite.util.engine.DynamicClassLoader|loadClass||Evénement: Unable to load class: com.simplicite.workflows.ImmoWorkflow.ImmoCreateLease
2020-04-07 13:36:33,216 WARN [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|http://e3m.simplicite.io:10118||WARN|system|com.simplicite.util.engine.DynamicClassLoader|loadClass||Evénement: Unable to load class: com.simplicite.workflows.ImmoWorkflow.ImmoCreateInvestor
2020-04-07 13:36:33,214 WARN [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|http://e3m.simplicite.io:10118||WARN|system|com.simplicite.util.engine.DynamicClassLoader|loadClass||Evénement: Unable to load class: com.simplicite.workflows.ImmoWorkflow.ImmoCreateInvestor
2020-04-07 13:36:33,086 WARN [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|http://e3m.simplicite.io:10118||WARN|system|com.simplicite.util.engine.DynamicClassLoader|loadClass||Evénement: Unable to load class: com.simplicite.workflows.ImmoWorkflow.ImmoCreateProperty
2020-04-07 13:36:33,083 WARN [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|http://e3m.simplicite.io:10118||WARN|system|com.simplicite.util.engine.DynamicClassLoader|loadClass||Evénement: Unable to load class: com.simplicite.workflows.ImmoWorkflow.ImmoCreateProperty
2020-04-07 13:36:10,604 INFO [com.simplicite.util.tools.LicenseTool] SIMPLICITE|http://e3m.simplicite.io:10118||ICORELI001|system|com.simplicite.util.tools.LicenseTool|isValid||La licence serveur est valide.

Je penses que j’ai du utiliser une seule fois du code java, mais je ne me rappelle plus où. Est-ce que vous pourriez me dire où sont stockés les scripts java pour que je jette un coup d’œil et me rappeler de ce que c’était ?
Merci d’avance.

D’après les logs ces warnings sont liés à des scripts de Workflow de votre module ImmoWorkflow.

Regardez par exemple si dans la définition de ImmoCreateCompany il y a un fichier source se terminant en “.java”, ou s’il est vide. sinon il faut vider le champ, ou retélécharger le script en “.js” si c’est du Rhino.

j’ai le même pb :

2020-04-07 13:55:26,899 WARN [com.simplicite.util.engine.DynamicClassLoader] SIMPLICITE|https://dev-sim:10513/karta|/karta|WARN|system|com.simplicite.util.engine.DynamicClassLoader|loadClass||Evénement: Unable to load class: com.simplicite.workflows.CrbKarta.CreateKartaProjet

La classe ne peut pas être chargée dans le classloader.

Donc il faut savoir pour chercher la cause :

  • si votre Workflow a du code, si oui en quelle langue ?
  • le nom du fichier du code source (.java ou .js) dans champ “Source code” étendu
  • le head du code source pour savoir s’il est dans le bon package (com.simplicite.workflows.CrbKarta) + nom de la classe + extends
  • si le code compile correctement, sinon il n’est pas dans le JAR déployé
package com.simplicite.workflows.MyModule;

import java.util.*;
import com.simplicite.bpm.*;
import com.simplicite.util.*;
import com.simplicite.util.tools.*;

/**
 * Process MyProcess
 */
public class MyProcess extends Processus {
	private static final long serialVersionUID = 1L;	
}

Votre erreur reste un Warning, mais cache un problème de définition. En cas d’erreur de chargement de votre classe, Simplicité utilise par défaut une implémentation de Processus sans code.

@Abed

J’ai testé un script partagé en Rhino sur plusieurs objets sans soucis sur une P24 à jour avec chacun une methode appelée. Quand on change le code partagé, il est bien rechargé dans tous les objets scriptés en Rhino sans avoir besoin de vider tous les caches.

Quelle est la taille de votre script partagé ?

Faites un test en mettant en commentaire (ou en retirant) tout le code interne de vos 19 fonctions en laissant juste les signatures des fonctions publiques + des console.log pour voir si elles sont appelées… Ca éliminera la piste d’un bug à l’exécution qui fait perdre le script bizarrement (ou fait tomber l’interpreteur ou laisse des zombies dans tomcat…)

Si comme vous le dites, les 19 fonctions ne sont pas partagées, il n’y a aucun intérêt de les mettre dans un seul “gros” script, autant laisser chaque fonction dans le script de chaque objet, ou juste faire 1 script partagé par objet avec chacun sa fonction.

Je ne connais pas bien les capacités de Rhino sur la tailles des scripts, mais c’est vraiment fait pour du “low-code”. Si vos programmes deviennent trop gros, il se peut que vous arriviez aux limites de l’exercice dans ce langage. Il faudrait vraiment penser à passer votre projet en Java, c’est le jour et la nuit en terme de robustesse, de performances, de debug…

@Francois
Notre script fait un peu plus de 4000 lignes. Vous pensez que c’est beaucoup ?

Pour faire un test, cela va être compliqué étant donné que cette erreur est aléatoire.

La migration de notre module vers java est devenue très coûteuse (des centaines de scripts et des milliers de lignes de code) .

Je vais voir si je splitte le code partagé en 19 scripts différents.

Les 4 processes ont bien des fchiers .js dans code source. aucun avec .java

  1. S’il y a des source en .js au niveau des workflow, il ne devrait pas tenter une compilation java, à vérifier chez nous
  2. Sur le code, il faut raisonner en terme de maintenabilité de vos milliers de lignes de code à long terme, et pas en terme d’un travail à faire une fois, plus vous attendez plus ce sera long.

Quand il y a autant de code, clairement Rhino n’est plus adapté, vous aurez des pb que personne ne pourra résoudre ou reproduire, et vous passerez tout autant de temps à les maintenir. C’est aussi l’occasion de se relire, repenser du code écrit il y a longtemps. Le code Java peut être audité, optimisé (sonarQube)… en général on trouve pas mal d’erreurs invisbles.

Nous laisserons Rhino pour comptabilité ascendante encore longtemps mais nous ne faisons plus aucune évolution dessus depuis 2 ans, grâce au retour de Java au niveau des hooks plus personne n’est formé à cette forme de scripting, ça reste utilisé uniquement pour des expressions purement interprétée et low-code (comme des contraintes).

La migration est assez simple car en général 80% est déjà du “java-scripté”, le plus gros du travail consiste à refactorer en classes les objets et typer les hooks et toutes les variables, et faire attention au “equals” sur les String.

Ca peut devenir compliqué si vous utilisez réellement des objets javascript (Array, Object) dans votre code (et pas des objets Java telles que Map, List…).