cancel
Showing results for 
Search instead for 
Did you mean: 

Command line org.alfresco.tools.Import failed to work

panco
Champ in-the-making
Champ in-the-making
I installed the Alfresco 2.1 into a Tomcat 5.5 + Mysql 5.0 server, I tried to import the user data from a xml file (as shown below). I write a batch and put it together with the xml in the C:\xampp\tomcat\webapps\alfresco\WEB-INF directory. I change directory to C:\xampp\tomcat\webapps\alfresco\WEB-INF and run the batch file, it throws out the java.io.IOException: Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi].

Does anyone know how to fix this issue? please help!

Alfresco Repository Importer
The following error has occurred:
Error creating bean with name 'serverConnector' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is java.io.IOException: Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi]


The classpath includes:
  1. all the jar files in the lib directory
  2. tomcat\common\lib\mysql-connector-java-5.0.7-bin.jar;
  3. tomcat\common\endorsed\serializer.jar;
      tomcat\common\endorsed\xalan.jar;
  4. current directory

import.bat
java -classpath classes;lib\acegi-security-0.8.2_patched.jar;lib\activation.jar;lib\addressing-1.0.jar;lib\alfresco-core.jar;lib\alfresco-deployment.jar;lib\alfresco-linkvalidation.jar;lib\alfresco-mbeans.jar;lib\alfresco-remote-api.jar;lib\alfresco-repository.jar;lib\alfresco-web-client.jar;lib\ant.jar;lib\antlr-2.7.5H3.jar;lib\aopalliance.jar;lib\avalon-framework-4.2.0.jar;lib\axis.jar;lib\bcel.jar;lib\bcprov-jdk15-129.jar;lib\bsf-2.4.0.jar;lib\bsh-1.3.0.jar;lib\catalina.jar;lib\cglib-nodep-2.2_beta1.jar;lib\chiba-1.3.0.jar;lib\commons-beanutils-1.7.0.jar;lib\commons-codec-1.3.jar;lib\commons-collections-3.1.jar;lib\commons-dbcp-1.2.1.jar;lib\commons-digester-1.6.jar;lib\commons-discovery-0.2.jar;lib\commons-el.jar;lib\commons-fileupload-1.1.1.jar;lib\commons-httpclient-3.0.jar;lib\commons-io-1.1.jar;lib\commons-jxpath-1.2.jar;lib\commons-lang-2.1.jar;lib\commons-logging-1.0.4.jar;lib\commons-modeler.jar;lib\commons-pool-1.3.jar;lib\commons-validator.jar;lib\cpool.jar;lib\cryptix-jce-provider.jar;lib\dom4j-1.6.1.jar;lib\ehcache-1.3.0.jar;lib\fontbox-0.1.0.jar;lib\fop-0.92beta.jar;lib\freemarker.jar;lib\guessencoding-1.0.jar;lib\hibernate-3.2.1.jar;lib\hrtlib.jar;lib\hsqldb.jar;lib\htmlparser-1.6.jar;lib\icu4j_3_6_1.jar;lib\jakarta-oro-2.0.8.jar;lib\jaxen-1.1-beta-8.jar;lib\jaxrpc.jar;lib\jbpm-identity-3.2.jar;lib\jbpm-jpdl-3.2-patched.jar;lib\jcr-1.0.jar;lib\jgroups-2.2.8.jar;lib\jibx-bind.jar;lib\jibx-run.jar;lib\jid3lib-0.5.jar;lib\JMagick.jar;lib\joda-time-1.2.1.jar;lib\jooconverter-2.1.0.jar;lib\json.jar;lib\jstl-1.1.0.jar;lib\jta.jar;lib\jug.jar;lib\jut.jar;lib\list.txt;lib\log4j-1.2.8.jar;lib\lucene-analyzers-2.1.0.jar;lib\lucene-core-2.1.0.jar;lib\lucene-snowball-2.1.0.jar;lib\mail.jar;lib\myfaces-api-1.1.5.jar;lib\myfaces-impl-1.1.5.jar;lib\naming-factory.jar;lib\naming-resources.jar;lib\odf_utils.jar;lib\odmg-3.0.jar;lib\openoffice-juh-2.0.3.jar;lib\openoffice-jurt-2.0.3.jar;lib\openoffice-ridl-2.0.3.jar;lib\openoffice-sandbox-2.0.3.jar;lib\openoffice-unoil-2.0.3.jar;lib\opensaml-1.0.1.jar;lib\pdfbox-0.7.3.jar;lib\poi-2.5.1_patched.jar;lib\portlet-api-lib.jar;lib\quartz-1.6.0.jar;lib\resolver.jar;lib\rhino-js-1.6R4.jar;lib\saaj.jar;lib\saxpath.jar;lib\spring-2.0.2.jar;lib\springmodules-jbpm31.jar;lib\standard.jar;lib\tlc124.jar;lib\tm-extractors-0.4_patched.jar;lib\tomcat-coyote.jar;lib\tomcat-util.jar;lib\truezip.jar;lib\wsdl4j-1.5.1.jar;lib\wss4j.jar;lib\xercesImpl-2.8.0.jar;lib\xml-apis.jar;lib\xmlgraphics-commons-1.0.jar;lib\xmlsec-1.4.0.jar;lib\xpp3-1.1.3_8.jar;lib\xstream-1.1.3.jar;C:\xampp\tomcat\common\lib\mysql-connector-java-5.0.7-bin.jar;C:\xampp\tomcat\common\endorsed\serializer.jar;C:\xampp\tomcat\common\endorsed\xalan.jar;. org.alfresco.tools.Import -user admin -pwd admin -store workspace://SpacesStore -path \sys:system\sys:people person.xml 

person.xml
<?xml version="1.0" encoding="UTF-8"?>
<view:view xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0">
<cm:person view:childName="cm:person">
    <cm:userName>fredb</cm:userName>
    <cm:firstName>Fred</cm:firstName>
    <cm:lastName>Bloggs</cm:lastName>
    <cm:middleName></cm:middleName>
    <cm:email>fredb@alfresco.org</cm:email>
</cm:person>
<cm:person view:childName="cm:person">
    <cm:userName>sues</cm:userName>
    <cm:firstName>Sue</cm:firstName>
    <cm:lastName>Sanderson</cm:lastName>
    <cm:middleName></cm:middleName>
    <cm:email>sues@alfresco.org</cm:email>
</cm:person>
</view:view>
23 REPLIES 23

rrb
Champ in-the-making
Champ in-the-making
This is probably a dumb question, but i've been scratching my head over this for way too many hours now.

I've seen at least three different java -classpath lines across the wiki  and the "Shariff book" for Import as a commandline.
I've tried them all and with every one I've ended up with

java.lang.NoClassDefFoundError: org/alfresco/tools/Import
Exception in thread "main"
I suppose my general question is "assuming a *nix ( or cygwin) environment what basic configuration is needed to execute Import from a command line?"

FWIW  i've pasted my latest script for this below ( making this wiki/forum whatever now have 4 incorrect classpaths for Import)



#!/usr/bin/sh
ROOT_DIR="/cygdrive/e";
LIB_DIR="$ROOT_DIR/alfresco/tomcat/webapps/alfresco/WEB-INF/lib";
TOMCAT_DIR="$ROOT_DIR/alfresco/tomcat/common";
TEMP_CLASS_PATH="./classes;"
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/JMagick.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/acegi-security-0.8.2_patched.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/activation.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/addressing-1.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/alfresco-core.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/alfresco-deployment.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/alfresco-linkvalidation.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/alfresco-mbeans.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/alfresco-remote-api.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/alfresco-repository.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/alfresco-web-client.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/ant.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/antlr-2.7.5H3.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/aopalliance.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/avalon-framework-4.2.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/axis.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/bcel.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/bcprov-jdk15-129.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/bsf-2.4.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/bsh-1.3.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/catalina.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/cglib-nodep-2.2_beta1.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/chiba-1.3.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/commons-beanutils-1.7.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/commons-codec-1.3.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/commons-collections-3.1.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/commons-dbcp-1.2.1.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/commons-digester-1.6.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/commons-discovery-0.2.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/commons-el.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/commons-fileupload-1.1.1.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/commons-httpclient-3.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/commons-io-1.1.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/commons-jxpath-1.2.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/commons-lang-2.1.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/commons-logging-1.0.4.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/commons-modeler.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/commons-pool-1.3.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/commons-validator.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/cpool.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/cryptix-jce-provider.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/dom4j-1.6.1.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/ehcache-1.3.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/fontbox-0.1.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/fop-0.92beta.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/freemarker.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/guessencoding-1.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/hibernate-3.2.1.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/hrtlib.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/hsqldb.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/htmlparser-1.6.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/icu4j_3_6_1.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/jakarta-oro-2.0.8.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/jaxen-1.1-beta-8.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/jaxrpc.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/jbpm-identity-3.2.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/jbpm-jpdl-3.2-patched.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/jcr-1.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/jgroups-2.2.8.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/jibx-bind.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/jibx-run.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/jid3lib-0.5.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/joda-time-1.2.1.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/jooconverter-2.1.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/json.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/jstl-1.1.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/jta.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/jug.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/jut.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/log4j-1.2.8.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/lucene-analyzers-2.1.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/lucene-core-2.1.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/lucene-snowball-2.1.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/mail.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/myfaces-api-1.1.5.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/myfaces-impl-1.1.5.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/naming-factory.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/naming-resources.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/odf_utils.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/odmg-3.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/openoffice-juh-2.0.3.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/openoffice-jurt-2.0.3.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/openoffice-ridl-2.0.3.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/openoffice-sandbox-2.0.3.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/openoffice-unoil-2.0.3.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/opensaml-1.0.1.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/pdfbox-0.7.3.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/poi-2.5.1_patched.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/portlet-api-lib.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/quartz-1.6.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/resolver.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/rhino-js-1.6R4.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/saaj.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/saxpath.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/spring-2.0.2.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/springmodules-jbpm31.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/standard.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/tlc124.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/tm-extractors-0.4_patched.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/tomcat-coyote.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/tomcat-util.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/truezip.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/wsdl4j-1.5.1.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/wss4j.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/xercesImpl-2.8.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/xml-apis.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/xmlgraphics-commons-1.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/xmlsec-1.4.0.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/xpp3-1.1.3_8.jar;"
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$LIB_DIR/xstream-1.1.3.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$TOMCAT_DIR/lib/mysql-connector-java-5.0.7-bin.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$TOMCAT_DIR/endorsed/serializer.jar;";
TEMP_CLASS_PATH="$TEMP_CLASS_PATH$TOMCAT_DIR/endorsed/xalan.jar;.";
export TEMP_CLASS_PATH;
#echo $TEMP_CLASS_PATH;
java -classpath $TEMP_CLASS_PATH org.alfresco.tools.Import -user admin -pwd admin -store workspace://SpacesStore -path /sys:system/sys:people person.xml

That didn't render too well, the last line is all one line beginning "java -classpath…"

You'll see that it essentially follows the structure of other posters:
  - all the jar files in  "alfresco/tomcat/webapps/alfresco/WEB-INF/lib/";
  - the mysql connector jar
  - xalan jar
  - serializer.jar

but it just doesn't find the class "Import" ( or "import" - tried that one too)

I'm running it from the working path:
/cygdrive/e/alfresco/tomcat/webapps/alfresco/WEB-INF
so ./classes is there…

vesion info:
apache-tomcat-5.5.16
ALF Version: Community Network - v2.1.0 (482)

can anyone shed light for me here?

… baffled and tired…
rrb

rrb
Champ in-the-making
Champ in-the-making
Found it:

alfresco-repository.jar\org/alfresco/tools/Import.class

which is missing from the .sh file above

FWIW: here is the listing of alfresco-repository.jar
$ cat lslr | grep org/alfresco/tool
alfresco-repository.jar\org/alfresco/tools/
alfresco-repository.jar\org/alfresco/tools/Export$1.class
alfresco-repository.jar\org/alfresco/tools/Export$ExportContext.class
alfresco-repository.jar\org/alfresco/tools/Export$ExportProgress.class
alfresco-repository.jar\org/alfresco/tools/Export$FileHandler.class
alfresco-repository.jar\org/alfresco/tools/Export$ZipHandler.class
alfresco-repository.jar\org/alfresco/tools/Export.class
alfresco-repository.jar\org/alfresco/tools/Import$1.class
alfresco-repository.jar\org/alfresco/tools/Import$FileHandler.class
alfresco-repository.jar\org/alfresco/tools/Import$ImportBinding.class
alfresco-repository.jar\org/alfresco/tools/Import$ImportContext.class
alfresco-repository.jar\org/alfresco/tools/Import$ImportProgress.class
alfresco-repository.jar\org/alfresco/tools/Import$ZipHandler.class
alfresco-repository.jar\org/alfresco/tools/Import.class
alfresco-repository.jar\org/alfresco/tools/Repository$1.class
alfresco-repository.jar\org/alfresco/tools/Repository$ShutdownNotifierThread.class
alfresco-repository.jar\org/alfresco/tools/Repository.class
alfresco-repository.jar\org/alfresco/tools/Tool.class
alfresco-repository.jar\org/alfresco/tools/ToolArgumentException.class
alfresco-repository.jar\org/alfresco/tools/ToolContext.class
alfresco-repository.jar\org/alfresco/tools/ToolException.class

..rrb

rrb
Champ in-the-making
Champ in-the-making
duhh…

I was getting messed up between java ( for windows) and cygwin drive and path mappings…

A working version of that script above is:

#!/usr/bin/sh
ROOT_DIR=/cygdrive/e;
LIB_DIR=$ROOT_DIR/alfresco/tomcat/webapps/alfresco/WEB-INF/lib
#LIB_DIR=./lib
TOMCAT_DIR=$ROOT_DIR/alfresco/tomcat/common
TEMP_CLASS_PATH=./classes:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/JMagick.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/acegi-security-0.8.2_patched.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/activation.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/addressing-1.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/alfresco-core.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/alfresco-deployment.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/alfresco-linkvalidation.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/alfresco-mbeans.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/alfresco-remote-api.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/alfresco-repository.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/alfresco-web-client.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/ant.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/antlr-2.7.5H3.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/aopalliance.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/avalon-framework-4.2.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/axis.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/bcel.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/bcprov-jdk15-129.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/bsf-2.4.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/bsh-1.3.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/catalina.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/cglib-nodep-2.2_beta1.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/chiba-1.3.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/commons-beanutils-1.7.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/commons-codec-1.3.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/commons-collections-3.1.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/commons-dbcp-1.2.1.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/commons-digester-1.6.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/commons-discovery-0.2.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/commons-el.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/commons-fileupload-1.1.1.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/commons-httpclient-3.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/commons-io-1.1.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/commons-jxpath-1.2.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/commons-lang-2.1.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/commons-logging-1.0.4.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/commons-modeler.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/commons-pool-1.3.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/commons-validator.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/cpool.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/cryptix-jce-provider.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/dom4j-1.6.1.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/ehcache-1.3.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/fontbox-0.1.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/fop-0.92beta.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/freemarker.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/guessencoding-1.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/hibernate-3.2.1.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/hrtlib.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/hsqldb.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/htmlparser-1.6.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/icu4j_3_6_1.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/jakarta-oro-2.0.8.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/jaxen-1.1-beta-8.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/jaxrpc.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/jbpm-identity-3.2.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/jbpm-jpdl-3.2-patched.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/jcr-1.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/jgroups-2.2.8.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/jibx-bind.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/jibx-run.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/jid3lib-0.5.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/joda-time-1.2.1.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/jooconverter-2.1.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/json.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/jstl-1.1.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/jta.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/jug.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/jut.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/log4j-1.2.8.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/lucene-analyzers-2.1.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/lucene-core-2.1.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/lucene-snowball-2.1.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/mail.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/myfaces-api-1.1.5.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/myfaces-impl-1.1.5.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/naming-factory.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/naming-resources.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/odf_utils.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/odmg-3.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/openoffice-juh-2.0.3.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/openoffice-jurt-2.0.3.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/openoffice-ridl-2.0.3.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/openoffice-sandbox-2.0.3.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/openoffice-unoil-2.0.3.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/opensaml-1.0.1.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/pdfbox-0.7.3.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/poi-2.5.1_patched.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/portlet-api-lib.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/quartz-1.6.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/resolver.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/rhino-js-1.6R4.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/saaj.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/saxpath.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/spring-2.0.2.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/springmodules-jbpm31.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/standard.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/tlc124.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/tm-extractors-0.4_patched.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/tomcat-coyote.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/tomcat-util.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/truezip.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/wsdl4j-1.5.1.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/wss4j.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/xercesImpl-2.8.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/xml-apis.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/xmlgraphics-commons-1.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/xmlsec-1.4.0.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/xpp3-1.1.3_8.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${LIB_DIR}/xstream-1.1.3.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${TOMCAT_DIR}/lib/mysql-connector-java-5.0.7-bin.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${TOMCAT_DIR}/endorsed/serializer.jar:
TEMP_CLASS_PATH=${TEMP_CLASS_PATH}${TOMCAT_DIR}/endorsed/xalan.jar:.
export TEMP_CLASS_PATH;
echo ${TEMP_CLASS_PATH};
java -classpath  `cygpath -wp ${TEMP_CLASS_PATH}` org.alfresco.tools.Import -user admin -pwd admin -store workspace://SpacesStore -path /sys:system/sys:people persons.xml

note ":" separators, and use of backticked cygpath command to "revert"  the path to something digestible by java on XP

Now it works ( well i'm getting the The Alfresco 'dir.root' property is set to a relative path './alf_data'.  'dir.root' should be overridden to point to a specific folder. problem but that seems manageable… and some sort of imagemagick concern)

This is life with a linux prod server , and xp/cygwin dev/test i guess…

"java the platform independant solution" uh huh.

..rrb

panco
Champ in-the-making
Champ in-the-making
I can't manage to create the user home space when I import the user data. I want to create the home space under the >/Company Home/User Homes/FirstName LastName and the following users data file does not work. The user is import to Alfresco; however, the Home space is empty. When I edit this user account, it prompt error on the screen and I also find error in the log. Could anyone help?

Data File

<?xml version="1.0" encoding="UTF-8"?>
<view:view xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0">
<cm:person view:childName="cm:person">
    <cm:userName>peterpan</cm:userName>
    <cm:firstName>Peter</cm:firstName>
    <cm:lastName>Pan</cm:lastName>
    <cm:middleName></cm:middleName>
    <cm:homeFolder>/Company Home/User Homes/Peter Pan/</cm:homeFolder>
    <cm:defaultHomeFolderPath>/Company Home/User Homes/</cm:defaultHomeFolderPath>
    <cm:homeFolderProvider>personalHomeFolderProvider</cm:homeFolderProvider>
    <cm:email>peter.pan@pcmacao.com</cm:email>
</cm:person>
</view:view>

Message display during the import
Alfresco Repository Importer
10:14:30,555 WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
10:14:32,758 WARN  [alfresco.util.OpenOfficeConnectionTester] A connection to OpenOffice could not be established.
10:14:36,055 INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
10:14:37,430 INFO  [domain.schema.SchemaBootstrap] No changes were made to the schema.
10:14:39,180 INFO  [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: C:\xampp\alfresco\alf_data
10:14:39,305 INFO  [admin.patch.PatchExecuter] Checking for patches to apply …
10:14:39,774 INFO  [repo.module.ModuleServiceImpl] Found 0 module(s).
10:14:39,946 INFO  [service.descriptor.DescriptorService] Alfresco JVM - v1.5.0_12-b04; maximum heap size 63.563MB
10:14:39,946 WARN  [service.descriptor.DescriptorService] Alfresco JVM - WARNING - maximum heap size 63.563MB is less than recommended 512MB
10:14:39,946 INFO  [service.descriptor.DescriptorService] Alfresco started (Community Network): Current version 2.1.0 (482) schema 64 - Installed version 2.1.0 (482) schema 64
Connected as admin
Time to login 23.777796 seconds
Importing from package C:\xampp\tomcat\webapps\alfresco\WEB-INF\users.xml
Time to execute 0.2451607 seconds
Alfresco Repository Importer successfully completed.

Error on the screen
javax.faces.el.EvaluationException: Exception while invoking expression #{NewUserWizard.startWizardForEdit}
caused by:
java.lang.IllegalArgumentException: nodeRef is a mandatory parameter

Error in the log file
10:18:11,546 ERROR [[localhost].[/alfresco].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
javax.faces.el.EvaluationException: Exception while invoking expression #{NewUserWizard.startWizardForEdit}
   at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
   at javax.faces.component.UICommand.broadcast(UICommand.java:89)
   at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
   at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
   at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
   at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.alfresco.web.app.servlet.AdminAuthenticationFilter.doFilter(AdminAuthenticationFilter.java:80)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.IllegalArgumentException: nodeRef is a mandatory parameter
   at org.alfresco.util.ParameterCheck.mandatory(ParameterCheck.java:48)
   at org.alfresco.repo.node.db.DbNodeServiceImpl.exists(DbNodeServiceImpl.java:164)
   at sun.reflect.GeneratedMethodAccessor198.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
   at org.alfresco.repo.transaction.TransactionResourceInterceptor.invoke(TransactionResourceInterceptor.java:138)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
   at $Proxy2.exists(Unknown Source)
   at sun.reflect.GeneratedMethodAccessor198.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:221)
   at $Proxy3.exists(Unknown Source)
   at sun.reflect.GeneratedMethodAccessor198.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
   at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:211)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
   at $Proxy2.exists(Unknown Source)
   at sun.reflect.GeneratedMethodAccessor198.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
   at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:256)
   at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:191)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
   at $Proxy2.exists(Unknown Source)
   at org.alfresco.web.bean.wizard.NewUserWizard.populate(NewUserWizard.java:197)
   at org.alfresco.web.bean.wizard.NewUserWizard.startWizardForEdit(NewUserWizard.java:595)
   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:585)
   at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
   … 27 more

fidel2003
Champ in-the-making
Champ in-the-making
I had the same problem and i don't know to make.

If I start the command line Import (with all jars) whit Tomcat on I just the next log:
org.alfresco.tools.Import -user admin -pwd admin -store workspace://SpacesStore -verbose elEXPORT.acp 
Alfresco Repository Importer
15:18:42,718 ERROR [transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to execute command: imconvert "C:\DOCUME~1\SEFBG\CONFIG~1\Temp\Alfresco\ImageMagickContentTransformer_init_source_9464.gif"  "C:\DOCUME~1\SEFBG\CONFIG~1\Temp\Alfresco\ImageMagickContentTransformer_init_target_9465.png"
The following error has occurred:
Error creating bean with name 'serverConnector' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is java.io.IOException: Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi]
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverConnector' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is java.io.IOException: Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi]
java.io.IOException: Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi]
   at javax.management.remote.rmi.RMIConnectorServer.newIOException(Unknown Source)
   at javax.management.remote.rmi.RMIConnectorServer.start(Unknown Source)

and If start the Import command line whith Tomcat off I 've got the next message:

 org.alfresco.tools.Import -user admin -pwd admin -store workspace://SpacesStore -verbose elEXPORT.acp 
Alfresco Repository Importer
12:26:13,705 ERROR [transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to execute command: imconvert "C:\DOCUME~1\SEFBG\CONFIG~1\Temp\Alfresco\ImageMagickContentTransformer_init_source_32478.gif"  "C:\DOCUME~1\SEFBG\CONFIG~1\Temp\Alfresco\ImageMagickContentTransformer_init_target_32479.png"
12:26:15,971 WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
12:26:17,393 ERROR [repo.transaction.TransactionUtil] Error rolling back transaction
java.lang.IllegalStateException: No user transaction is active
   at org.alfresco.util.transaction.SpringAwareUserTransaction.rollback(SpringAwareUserTransaction.java:461)
   at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:201)
   at org.alfresco.repo.transaction.TransactionUtil.executeInUserTransaction(TransactionUtil.java:82)
   at org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.bootstrap(DictionaryRepositoryBootstrap.java:134)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1093)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1063)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:87)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:72)
   at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:48)
   at org.alfresco.tools.Tool.initialiseRepository(Tool.java:246)
   at org.alfresco.tools.Tool.start(Tool.java:212)
   at org.alfresco.tools.Import.main(Import.java:66)
The following error has occurred:
Error creating bean with name 'dictionaryRepositoryBootstrap' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryRepositoryBootstrap' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection

Please, the Tomcat must be on or off? And why don't work nothing? I desesperate.
Very thanks for all Smiley Wink

rrb
Champ in-the-making
Champ in-the-making
Are you sure you have the mysql connector jar in your classpath ( for the latter message with tomcat off)?

I think I ran into the message you are seeing when this class was badly referenced.

Frankly, the root problem behind this thread is that the docs over at:
http://wiki.alfresco.com/wiki/Export_and_Import_Tools#Import

are missing vital information on what the classpath should look like.

In particlular the section:

http://wiki.alfresco.com/wiki/Export_and_Import

Note: The classpath for these tools is as follows.[ TODO: speak to Mike for details.

The following worked using AlfrescoCommunity-1.4-Linux-x86-Install:

cd /usr/local/alfresco export LIB_DIR=./tomcat/webapps/alfresco/WEB-INF/lib export CLASSPATH=$CLASSPATH:$LIB_DIR/repository.jar:$LIB_DIR/core.jar:$LIB_DIR/dom4j-1.6.1.jar:$LIB_DIR/xpp3-1.1.3_8.jar:$LIB_DIR/jug.jar


Note: Future versions of the tools will allow direct Export and Import against a remote Repository.

Note: This tool has name collision with unix/linux bash built-in command 'export' . Use proper name for it, like import.sh or other.


needs to be completed and merged.  I'd love to know why there are two different sections ( with and without "_Tools" in the URL).

Perhaps we need a new thread on "useful TEMP_CLASS_PATH assertions for different command line environments? ( Linux/XP cmd/cygwin…)"

Having to resort to a class path statement that is the aggregation of all jars is craziness (as I did), and I think there may be some class name collisions that makes getting  the wrong class first possible.

If you are in a hurry for user bulkload, my experience is that you can do about 50 users in an hour manually if you have a file with first name, lastname, email address (and use the email address as company id, and user home). Cut paste from the file editor into the admin new user screen.

It is very easy to blow hours on trying to get the import command to work   ( don't ask how i know).

..rrb

fidel2003
Champ in-the-making
Champ in-the-making
Yes, I'm sure that mysql driver is ok in the classpath but the script of import fails. My script for lauch import is this:




java -cp classes;C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\acegi-security-0.8.2_patched.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\activation.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\addressing-1.0.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\alfresco-mbeans.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\ant-contrib.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\ant.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\antlr-2.7.5H3.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\aopalliance.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\avalon-framework-4.2.0.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\axis.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\bcel.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\bcprov-jdk15-129.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\bsf-2.4.0.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\bsh-1.3.0.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\catalina.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\cglib-nodep-2.2_beta1.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\chiba-1.3.0.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\comment-stripper.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\commons-beanutils-1.6.1.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\commons-codec-1.3.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\commons-collections-3.0.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\commons-dbcp-1.2.1.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\commons-digester-1.5.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\commons-discovery-0.2.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\commons-el.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\commons-fileupload-1.1.1.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\commons-httpclient-3.0.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\commons-io-1.1.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\commons-jxpath-1.2.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\commons-logging.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\commons-modeler.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\commons-pool-1.3.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\commons-validator.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\core.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\cpool.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\cryptix-jce-provider.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\dom4j-1.6.1.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\ehcache-1.2.2.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\exclude-doclet.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\fontbox-0.1.0.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\fop-0.92beta.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\freemarker.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\hibernate-3.2.1.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\hrtlib.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\hsqldb.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\htmlparser-1.6.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\jakarta-oro-2.0.8.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\jaxen-1.1-beta-8.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\jaxrpc.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\jbpm-3.1.2.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\jbpm-identity-3.1.2.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\jcr-1.0.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\jgroups-2.2.8.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\jibx-bind.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\jibx-run.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\jid3lib-0.5.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\JMagick.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\joda-time-1.2.1.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\jooconverter-2.1.0.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\jstl.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\jta.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\jug.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\jut.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\log4j-1.2.8.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\lucene-analyzers-2.0.0.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\lucene-core-2.0.0.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\lucene-snowball-2.0.0.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\mail.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\myfaces-api.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\myfaces-impl.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\naming-factory.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\naming-resources.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\odf_utils.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\odmg-3.0.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\openoffice-juh-2.0.3.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\openoffice-jurt-2.0.3.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\openoffice-ridl-2.0.3.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\openoffice-sandbox-2.0.3.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\openoffice-unoil-2.0.3.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\opensaml-1.0.1.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\pdfbox-0.7.3.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\poi-2.5.1_patched.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\portlet-api-lib.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\quartz-1.6.0.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\remote-api.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\repository.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\resolver.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\rhino-js-1.6R4.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\saaj.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\saxpath.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\spring.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\springmodules-jbpm31.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\standard.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\tlc124.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\tm-extractors-0.4_patched.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\tomcat-coyote.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\tomcat-util.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\truezip.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\web-client.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\wsdl4j-1.5.1.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\wss4j.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\xercesImpl-2.8.0.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\xml-apis.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\xmlgraphics-commons-1.0.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\xmlsec-1.4.0.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\xpp3-1.1.3_8.jar;.;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\xstream-1.1.3.jar;
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\lib\yguard.jar;
c:\Alfresco\tomcat\common\lib\mysql-connector-java-5.0.3-bin.jar;
c:\Alfresco\tomcat\common\endorsed\serializer.jar;
c:\Alfresco\tomcat\common\endorsed\xalan.jar;.\classes org.alfresco.tools.Import -user admin -pwd admin -store workspace://SpacesStore -verbose elEXPORT.acp

Very thanks for your help me.

panco
Champ in-the-making
Champ in-the-making
Hi rrb,

I was able to import the username, Firstname, Lastname, email; however, I can't create the Home Space. Do you able to create the Home Space when import the users data?

Could you share the XML file format to me?

rrb
Champ in-the-making
Champ in-the-making
Panco:
Sorry, I was not able to create the homespaces via Import.

I abandoned automatic loading when I ran out of time, and then just created a flat file with the input fields I needed ( first name, last name, email, companyId (email again), userhome (email again) password,passwordetc…) then had two windows open one editting the flat file, the other on the "create new user webpage"  and cut and pasted into the webpage  fields. I was able to do about 50 new users in an hour+.

It is stupidly monotonous, but I easily spent a day trying to get past this, and failed. The hour of data entry was easier in the end.

I'm still banging away on the general problem because without a commandline Import/Export working for me I feel very nervous administrating the alf suite. Backup and recovery images are fine and great, but as users get going with rules processing etc I can foresee a bad day when an export/import outside the tool could be needed.

I think this is going to force me to get the sources and look at everything in eclipse ( hoping that there is an Import junit class in there - eclipse should have a robust buildpath/classpath property for the Import junit runtime defined).

I suspect this is the point at which the "supported" alfresco begins to make business sense - just to have a clarifying resource available under a license.

..rrb

panco
Champ in-the-making
Champ in-the-making
rrb,

I agree your finding, I spent a week on trying to make it work; however, no luck… I really hope someone else could able to do it and share the experience to me…. 🙂