Projet

Général

Profil

Actions

Bug #14335

fermé

Erreur lors de la création d'une instance de WF si le dossier contient un fichier

Ajouté par David Lesimple il y a 14 jours. Mis à jour il y a 6 jours.

Statut:
Closed
Priorité:
Normal
Assigné à:
Début:
02/09/2024
Echéance:
% réalisé:

100%

Temps estimé:
Navigateur:
Autre
Votre version de Silverpeas:
6.4
Système d'exploitation:
Votre base de données:
Toutes
Livraison en TEST:
Livraison en PROD:

Description

Le problème ne se produit que si on utilise la méthode createProcess de DefaultProcessManagerService.

A noter que le problème ne se produit pas lorsqu'on crée une instance depuis l'application Workflow, car la création de l'instance se fait via le Handler saveCreationHandler.

L'explication semble venir du fait que depuis la migration de la JCR jackrabbit vers Oak, le mécanisme de gestion des documents a été renforcé, et que le foreignId (id de l'instance) sur SimpleDocument est maintenant obligatoire.
La méthode createProcess de DefaultProcessManagerService créait l'instance APRES avoir crée les SimpleDocument, ce qui occasionne cette erreur.

l'erreur en question :

Caused by: java.lang.NullPointerException
        at deployment.silverpeas.war//org.apache.jackrabbit.guava.common.base.Preconditions.checkNotNull(Preconditions.java:889)
        at deployment.silverpeas.war//org.apache.jackrabbit.oak.plugins.memory.StringPropertyState.<init>(StringPropertyState.java:35)
        at deployment.silverpeas.war//org.apache.jackrabbit.oak.plugins.memory.StringPropertyState.stringProperty(StringPropertyState.java:46)
        at deployment.silverpeas.war//org.apache.jackrabbit.oak.plugins.value.jcr.PartialValueFactory.createValue(PartialValueFactory.java:151)
        at deployment.silverpeas.war//org.silverpeas.core.contribution.attachment.repository.DocumentRepository.selectDocumentsByForeignIdAndType(DocumentRepository.java:810)
        at deployment.silverpeas.war//org.silverpeas.core.contribution.attachment.repository.DocumentRepository.getMinMaxOrderIndexes(DocumentRepository.java:680)
        at deployment.silverpeas.war//org.silverpeas.core.contribution.attachment.repository.DocumentRepository.createDocument(DocumentRepository.java:113)
        at deployment.silverpeas.war//org.silverpeas.core.contribution.attachment.SimpleDocumentService.createAttachment(SimpleDocumentService.java:260)
        at deployment.silverpeas.war//org.silverpeas.core.contribution.attachment.SimpleDocumentService$Proxy$_$$_WeldSubclass.createAttachment(Unknown Source)
        at deployment.silverpeas.war//org.silverpeas.core.contribution.attachment.SimpleDocumentService.createAttachment(SimpleDocumentService.java:249)
        at deployment.silverpeas.war//org.silverpeas.core.contribution.attachment.SimpleDocumentService$Proxy$_$$_WeldSubclass.createAttachment(Unknown Source)
        at deployment.silverpeas.war//org.silverpeas.core.contribution.attachment.SimpleDocumentService.createAttachment(SimpleDocumentService.java:240)

Mis à jour par David Lesimple il y a 14 jours

  • Description mis à jour (diff)

Mis à jour par David Lesimple il y a 12 jours

  • Statut changé de New à In progress...

Mis à jour par David Lesimple il y a 12 jours

  • Statut changé de In progress... à Resolved
  • % réalisé changé de 0 à 100

Mis à jour par Miguel Moquillon il y a 6 jours

  • Statut changé de Resolved à Closed

Intégré dans les branches 6.4.x et master

Actions

Formats disponibles : Atom PDF