cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to find association definition for association

arnieaustin
Champ in-the-making
Champ in-the-making
What does that error mean, exactly? Especially given:

      <aspect name="xyz:matter">
         <title>XYZ Matter</title>
         <description>XYZ Matter</description>
         <properties>
            <property name="xyz:matterNumber">
               <title>matterNumber</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
            <property name="xyz:matterReceivedDate">
               <title>matterReceivedDate</title>
               <type>d:datetime</type>
               <mandatory>true</mandatory>
            </property>
            <property name="xyz:matterClosed">
               <title>matterClosed</title>
               <type>d:boolean</type>
               <mandatory>false</mandatory>
            </property>
            <property name="xyz:matterClosedDate">
               <title>matterClosedDate</title>
               <type>d:datetime</type>
               <mandatory>false</mandatory>
            </property>
            <property name="xyz:matterSecured">
               <title>matterSecured</title>
               <type>d:boolean</type>
               <mandatory>false</mandatory>
            </property>
         </properties>
         <associations>
            <association name="xyz:matterAssociation">
               <title>ZYZ Matter association</title>
               <source>
                  <mandatory>true</mandatory>
                  <many>false</many>
               </source>
               <target>
                  <class>abc:abcDocument</class>
                  <mandatory>true</mandatory>
                  <many>false</many>
               </target>
            </association>
         </associations>
      </aspect>

the abc:abcDocument type is a real type which I have used to create the content with. I was even able to populate its fields with values.

Yet when I try to apply the aspect, I get:

2013-01-06 09:29:32,995  WARN  [component.property.UIAssociation] [http-apr-8080-exec-4] Failed to find association definition for association 'xyz:matter'.

but ONLY on the console! Not in the Explorer UI!

The system boots without an error - so why is it I can select the aspect to add, yet this stupid error appears on the console. It just returns to the details page of the content as though nothing happened.
5 REPLIES 5

jpotts
World-Class Innovator
World-Class Innovator
Can you also supply your web-client-config-custom.xml file? I suspect your "show-association" element is pointing to the type ("xyz:matter") instead of the association name ("xyz:matterAssociation"). This would explain why the server starts up fine–your model is okay, it is just the web client config that is off–and why the error message gives your type name instead of the association name.

Jeff

arnieaustin
Champ in-the-making
Champ in-the-making
You were right on, thanks! I corrected the web client configuration file and it showed up.

However, the labels aren't right. The first field's label is repeated for each field.

Labels:

#
# These strings have to be copied to webclient.properties as well
#
abc_abcModel.title=abc Data Model Extensions
abc_abcModel.description=Metadata for all abc content
#
abc_abcModel.type.abc_matter.title=abc Matter
abc_abcModel.type.abc_matter.description=Defines content as related to an abc Matter
abc_abcModel.property.abc_matterNumber.title=Matter Number
abc_abcModel.property.abc_matterReceivedDate.title=Received Date
abc_abcModel.property.abc_matterClosed.title=Matter Closed?
abc_abcModel.property.abc_matterClosedDate.title=Date Closed
abc_abcModel.property.abc_matterSecured.title=Is Secured?

Configuration:

<config evaluator="node-type" condition="abc:matter" >
   <property-sheet>
      <separator name="abcMatterSep" display-label-id="abc_abcModel.type.abc_matter.title"
         component-generator="HeaderSeparatorGenerator" />
      <show-property name="abc:matterNumber" display-label-id="abc_abcModel.property.abc_matterReceivedDate.title" ignore-if-missing="false" />
      <show-property name="abc:matterReceivedDate" display-label-id="abc_abcModel.property.abc_matterReceivedDate.title" ignore-if-missing="false" />
      <show-property name="abc:matterClosed" display-label-id="abc_abcModel.property.abc_matterClosed.title" ignore-if-missing="true" />
      <show-property name="abc:matterClosedDate" display-label-id="abc_abcModel.property.abc_matterClosedDate.title" ignore-if-missing="true" />
      <show-property name="abc:matterSecured" display-label-id="abc_abcModel.property.abc_matterSecured.title" ignore-if-missing="true" />
   </property-sheet>
</config>

On the rendered page:

OAG Matter
      Matter Number:   
      Matter Number:   
None
       Matter Number:   
       Matter Number:   
None
       Matter Number:   

jpotts
World-Class Innovator
World-Class Innovator
Hey, great. Glad that worked for you.

Can you tell me which file your labels are defined in? For the Alfresco Explorer client, the file should be webclient.properties and it does not follow any special convention. As long as the display-label-id matches the key in your webclient.properties file you should see the correct label.

Jeff

arnieaustin
Champ in-the-making
Champ in-the-making
Actually, following an example from a book, I created abcModel.xml (for the types/aspect) and then abcModel.properties.

That doesn't apply?

Also, just curious - so once these mods to the Explorer UI are done, will Share see them?

jpotts
World-Class Innovator
World-Class Innovator
I shouldn't have mentioned the webclient.properties approach. Your use of your own custom properties file which you point to from the labels property of the data dictionary bean is a better one because it more cleanly separates your config when you have multiple extensions. Using that approach you do follow the property naming convention you are showing here. The trick is that you do not need to specify a display-id in the web-client-config-custom.xml file because the naming convention wires that up for you. Try removing those display ID's and see if you have better luck.

As to the Share question, yes, it is a separate config.

If you want to see an example of one custom content model config'd for both Explorer and Share, take a look at this tutorial and the code that accompanies it. Note that in that example I use the "webclient.properties" approach for the Explorer client.

Jeff