j'ai ajouté le 2 ème modèle dans le fichier scModel.xmlVous voulez dire que vous avez ajouté un nouveau type à votre modèle de contenu scModel.xml ?
<?xml version="1.0" encoding="iso-8859-1"?>
<!–definition of new model–>
<model name="sc:somecomodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<description>Someco Model</description>
<author>Optaros</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 my.new.model should be changed to reflect your own namespace
–>
- <namespaces>
<namespace uri="http://www.someco.com/model/content/1.0" prefix="sc" />
</namespaces>
<constraints>
<constraint name="sc:idLength" type="LENGTH">
<parameter name="minLength"><value>8</value></parameter>
<parameter name="maxLength"><value>8</value></parameter>
</constraint>
<constraint name="sc:idLength1" type="LENGTH">
<parameter name="minLength"><value>4</value></parameter>
<parameter name="maxLength"><value>4</value></parameter>
</constraint>
<constraint name="sc:idLength2" type="LENGTH">
<parameter name="minLength"><value>0</value></parameter>
<parameter name="maxLength"><value>20</value></parameter>
</constraint>
</constraints>
- <types>
- <type name="sc:CIN">
<title>Carte d'Identité </title>
<parent>sc:content</parent>
<properties>
<property name="sc:Numero CIN">
<type>d:int</type>
<constraints>
<constraint ref="sc:idLength"/>
</constraints>
</property>
<property name="sc:Date de Signature">
<type>d:date</type>
</property>
</properties>
</type>
</types>
</model>
pour charger le modèle j'ai utilser le même fichier que le 1er modèle.ce fichier s'appelle someco-model-context.xml où j'ai mis ce code:<?xml version="1.0" encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN'
'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!–registration of models–>
<bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/extension/scModel.xml</value>
<value>alfresco/extension/scCIN.xml</value>
</list>
</property>
</bean>
</beans>
et pour le fichier web-client-config-custom.xml le code est :<alfresco-config>
<config evaluator="string-compare" condition="Languages">
<languages>
<language locale="ca_ES">Catalan</language>
<language locale="da_DK">Danish</language>
<language locale="de_DE">German</language>
<language locale="es_ES">Spanish</language>
<language locale="el_GR">Greek</language>
<language locale="fr_FR">French</language>
<language locale="it_IT">Italian</language>
<language locale="ja_JP">Japanese</language>
<language locale="du_NL">Dutch</language>
<language locale="pt_BR">Portuguese (Brazilian)</language>
<language locale="ru_RU">Russian</language>
<language locale="fi_FI">Finnish</language>
<language locale="tr_TR">Turkish</language>
<language locale="zh_CN">Simplified Chinese</language>
</languages>
</config>
<config evaluator="string-compare" condition="Content Wizards">
<content-types>
<type name="sc:doc" />
</content-types>
</config>
<config evaluator="node-type" condition="sc:doc">
<property-sheet>
<show-property name="sc:Identifiant_Unique" />
<show-property name="sc:Nom_De_L_Affilie" />
<show-property name="sc:Prenom_De_L_Affilie" />
<show-property name="sc:Date_De_Naissance" />
<show-property name="sc:Numero_Extrait" />
<show-property name="sc:Annee_Extrait" />
</property-sheet>
</config>
<config evaluator="string-compare" condition="Content Wizards">
<aspects>
<aspect name="sc:webable"/>
<aspect name="sc:productRelated"/>
</aspects>
<subtypes>
<type name="sc:doc" />
</subtypes>
<specialise-types>
<type name="sc:doc" />
</specialise-types>
</config>
<config evaluator="string-compare" condition="Advanced Search">
<advanced-search>
<content-types>
<type name="sc:doc" />
</content-types>
<custom-properties>
<meta-data type="sc:doc" property="sc:Identifiant_Unique" />
<meta-data type="sc:doc" property="sc:Nom_De_L_Affilie" />
<meta-data type="sc:doc" property="sc:Prenom_De_L_Affilie" />
<meta-data type="sc:doc" property="sc:Date_De_Naissance" />
<meta-data type="sc:doc" property="sc:Numero_Extrait" />
<meta-data type="sc:doc" property="sc:Annee_Extrait" />
</custom-properties>
</advanced-search>
</config>
<config evaluator="string-compare" condition="Content Wizards">
<content-types>
<type name="sc:CIN" />
</content-types>
</config>
<config evaluator="node-type" condition="sc:CIN">
<property-sheet>
<show-property name="sc:Numero CIN" />
<show-property name="sc:Date de Signature" />
</property-sheet>
</config>
<config evaluator="string-compare" condition="Content Wizards">
<aspects>
<aspect name="sc:webable"/>
<aspect name="sc:productRelated"/>
</aspects>
<config evaluator="node-type" condition="sc:CIN">
<property-sheet>
<show-property name="sc:Numero CIN" />
<show-property name="sc:Date de Signature" />
</property-sheet>
</config>
<subtypes>
<type name="sc:CIN" />
</subtypes>
<specialise-types>
<type name="sc:CIN" />
</specialise-types>
</config>
<config evaluator="string-compare" condition="Advanced Search">
<advanced-search>
<content-types>
<type name="sc:CIN" />
</content-types>
<custom-properties>
<meta-data type="sc:CIN" property="sc:Numero CIN" />
<meta-data type="sc:CIN" property="sc:Date de Signature" />
</custom-properties>
</advanced-search>
</config>
</alfresco-config>
merci beaucoup et cordialement.<subtypes>
<type name="sc:CIN" />
</subtypes>
<specialise-types>
<type name="sc:CIN" />
</specialise-types>
</config>
…pas d'ouverture de </config…<config evaluator="string-compare" condition="Content Wizards">
<aspects>
<aspect name="sc:webable"/>
<aspect name="sc:productRelated"/>
</aspects>
…pas de fermeture de <config…<?xml version="1.0" encoding="iso-8859-1"?>
<!–definition of new model–>
<model name="xx:xxnewmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<description>CIN Model</description>
<author>Sarra</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 my.new.model should be changed to reflect your own namespace
–>
- <namespaces>
<namespace uri="xx.new.model" prefix="xx" />
</namespaces>
<constraints>
<constraint name="xx:idLength" type="LENGTH">
<parameter name="minLength"><value>8</value></parameter>
<parameter name="maxLength"><value>8</value></parameter>
</constraint>
<constraint name="xx:idLength1" type="LENGTH">
<parameter name="minLength"><value>4</value></parameter>
<parameter name="maxLength"><value>4</value></parameter>
</constraint>
<constraint name="xx:idLength2" type="LENGTH">
<parameter name="minLength"><value>0</value></parameter>
<parameter name="maxLength"><value>20</value></parameter>
</constraint>
</constraints>
- <types>
- <type name="xx:CIN">
<title>Carte d'Identité </title>
<parent>cm:content</parent>
<properties>
<property name="xx:Numero CIN">
<type>d:int</type>
<constraints>
<constraint ref="xx:idLength"/>
</constraints>
</property>
<property name="xx:Date de Signature">
<type>d:date</type>
</property>
</properties>
</type>
</types>
- <aspects>
- <!– Definition of new Content Aspect: Image Classification
–>
- <aspect name="xx:webable">
<title>Someco Webable</title>
- <properties>
- <property name="xx:published">
<type>d:date</type>
</property>
- <property name="xx:isActive">
<type>d:boolean</type>
<default>false</default>
</property>
-
</properties>
</aspect>
<aspect name="xx:productRelated">
<title>Someco Product Metadata</title>
- <properties>
- <property name="xx:product">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
- <property name="xx:version">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
-
</properties>
</aspect>
</aspects>
</model>
* concernant le 2ème fichier pour charger ce modèle; son nom est CIN-model-context.xml ; son contenu est :<?xml version="1.0" encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN'
'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!–registration of models–>
<bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/extension/xxModel.xml</value>
</list>
</property>
</bean>
</beans>
* et enfin pour le fichier web-client-config-custom.xml c'est pour les deux modèles ; son contenu est :<alfresco-config>
<config evaluator="string-compare" condition="Languages">
<languages>
<language locale="ca_ES">Catalan</language>
<language locale="da_DK">Danish</language>
<language locale="de_DE">German</language>
<language locale="es_ES">Spanish</language>
<language locale="el_GR">Greek</language>
<language locale="fr_FR">French</language>
<language locale="it_IT">Italian</language>
<language locale="ja_JP">Japanese</language>
<language locale="du_NL">Dutch</language>
<language locale="pt_BR">Portuguese (Brazilian)</language>
<language locale="ru_RU">Russian</language>
<language locale="fi_FI">Finnish</language>
<language locale="tr_TR">Turkish</language>
<language locale="zh_CN">Simplified Chinese</language>
</languages>
</config>
<config evaluator="string-compare" condition="Content Wizards">
<content-types>
<type name="sc:doc" />
</content-types>
</config>
<config evaluator="node-type" condition="sc:doc">
<property-sheet>
<show-property name="sc:Identifiant_Unique" />
<show-property name="sc:Nom_De_L_Affilie" />
<show-property name="sc:Prenom_De_L_Affilie" />
<show-property name="sc:Date_De_Naissance" />
<show-property name="sc:Numero_Extrait" />
<show-property name="sc:Annee_Extrait" />
</property-sheet>
</config>
<config evaluator="aspect-name" condition="sc:webable">
<property-sheet>
<show-property name="sc:published" display-label-id="published" />
<show-property name="sc:isActive" display-label-id="isActive" read-only="true"/>
</property-sheet>
</config>
<config evaluator="string-compare" condition="Content Wizards">
<aspects>
<aspect name="sc:webable"/>
<aspect name="sc:productRelated"/>
</aspects>
<subtypes>
<type name="sc:doc" />
</subtypes>
<specialise-types>
<type name="sc:doc" />
</specialise-types>
</config>
<config evaluator="string-compare" condition="Advanced Search">
<advanced-search>
<content-types>
<type name="sc:doc" />
</content-types>
<custom-properties>
<meta-data type="sc:doc" property="sc:Identifiant_Unique" />
<meta-data type="sc:doc" property="sc:Nom_De_L_Affilie" />
<meta-data type="sc:doc" property="sc:Prenom_De_L_Affilie" />
<meta-data type="sc:doc" property="sc:Date_De_Naissance" />
<meta-data type="sc:doc" property="sc:Numero_Extrait" />
<meta-data type="sc:doc" property="sc:Annee_Extrait" />
<!– carte d'identité –>
<config evaluator="string-compare" condition="Content Wizards">
<content-types>
<type name="xx:CIN" />
</content-types>
</config>
<config evaluator="node-type" condition="xx:CIN">
<property-sheet>
<show-property name="xx:Numero CIN" />
<show-property name="xx:Date de Signature" />
</property-sheet>
</config>
<config evaluator="aspect-name" condition="xx:webable">
<property-sheet>
<show-property name="xx:published" display-label-id="published" />
<show-property name="xx:isActive" display-label-id="isActive" read-only="true"/>
</property-sheet>
</config>
<config evaluator="string-compare" condition="Content Wizards">
<aspects>
<aspect name="xx:webable"/>
<aspect name="xx:productRelated"/>
</aspects>
<subtypes>
<type name="xx:CIN" />
</subtypes>
<specialise-types>
<type name="xx:CIN" />
</specialise-types>
</config>
<config evaluator="string-compare" condition="Advanced Search">
<advanced-search>
<content-types>
<type name="xx:CIN" />
</content-types>
<custom-properties>
<meta-data type="xx:CIN" property="xx:Numero CIN" />
<meta-data type="xx:CIN" property="xx:Date de Signature" />
</custom-properties>
</advanced-search>
</config>
</alfresco-config>
pour le serveur Tomcat aucune erreur n'est apparue.<config evaluator="string-compare" condition="Advanced Search">
<advanced-search>
<content-types>
<type name="sc:doc" />
</content-types>
<custom-properties>
<meta-data type="sc:doc" property="sc:Identifiant_Unique" />
<meta-data type="sc:doc" property="sc:Nom_De_L_Affilie" />
<meta-data type="sc:doc" property="sc:Prenom_De_L_Affilie" />
<meta-data type="sc:doc" property="sc:Date_De_Naissance" />
<meta-data type="sc:doc" property="sc:Numero_Extrait" />
<meta-data type="sc:doc" property="sc:Annee_Extrait" />
Si vous regardez les logs d'Alfresco, ce genre d'erreur est clairement indiquée :The element type "custom-properties" must be terminated by the matching end-tag "</custom-properties>". Nested exception: The element type "custom-properties" must be terminated by the matching end-tag "</custom-properties>".
ou encoreorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webClientConfigService' defined in class path resource [alfresco/web-client-application-context.xml]: Initialization of bean failed; nested exception is org.alfresco.config.ConfigException: Failed to parse config stream
org.alfresco.config.ConfigException: Failed to parse config stream
Ces deux indications vous informent sur le fait que votre fichier n'est pas correctement parsé et sur quelle balise pose problème.19 juil. 2007 08:18:59 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:Alfrescojavabin;.;C:WINDOWSsystem32;C:WINDOWS;C:Alfrescojavabin;C:Alfrescobin;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:Program FilesMySQLMySQL Server 4.1bin;C:Program FilesSubversionbin;C:Program FilesSubversionbin
19 juil. 2007 08:19:00 org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
19 juil. 2007 08:19:00 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3906 ms
19 juil. 2007 08:19:01 org.apache.catalina.core.StandardService start
INFO: Démarrage du service Catalina
19 juil. 2007 08:19:01 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.20
19 juil. 2007 08:19:01 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
19 juil. 2007 08:19:04 org.apache.catalina.startup.HostConfig deployWAR
INFO: Déploiement de l'archive alfresco.war de l'application web
19 juil. 2007 08:20:51 org.apache.coyote.http11.Http11BaseProtocol start
INFO: Démarrage de Coyote HTTP/1.1 sur http-8080
19 juil. 2007 08:20:51 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
19 juil. 2007 08:20:51 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/63 config=null
19 juil. 2007 08:20:51 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
19 juil. 2007 08:20:51 org.apache.catalina.startup.Catalina start
INFO: Server startup in 110907 ms
merci et cordialement.Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.