Projet

Général

Profil

Bug #14335

Mis à jour par David Lesimple il y a 16 jours

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 créer une instance depuis l'application Workflow, car la création de l'instance se fait via le Handler saveCreationHandler. 

 L'explication semble venir vient du fait faite que depuis la migration de la JCR jackrabbit vers Oak, le mécanisme de gestion création des documents a été renforcé, renforcés, 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 : 
 <pre> 
 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) 

 </pre> 

Retour