AnsweredAssumed Answered

Bonjour à tous,et super l'annonce de la 2.2J'ai...

Question asked by denisr on Oct 23, 2007
Latest reply on Oct 25, 2007 by denisr
Bonjour à tous,
et super l'annonce de la 2.2

J'ai un nouveau cas à vous soumettre.(En 2.1.0…)

J'ai créé un <type> avec une <association> qui permet de rattacher à un document un autre document.
Lorsque je crée un document de ce type et que j'y rattache ou non un autre document tout va bien.

Un exception apparait lorsque je veux changer de document associé ou ne plus associer de document.
Lors de l'update le seul cas où il n'y a pas d'exception est lorsque je n'avais pas de document associé et que j'en associe un pour la première fois.

Je ne sais pas si je suis bien clair mais en tous cas je mets ci-dessous mes fichiers custom que j'ai beaucoup simplifié pour reproduire le bug sur une autre plate-forme et avec un nombre de propriétés a minima ainsi que l'extrait du log.

J'espère que les phrases:
The association source multiplicity has been violated:
   Target Node: workspace://SpacesStore/d58a0e03-817a-11dc-82bb-fba1eb5b50b8
   Association: Association[ class=ClassDef[name={GLcustom.model}release-note-1]
, name={GLcustom.model}Image, target class={http://www.alfresco.org/model/conten
t/1.0}content, source role=null, target role=null]
   Required source Multiplicity: 1..1
   Actual source Multiplicity: 0
17:55:19,740 ERROR [ui.common.Utils] A system error happened during the operatio
n: Unknown Exception in Transaction.
vous donneront des idées parce que moi je sèche.





Voici le contenu de mon customModel.xml:
<?xml version="1.0" encoding="UTF-8"?>

<!– Custom Model –>

<!– Note: This model is pre-configured to load at startup of the Repository.  So, all custom –>
<!–       types and aspects added here will automatically be registered –>

<model name="custom:customModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Optional meta-data about the model –>  
   <description>Custom Model</description>
   <author>DRr</author>
   <version>1.0</version>

   <imports>
        <!– Import Alfresco Dictionary Definitions –>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
      <!– Import Alfresco Content Domain Model Definitions –>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
   </imports>

   <!– Introduction of new namespaces defined by this model –>
   <!– NOTE: The following namespace custom.model should be changed to reflect your own namespace –>
   <namespaces>
      <namespace uri="custom.model" prefix="custom"/>
      <namespace uri="GLcustom.model" prefix="GLDoc"/>
   </namespaces>

   <constraints>
   </constraints>
  
   <types>
     <type name="GLDoc:release-note-1">
        <title>TestNote 1</title>
        <parent>cm:content</parent>
        <properties>

          <property name="GLDoc:TestType">
            <title>RN 0 Type</title>
            <type>d:text</type>
          </property>

          <property name="GLDoc:Mkts1">
            <title>Impacted Markets</title>
            <type>d:text</type>
          </property>

   </properties>
        <associations>
          <association name="GLDoc:Image">
            <title>Screen Shot</title>
            <target>
              <class>cm:content</class>
              <mandatory>false</mandatory>
              <many>false</many>
            </target>
          </association>
        </associations>
     </type>

     
   </types>
  
   <aspects>

   </aspects>

     
</model>
De mon web-client-config-custom.xml:
<alfresco-config>
  <config evaluator ="string-compare" condition="Action Wizards">
      <subtypes>
        <type name="GLDoc:release-note-1"/>
      </subtypes>
  </config>

<config evaluator="string-compare" condition="Content Wizards">
         <content-types>
            <type name="GLDoc:release-note-1" />
         </content-types>
</config>

<config evaluator="node-type" condition="GLDoc:release-note-1">
    <property-sheet>
      <show-property name="GLDoc:TestType"/>
      <show-property name="GLDoc:Mkts1"/>
      <show-association name="GLDoc:Image"/>
    </property-sheet>
  </config>

</alfresco-config>
et enfin l'exception apparaissant dans alfresco.log:
17:36:57,684 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco started (Community Network): Current version 2.1.0 (482) schema 64 - Installed version 2.1.0 (482) schema 64
17:39:43,837 ERROR [org.alfresco.repo.node.integrity.IntegrityChecker] Found 1 integrity violations:
The association source multiplicity has been violated:
   Target Node: workspace://SpacesStore/c1738a24-817a-11dc-82bb-fba1eb5b50b8
   Association: Association[ class=ClassDef[name={GLcustom.model}release-note-1], name={GLcustom.model}Image, target class={http://www.alfresco.org/model/content/1.0}content, source role=null, target role=null]
   Required source Multiplicity: 1..1
   Actual source Multiplicity: 0
17:39:43,852 ERROR [org.alfresco.web.ui.common.Utils] A system error happened during the operation: Unknown Exception in Transaction.
org.alfresco.error.AlfrescoRuntimeException: Unknown Exception in Transaction.
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:292)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155)
   at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java:124)
   at org.alfresco.web.bean.dialog.DialogManager.finish(DialogManager.java:347)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
   at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
   at javax.faces.component.UICommand.broadcast(UICommand.java:109)
   at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
   at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
   at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
   at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:619)
Caused by: javax.transaction.RollbackException: Transaction didn't commit: Integrity failure
   at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:430)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:239)
   … 33 more
Caused by: org.alfresco.repo.node.integrity.IntegrityException: Integrity failure
   at org.alfresco.repo.node.integrity.IntegrityChecker.checkIntegrity(IntegrityChecker.java:626)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.flush(AlfrescoTransactionSupport.java:559)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.beforeCommit(AlfrescoTransactionSupport.java:630)
   at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:48)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:821)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:637)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:624)
   at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:307)
   at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:420)
   … 34 more
Merci d'avance de votre aide

Cordialement,
DenisR

Outcomes