[MNT-16279] Repo hangs if content model has a circular class reference (within the model) Created: 11-May-16  Updated: 20-Jul-16  Resolved: 02-Jun-16

Status: Closed
Project: Service Packs and Hot Fixes
Component/s: Content Modelling, Repository
Affects Version/s: 4.1.N
Fix Version/s: 5.1.1

Type: Bug
Reporter: Jan Vonka Assignee: Closed Bugs (Inactive)
Resolution: Fixed Votes: 0
Labels: rn511
Remaining Estimate: 0 minutes
Time Spent: 2 days, 35 minutes
Original Estimate: Not Specified

Attachments: Text File alfresco.log    
Issue Links:
Blocks
Related
relates to MNT-14332 Alfresco stops working when Type Hier... Closed
relates to ALF-19094 Crash server by adding cyclic model t... Closed
is related to by SHA-1573 Share Repository view for (Dynamic) M... Done
Bug Priority:
Category 3
Build Location: https://releases.alfresco.com/Enterprise-5.1/5.1.1/5.1.1/build-00138/ALL/

 Description   

Here's an example. Put both files in shared/classes/alfresco/extension and restart the repo (or alternatively try to activate as a dynamic model - via Share UI or Repo Admin console). Repo will hang (in CompiledModel.resolveInhertiance).

my-model-context.xml

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
 
<beans>

<bean id="my.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">

  <property name="models">
        <list>
            <value>alfresco/extension/custom-model.xml</value>
        </list>
  </property>

</bean>

</beans>

my-model.xml

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

<namespaces>
  <namespace uri="myZ.model" prefix="myZ"/>
</namespaces>

<types>

  <type name="myZ:mytypeA">
    <parent>myZ:mytypeC</parent>
  </type>

  <type name="myZ:mytypeB">
    <parent>myZ:mytypeA</parent>
  </type>

  <type name="myZ:mytypeC">
    <parent>myZ:mytypeA</parent>
  </type>

</types>

</model>

Generated at Mon Mar 08 15:59:58 GMT 2021 using Jira 7.13.15#713015-sha1:7c5ddd2c3e1709974ae9c48c17df8edd3919fe2c.