AnsweredAssumed Answered

Migration of Users into Alfresco

Question asked by amitabhandari1 on Oct 4, 2008
Latest reply on Nov 5, 2008 by amitabhandari1
HI

I want to import users into Alfresco 3B.
I created two files :

person.xml

<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0"
           xmlns:cm="http://www.alfresco.org/model/content/1.0"
           xmlns:sys="http://www.alfresco.org/model/system/1.0"
           xmlns:app="http://www.alfresco.org/model/application/1.0"
           xmlns:usr="http://www.alfresco.org/model/user/1.0" >               
         <cm:person view:childName="cm:person">
             <cm:userName>Carol</cm:userName>
            <cm:firstName>Carol</cm:firstName>
            <cm:lastName>Millionkkkk</cm:lastName>
             <cm:email></cm:email>
            <cm:organizationId></cm:organizationId>
              </cm:person>
            </view:view>

and alfrescoUserStore.xml

<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0"
           xmlns:cm="http://www.alfresco.org/model/content/1.0"
           xmlns:sys="http://www.alfresco.org/model/system/1.0"
           xmlns:app="http://www.alfresco.org/model/application/1.0"
         xmlns:usr="http://www.alfresco.org/model/user/1.0">
          <usr:user view:childName="usr:user">
                        <usr:username>Carol</usr:username>
                        <usr:password>Carol</usr:password>  
                        <usr:enabled>true</usr:enabled>
                        <usr:accountExpires>false</usr:accountExpires>
                        <usr:credentialsExpire>false</usr:credentialsExpire>
                        <usr:accountLocked>false</usr:accountLocked>
                    </usr:user>
</view:view>


This commands are used to import users

java -classpath classes;lib\alfresco-repository.jar;lib\alfresco-linkvalidation.jar;lib\xercesImpl-2.8.0.jar;lib\alfresco-remote-api.jar;lib\alfresco-vti.jar;lib\alfresco-web-client.jar;lib\myfaces-api-1.1.5.jar;lib\alfresco-rm.jar;lib\xmlrpc.jar;lib\jcr-1.0.jar;lib\rhino-js-1.6R7.jar;lib\spring-ws-1.5.0.jar;lib\subetha-smtp.jar;lib\alfresco-jlan-embed.jar;lib\JMagick.jar;lib\alfresco-mbeans.jar;lib\hibernate-3.2.1-patched.jar;lib\jbpm-jpdl-3.2.2.jar;lib\jbpm-identity-3.2.2.jar;lib\springmodules-jbpm31.jar;lib\spring-2.0.6.jar;lib\alfresco-core.jar;lib\lucene-analyzers-2.1.0.jar;liblucene-snowball-2.1.0.jar;lib\alfresco-core.jar;lib\spring-2.0.2.jar;lib\jibx-run.jar;lib\xpp3-1.1.3_8.jar;lib\commons-logging-1.1.jar;lib\ehcache-1.4.1-patched.jar;lib\dom4j-1.6.1.jar;lib\acegi-security-0.8.2_patched.jar;lib\hibernate-3.2.1-patched.jar;lib\quartz-1.6.0.jar;lib\pdfbox-0.7.3.jar;lib\poi-3.0.2.jar;lib\jooconverter-2.1.0.jar;lib\jid3lib-0.5.jar;lib\freemarker-2.3.13.jar;lib\log4j-1.2.15.jar;lib\cryptix-jce-provider.jar;lib\commons-codec-1.3.jar;lib\commons-dbcp-1.2.1.jar;lib\commons-pool-1.4.jar;lib\jta.jar;lib\mail.jar;lib\activation.jar;lib\jug-lgpl-2.0.0.jar;lib\alfresco-deployment.jar;lib\commons-collections-3.1.jar;lib\cglib-nodep-2.2_beta1.jar;lib\antlr-2.7.5H3.jar;lib\tm-extractors-0.4_patched.jar;lib\commons-io-1.1.jar;lib\ridl.jar;lib\juh.jar;lib\commons-beanutils-1.7.0.jar;lib\jut.jar;lib\sandbox.jar;lib\jut.jar;lib\lucene-core-2.1.0.jar;..\..\..\common\lib\mysql-connector-java-5.1.6-bin.jar;..\..\..\common\lib\servlet-api.jar;lib\bsh-1.3.0.jar;lib\saxpath.jar;lib\jaxen-1.1-beta-8.jar;lib\json.jar;lib\bcprov-jdk15-137.jar;lib\derby.jar;lib\ibatis-2.3.0.677.jar;lib\truezip.jar;lib\ant.jar  org.alfresco.tools.Import -user admin -pwd admin -store workspace://SpacesStore  -path  sys:system/sys:people -verbose system.xml


java -classpath classes;lib\alfresco-repository.jar;lib\alfresco-linkvalidation.jar;lib\xercesImpl-2.8.0.jar;lib\alfresco-remote-api.jar;lib\alfresco-vti.jar;lib\alfresco-web-client.jar;lib\myfaces-api-1.1.5.jar;lib\alfresco-rm.jar;lib\xmlrpc.jar;lib\jcr-1.0.jar;lib\rhino-js-1.6R7.jar;lib\spring-ws-1.5.0.jar;lib\subetha-smtp.jar;lib\alfresco-jlan-embed.jar;lib\JMagick.jar;lib\alfresco-mbeans.jar;lib\hibernate-3.2.1-patched.jar;lib\jbpm-jpdl-3.2.2.jar;lib\jbpm-identity-3.2.2.jar;lib\springmodules-jbpm31.jar;lib\spring-2.0.6.jar;lib\alfresco-core.jar;lib\lucene-analyzers-2.1.0.jar;liblucene-snowball-2.1.0.jar;lib\alfresco-core.jar;lib\spring-2.0.2.jar;lib\jibx-run.jar;lib\xpp3-1.1.3_8.jar;lib\commons-logging-1.1.jar;lib\ehcache-1.4.1-patched.jar;lib\dom4j-1.6.1.jar;lib\acegi-security-0.8.2_patched.jar;lib\hibernate-3.2.1-patched.jar;lib\quartz-1.6.0.jar;lib\pdfbox-0.7.3.jar;lib\poi-3.0.2.jar;lib\jooconverter-2.1.0.jar;lib\jid3lib-0.5.jar;lib\freemarker-2.3.13.jar;lib\log4j-1.2.15.jar;lib\cryptix-jce-provider.jar;lib\commons-codec-1.3.jar;lib\commons-dbcp-1.2.1.jar;lib\commons-pool-1.4.jar;lib\jta.jar;lib\mail.jar;lib\activation.jar;lib\jug-lgpl-2.0.0.jar;lib\alfresco-deployment.jar;lib\commons-collections-3.1.jar;lib\cglib-nodep-2.2_beta1.jar;lib\antlr-2.7.5H3.jar;lib\tm-extractors-0.4_patched.jar;lib\commons-io-1.1.jar;lib\ridl.jar;lib\juh.jar;lib\commons-beanutils-1.7.0.jar;lib\jut.jar;lib\sandbox.jar;lib\jut.jar;lib\lucene-core-2.1.0.jar;..\..\..\common\lib\mysql-connector-java-5.1.6-bin.jar;..\..\..\common\lib\servlet-api.jar;lib\bsh-1.3.0.jar;lib\saxpath.jar;lib\jaxen-1.1-beta-8.jar;lib\json.jar;lib\bcprov-jdk15-137.jar;lib\derby.jar;lib\ibatis-2.3.0.677.jar;lib\truezip.jar;lib\ant.jar  org.alfresco.tools.Import -user admin -pwd admin -store user://alfrescoUserStore -path  sys:system/sys:people -verbose alfrescoUserStore3.xml


users gets created but two users created with the same userid  as well both have the problem in synch.

Kindly suggest something if i am missing.

Amita Bhandari

Outcomes