Project

General

Profile

Actions

Bug #14335

closed

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

Added by David Lesimple over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Start date:
09/02/2024
Due date:
% Done:

100%

Estimated time:
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)

Actions #1

Updated by David Lesimple over 1 year ago

  • Description updated (diff)
Actions #3

Updated by David Lesimple over 1 year ago

  • Status changed from New to In progress...
Actions #4

Updated by David Lesimple over 1 year ago

  • Status changed from In progress... to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Miguel Moquillon over 1 year ago

  • Status changed from Resolved to Closed

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

Actions

Also available in: Atom PDF