ALfresco 3.2 et SQL Server

cancel
Showing results for 
Search instead for 
Did you mean: 
ima_alfresco
Member II

ALfresco 3.2 et SQL Server

Bonjour,

Je tentes d'installer Alfresco 3.2 community disponible ici http://wiki.alfresco.com/wiki/Download_Community_Editionet SQL server. Certains diront , pourquoi ne pas aller sur mysql mais je ne peux pas !!! pour des questions professionnelles Smiley Happy

Déjà surprise tous les fichiers de paramétrage ont changé, c'est donc réparti pour une nouvelle recheche sur la configuration d'Alfresco !!

J'ai suivi ce petit tutoriel http://wiki.alfresco.com/wiki/Database_Configuration#MS-SQL_Databases avec la nouvelle évolution du fichier de paramétrage alfresco_global.properties

Faut il copier le dialect Hibernate qque part dans Ibatis? je découvre sur ce point. la version community n'est elle dispo que pour mysql?

Mai j'ai les erreurs suivantes :

Caused by: java.lang.RuntimeException: Error occurred.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.sqlmap.client.SqlMapException: The <sqlMap> resource is missing: alfresco/ibatis/#resource.dialect#/content-insert-SqlMap.xml
   at org.alfresco.ibatis.HierarchicalSqlMapConfigParser.parse(HierarchicalSqlMapConfigParser.java:112)
   at org.alfresco.ibatis.HierarchicalSqlMapClientFactoryBean.buildSqlMapClient(HierarchicalSqlMapClientFactoryBean.java:86)
   at org.springframework.orm.ibatis.SqlMapClientFactoryBean.afterPropertiesSet(SqlMapClientFactoryBean.java:280)
   at org.alfresco.ibatis.HierarchicalSqlMapClientFactoryBean.afterPropertiesSet(HierarchicalSqlMapClientFactoryBean.java:74)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1203)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.aop.framework.ProxyFactoryBean.freshTargetSource(ProxyFactoryBean.java:546)
   at org.springframework.aop.framework.ProxyFactoryBean.getSingletonInstance(ProxyFactoryBean.java:291)
   at org.springframework.aop.framework.ProxyFactoryBean.getObject(ProxyFactoryBean.java:228)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectFromFactoryBean(AbstractBeanFactory.java:1246)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1217)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:260)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:248)
   at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:820)
   at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:597)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:69)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:516)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
   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.catalina.startup.Bootstrap.start(Bootstrap.java:288)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.sqlmap.client.SqlMapException: The <sqlMap> resource is missing: alfresco/ibatis/#resource.dialect#/content-insert-SqlMap.xml
   at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:62)
   at org.alfresco.ibatis.HierarchicalSqlMapConfigParser.parse(HierarchicalSqlMapConfigParser.java:107)
   … 139 more
Caused by: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.sqlmap.client.SqlMapException: The <sqlMap> resource is missing: alfresco/ibatis/#resource.dialect#/content-insert-SqlMap.xml
   at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123)
   at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:84)
   at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102)
   at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72)
   at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:60)
   … 140 more
Caused by: com.ibatis.sqlmap.client.SqlMapException: The <sqlMap> resource is missing: alfresco/ibatis/#resource.dialect#/content-insert-SqlMap.xml
   at org.alfresco.ibatis.HierarchicalSqlMapConfigParser$10.process(HierarchicalSqlMapConfigParser.java:352)
   at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121)
   … 144 more

Merci d'avance
7 Replies
michaelh
Active Member

Re: ALfresco 3.2 et SQL Server

Comme déjà dit ailleurs, aucun test n'est fait en version communautaire sur les bases Oracle ou SQLServer (on se concentre sur les bases communautaires aussi : PostgreSQL / MySQL).
Même si en théorie ça pourrait fonctionner, ça risque de vous demander pas mal de travail.
ima_alfresco
Member II

Re: ALfresco 3.2 et SQL Server

Merci Michael, c'est bien ce que je me doutais que les versions community n'étaient pas testé avec des bases autres que MySQL, mais je trouves ca dommage car je dois pas être le seul à chercher à se connecter avec une autre base.

Faut il récupérer des fichiers de paramétrages pour Ibatis, j'ai l'impression que c'est cela qui me manque?

J'avais bien vu tout ce qui a été dit, mais franchement on ne peux rien dire sans se faire renvoyer dans nos 22 , c'est un forum d'entre-aide, surtout que j'avais mis toutes les infos que j'avais trouvé, pas comme si j'avais fais aucune recherche.

Mais merci quand même
michaelh
Active Member

Re: ALfresco 3.2 et SQL Server

Ne voyez pas d'agression dans ma réponse, c'est du factuel. Par contre j'ai bien supprimé deux messages intermédiaires qui étaient :
- l'un hors sujet et totalement inutile (crokette)
- l'autre donnant un lien sans aucun rapport (Gardouille)
On ne dira pas que je supprime en douce Smiley Happy

Et concernant la conf avec  SQLserver, je n'ai juste aucun indice à donner.
Ca ne marche pas qu'avec MySQL cela dit, PostGreSQL est aussi une très bonne base Smiley Happy
ima_alfresco
Member II

Re: ALfresco 3.2 et SQL Server

Salut,

Michael, c'est pas envers toi que je sentais une agression, mais plutôt sur les messages précédents. Je trouve que certaines personnes ne sont pas très patientes ou sont là pour casser les gens qui cherchent.

Enfin bref ce n'est pas grave, j'ai tout de même réussi a connecter Alfresco 3.2 avec SQL Server.

Voici ce que j'ai fais, en gros adapter les fichiers mysql pour sqlserver, ca l'air de marcher je testes :

alfresco-global.properties

db.name=alfresco
db.username=alfresco
db.password=alfresco
db.driver=net.sourceforge.jtds.jdbc.Driver
db.url=jdbc:jtds:sqlserver://serveurbase:port;databaseName=nombase
db.txn.isolation=4096
hibernate.dialect=org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect

Répertoire \tomcat\webapps\alfresco\WEB-INF\classes\alfresco\ibatis

Création d'un répertoire org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect

Avec les fichiers :

activities-insert-SqlMap.xml

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE sqlMap     
    PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"     
    "http://ibatis.apache.org/dtd/sql-map-2.dtd">

<sqlMap namespace="alfresco.activities">

   <insert id="insert.activity.feedcontrol" parameterClass="FeedControl">
      insert into alf_activity_feed_control (id, feed_user_id, site_network, app_tool, last_modified)
      values (DEFAULT, #feedUserId#, #siteNetwork#, #appTool#, #lastModified#)
     
      <!– optionally return auto-generated primary key - only required for debug (can be commented out)
      <selectKey resultClass="long" keyProperty="id" type="post">
         values IDENTITY_VAL_LOCAL()
      </selectKey>–>
   </insert>

   <insert id="insert.activity.feed" parameterClass="ActivityFeed">
      insert into alf_activity_feed (id, activity_type, activity_summary, activity_format, feed_user_id, post_user_id, post_date, post_id, site_network, app_tool, feed_date)
      values (DEFAULT, #activityType#, #activitySummary#, #activitySummaryFormat#, #feedUserId#, #postUserId#, #postDate#, #postId#, #siteNetwork#, #appTool#, #feedDate#)
     
      <!– optionally return auto-generated primary key - only required for debug (can be commented out)
      <selectKey resultClass="long" keyProperty="id" type="post">
         values IDENTITY_VAL_LOCAL()
      </selectKey>–>
   </insert>

   <insert id="insert.activity.post" parameterClass="ActivityPost">
      insert into alf_activity_post (sequence_id, status, activity_data, post_user_id, post_date, activity_type, site_network, app_tool, job_task_node, last_modified)
      values (DEFAULT, #status#, #activityData#, #userId#, #postDate#, #activityType#, #siteNetwork#, #appTool#, #jobTaskNode#, #lastModified#)
     
      <!– optionally return auto-generated primary key - only required for debug (can be commented out)
      <selectKey resultClass="long" keyProperty="id" type="post">
         values IDENTITY_VAL_LOCAL()
      </selectKey>    –>
   </insert>

</sqlMap>

content-insert-SqlMap.xml

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE sqlMap     
    PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"     
    "http://ibatis.apache.org/dtd/sql-map-2.dtd">

<sqlMap namespace="alfresco.content">

    <insert id="insert.Mimetype" parameterClass="Mimetype" >
        <include refid="insert.Mimetype.AutoIncrement"/>
        <selectKey resultClass="long" keyProperty="id" type="post">
            <!– values IDENTITY_VAL_LOCAL()–>
           select @@IDENTITY
        </selectKey>
    </insert>

    <insert id="insert.Encoding" parameterClass="Encoding" >
        <include refid="insert.Encoding.AutoIncrement"/>
        <selectKey resultClass="long" keyProperty="id" type="post">
            <!– values IDENTITY_VAL_LOCAL()–>
           select @@IDENTITY
        </selectKey>
    </insert>

    <insert id="insert.ContentUrl" parameterClass="ContentUrl" >
        <include refid="insert.ContentUrl.AutoIncrement"/>
        <selectKey resultClass="long" keyProperty="id" type="post">
             <!– values IDENTITY_VAL_LOCAL()–>
           select @@IDENTITY
        </selectKey>
    </insert>

    <insert id="insert.ContentData" parameterClass="ContentData" >
        <include refid="insert.ContentData.AutoIncrement"/>
        <selectKey resultClass="long" keyProperty="id" type="post">
             <!– values IDENTITY_VAL_LOCAL()–>
           select @@IDENTITY
        </selectKey>
    </insert>

</sqlMap>

locks-insert-SqlMap.xml

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE sqlMap     
    PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"     
    "http://ibatis.apache.org/dtd/sql-map-2.dtd">

<sqlMap namespace="alfresco.lock">

    <insert id="insert.LockResource" parameterClass="LockResource" >
        <include refid="insert.LockResource.AutoIncrement"/>
        <selectKey resultClass="long" keyProperty="id" type="post">
           <!– values IDENTITY_VAL_LOCAL()–>
           select @@IDENTITY
        </selectKey>   
    </insert>

    <insert id="insert.Lock" parameterClass="Lock" >
        <include refid="insert.Lock.AutoIncrement"/>
        <selectKey resultClass="long" keyProperty="id" type="post">
             <!– values IDENTITY_VAL_LOCAL()–>
           select @@IDENTITY
        </selectKey>   
    </insert>

</sqlMap>

Puis dans le répertoire tomcat\webapps\alfresco\WEB-INF\classes\alfresco\dbscripts\create\3.2

Création d'un répertoire org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect

AlfrescoPostCreate-3.2-ContentTables.sql


– Title:      Create Content tables
– Database:   Derby
– Since:      V3.2 Schema 2012
– Author:     Derek Hulley

– Please contact support@alfresco.com if you need assistance with the upgrade.


CREATE TABLE alf_mimetype
(
   id numeric(19,0) NOT NULL IDENTITY,
   version numeric(19,0) NOT NULL,
   mimetype_str VARCHAR(100) NOT NULL,
   PRIMARY KEY (id),
   UNIQUE (mimetype_str)
);

CREATE TABLE alf_encoding
(
   id numeric(19,0) NOT NULL IDENTITY,
   version numeric(19,0) NOT NULL,
   encoding_str VARCHAR(100) NOT NULL,
   PRIMARY KEY (id),
   UNIQUE (encoding_str)
);

– This table may exist during upgrades, but must be removed.
– The drop statement is therefore optional.
DROP TABLE alf_content_url;                     –(optional)
CREATE TABLE alf_content_url
(
   id numeric(19,0) NOT NULL IDENTITY,
   version numeric(19,0) NOT NULL,
   content_url VARCHAR(255) NOT NULL,
   content_url_short VARCHAR(12) NOT NULL,
   content_url_crc numeric(19,0) NOT NULL,
   content_size numeric(19,0) NOT NULL,
   CONSTRAINT idx_alf_cont_url_crc UNIQUE (content_url_short, content_url_crc),
   PRIMARY KEY (id)
);

CREATE TABLE alf_content_data
(
   id numeric(19,0) NOT NULL IDENTITY,
   version numeric(19,0) NOT NULL,
   content_url_id numeric(19,0),
   content_mimetype_id numeric(19,0),
   content_encoding_id numeric(19,0),
   content_locale_id numeric(19,0),
   CONSTRAINT fk_alf_cont_url FOREIGN KEY (content_url_id) REFERENCES alf_content_url (id),
   CONSTRAINT fk_alf_cont_mim FOREIGN KEY (content_mimetype_id) REFERENCES alf_mimetype (id),
   CONSTRAINT fk_alf_cont_enc FOREIGN KEY (content_encoding_id) REFERENCES alf_encoding (id),
   CONSTRAINT fk_alf_cont_loc FOREIGN KEY (content_locale_id) REFERENCES alf_locale (id),
   PRIMARY KEY (id)
);

CREATE TABLE alf_content_clean
(
   content_url VARCHAR(255) NOT NULL
);
CREATE INDEX idx_alf_contentclean_url ON alf_content_clean(content_url);


– Record script finish

DELETE FROM alf_applied_patch WHERE id = 'patch.db-V3.2-ContentTables';
INSERT INTO alf_applied_patch
  (id, description, fixes_from_schema, fixes_to_schema, applied_to_schema, target_schema, applied_on_date, applied_to_server, was_executed, succeeded, report)
  VALUES
  (
    'patch.db-V3.2-ContentTables', 'Manually executed script upgrade V3.2: Content Tables',
    0, 2011, -1, 2012, null, 'UNKOWN', 1, 1, 'Script completed'
  );

AlfrescoPostCreate-3.2-LockTables.sql


– Title:      Create lock tables
– Database:   Derby
– Since:      V3.2 Schema 2011
– Author:     Derek Hulley

– Please contact support@alfresco.com if you need assistance with the upgrade.


CREATE TABLE alf_lock_resource
(
   id numeric(19,0) NOT NULL IDENTITY ,
   version numeric(19,0) NOT NULL,
   qname_ns_id numeric(19,0) NOT NULL,
   qname_localname VARCHAR(255) NOT NULL,
   CONSTRAINT fk_alf_lockr_ns FOREIGN KEY (qname_ns_id) REFERENCES alf_namespace (id),
   CONSTRAINT fk_alf_lockr_id PRIMARY KEY (id),
   CONSTRAINT idx_alf_lockr_key UNIQUE (qname_ns_id, qname_localname)
);

CREATE TABLE alf_lock
(
   id numeric(19,0) NOT NULL IDENTITY,
   version numeric(19,0) NOT NULL,
   shared_resource_id numeric(19,0) NOT NULL,
   excl_resource_id numeric(19,0) NOT NULL,
   lock_token VARCHAR(36) NOT NULL,
   start_time numeric(19,0) NOT NULL,
   expiry_time numeric(19,0) NOT NULL,
   CONSTRAINT fk_alf_lock_shared FOREIGN KEY (shared_resource_id) REFERENCES alf_lock_resource (id),
   CONSTRAINT fk_alf_lock_excl FOREIGN KEY (excl_resource_id) REFERENCES alf_lock_resource (id),
   CONSTRAINT fk_alf_lock_id PRIMARY KEY (id),
   CONSTRAINT idx_alf_lock_key UNIQUE (shared_resource_id, excl_resource_id)
);


– Record script finish

DELETE FROM alf_applied_patch WHERE id = 'patch.db-V3.2-LockTables';
INSERT INTO alf_applied_patch
  (id, description, fixes_from_schema, fixes_to_schema, applied_to_schema, target_schema, applied_on_date, applied_to_server, was_executed, succeeded, report)
  VALUES
  (
    'patch.db-V3.2-LockTables', 'Manually executed script upgrade V3.2: Lock Tables',
    0, 2010, -1, 2011, null, 'UNKOWN', 1, 1, 'Script completed'
  );
niconaso
Member II

Re: ALfresco 3.2 et SQL Server

I followed the steps you mentioned here but when Tomcat started I get an error with the encoding. I solved it using the following line on the software_engeneering_project.xml file:
encoding=utf8 (line 40).
It would be helpfull to have the upgrades files located on "alfresco\dbscripts\upgrade\3.2". Have you reproduced them for MSServer?
Could you post all the steps you made to run Alfresco 3.2 succesfully?
It would be a great helpfull.

Sorry, I have to write en english because I don't know french Smiley Sad
Merci d'avance
ima_alfresco
Member II

Re: ALfresco 3.2 et SQL Server

Hi,

Sorry for the late.

All the steps i do are writing on the post. It is work on Microsoft Plateform, i try on linux Plateform i have some errors …

I do anything on MSServer, all my tables are created by Alfresco.

When i search a solution for compatibilty SQL Server and Alfresco Community 3.2, some people who work in Alfresco said to use Alfresco Community with MySQL or Open Source Database, and if we have money for SQL Server we have money for Alfresco Entreprise.

My answer is correct for you?
ima_alfresco
Member II

Re: ALfresco 3.2 et SQL Server

La solution que j'ai décrite plus haut fonctionne bien avec le 3.2 mais pas avec la 3.2R, je n'ai pas d'explications !! si qqun en a une.