cancel
Showing results for 
Search instead for 
Did you mean: 

how to succesfully export using export command line tools

aramu
Champ in-the-making
Champ in-the-making
hello can any body help with export tool.
.
i have created a Export.sh file in web-inf directory

which is as follows.
export path=/opt/jdk1.6.0_03/bin

java -classpath classes/alfresco/module:../../../shared/classes:classes:lib/cglib-full-2.0.1:lib/cglib-nodep-2.1_3.jar:lib/spring.jar:lib/backport-util-concurrent-2.2.jar:lib/acegi-security-0.8.2_patched:lib/activation.jar:lib/addressing-1.0.jar:lib/core.jar:lib/alfresco-mbeans.jar:lib/remote-api.jar:lib/repository.jar:lib/web-client.jar:lib/ant.jar:lib/antlr-2.7.5H3.jar:lib/aopalliance.jar:lib/avalon-framework-4.2.0.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.6.1.jar:lib/commons-codec-1.3.jar:lib/commons-collections-3.0.jar:lib/commons-dbcp-1.2.1.jar:lib/commons-digester-1.5.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-logging.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.2.2.jar:lib/fontbox-0.1.0.jar:lib/fop-0.92beta.jar:lib/freemarker.jar:lib/hibernate-3.2.1.jar:lib/hrtlib.jar:lib/hsqldb.jar:lib/htmlparser-1.6.jar:lib/jakarta-oro-2.0.8.jar:lib/jaxen-1.1-beta-8.jar:lib/jaxrpc.jar:lib/jbpm-3.1.2.jar:jbpm-identity-3.1.2.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/jstl.jar:lib/jta.jar:lib/jug.jar:lib/jut.jar:lib/log4j-1.2.8.jar:lib/lucene-analyzers-2.0.0.jar:lib/lucene-core-2.0.0.jar:lib/lucene-snowball-2.0.0.jar:lib/mail.jar:lib/myfaces-api.jar:lib/myfaces-impl.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.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:../../../common/lib/mysql-connector-java-5.0.3-bin.jar:../../../common/endorsed/serializer.jar:../../../common/endorsed/xalan.jar:lib/axis.jar org.alfresco.tools.Export -user admin -pwd admin -store user://alfrescoUserStore -verbose users.acp


The above is giving class not found exception for net.ssf.. which i have included in the classpath(see above)

My question is

1. Is existence of a current database mandatory for export command line tools.
2. i have added as much jar files on seeing the errors. is there any list of jar files required for running this tool.
3. is there any other simple go.
4 . what is wrong with above .sh file.
5. if i compile the repository-api using alfresco sdk will this solve the problem.(ie making the jar and replacing the repository-api)

machine is running on fedora core 4

error is given below

22:30:27,365 ERROR [org.hibernate.proxy.BasicLazyInitializer] CGLIB Enhancement failed: org.alfresco.repo.domain.hibernate.TransactionImpl
java.lang.NoClassDefFoundError: net.sf.cglib.core.DebuggingClassWriter$1
   at java.lang.Class.initializeClass(libgcj.so.8rh)
   at net.sf.cglib.core.DebuggingClassWriter.toByteArray(DebuggingClassWriter.java:104)
   at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:64)
   at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:192)
   at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:177)
   at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:149)
   at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:102)
   at java.lang.Class.initializeClass(libgcj.so.8rh)
   at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:116)
   at org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:41)
   at org.hibernate.tuple.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:161)
   at org.hibernate.tuple.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:131)
   at org.hibernate.tuple.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
   at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:64)
   at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:257)
   at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:412)
   at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108)
   at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:216)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
   at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814)
   at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732)
   at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1367)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1333)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
   at java.security.AccessController.doPrivileged(libgcj.so.8rh)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1244)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
   at java.security.AccessController.doPrivileged(libgcj.so.8rh)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308)
   at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:948)
   at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:702)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:378)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
   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.Export.main(Export.java:65)

22:30:27,456 ERROR [org.hibernate.proxy.BasicLazyInitializer] CGLIB Enhancement failed: org.alfresco.repo.domain.hibernate.DbAccessControlEntryImpl
java.lang.NoClassDefFoundError: net.sf.cglib.proxy.Enhancer
   at java.lang.Class.initializeClass(libgcj.so.8rh)
   at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:116)
   at org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:41)
   at org.hibernate.tuple.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:161)
   at org.hibernate.tuple.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:131)
   at org.hibernate.tuple.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
   at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:64)
   at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:257)
   at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:412)
   at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108)
   at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:216)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
   at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814)
   at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732)
   at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1367)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1333)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
   at java.security.AccessController.doPrivileged(libgcj.so.8rh)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1244)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
   at java.security.AccessController.doPrivileged(libgcj.so.8rh)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308)
   at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:948)
   at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:702)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:378)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
   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.Export.main(Export.java:65)

22:30:27,595 ERROR [org.hibernate.proxy.BasicLazyInitializer] CGLIB Enhancement failed: org.jbpm.scheduler.def.CreateTimerAction
java.lang.NoClassDefFoundError: net.sf.cglib.proxy.Enhancer
   at java.lang.Class.initializeClass(libgcj.so.8rh)
   at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:116)
   at org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:41)
   at org.hibernate.tuple.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:161)
   at org.hibernate.tuple.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:131)
   at org.hibernate.tuple.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
   at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:64)
   at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:257)
   at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:412)
   at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108)
   at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:216)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
   at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814)
   at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732)
   at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1367)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1333)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
   at java.security.AccessController.doPrivileged(libgcj.so.8rh)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1244)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
   at java.security.AccessController.doPrivileged(libgcj.so.8rh)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308)
   at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:948)
   at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:702)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:378)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
   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.Export.main(Export.java:65)
1 REPLY 1

boucher64
Champ in-the-making
Champ in-the-making
Just went to the whole process and I want to share some of my findings, hope that helps
-1-
Users and groups: export/import
I'ved used the shell script from http://tgoirand.wordpress.com/2010/09/10/alfresco-export-import-users-and-groups-script-shell/
With few changes, did the work for me.

-1-
Sub section of Company home

In http://wiki.alfresco.com/wiki/Export_and_Import#Export_.26_Import_Command_Line_Tools
The wiki suggest you to define a classpath with  a list of all the jar you need. That is very painfull, especially if you switch to another version (and for 32r2 their suggested list does not work…).
like this….
java.exe -classpath classes\alfresco\module;..\..\..\shared\classes;classes;lib\abdera-core-0.4.0-incubating.jar;lib\abdera-extensions-json-0.4.0-incubating.jar;lib\abdera-i18n-0.4.0-incubating.jar;lib\abdera-parser-0.4.0-incubating.jar;lib\acegi-security-0.8.2_patched.jar;lib\activation.jar;lib\addressing-1.0.jar;lib\alfresco…. (and the list goes on an on)

I've used a section of code developped by 2009 Thomas Goiran (http://tgoirand.wordpress.com/2010/09/10/alfresco-export-import-users-and-groups-script-shell/) to work around this (see –1). Thomas code is simply autoloading all the .jar files; clever.
ALFRESCO_WEBAPP=tomcat/webapps/alfresco
WEBINFLIB=${ALFRESCO_WEBAPP}/WEB-INF/lib
EXTENSION_PATH=tomcat/shared/classes
EXTRA_LIB=tomcat/lib

if [ ! -d $ALFRESCO_WEBAPP ] ; then
        echo "Webapp: ${ALFRESCO_WEBAPP} not found. Exit."
        exit
fi

if [ ! -d $EXTRA_LIB ] ; then
        echo "$EXTRA_LIB not found…"
        EXTRA_LIB=tomcat/shared/lib
        echo "…trying $EXTRA_LIB"
fi

MODULEPATH=${ALFRESCO_WEBAPP}/WEB-INF/classes/alfresco/module
CLASSESDIRPATH=${ALFRESCO_WEBAPP}/WEB-INF/classes
#gpb added
INSTALLDIR=/opt/Alfresco/Alfresco

if [ -r "$INSTALLDIR/scripts/setenv.sh" ]; then
. "$INSTALLDIR/scripts/setenv.sh"
fi
#gpb end
export JAVA_HOME="/opt/SDK/jdk"
CLASSPATH=${WEBINFLIB}:${MODULEPATH}:${CLASSESDIRPATH}:${EXTENSION_PATH}:${JAVA_HOME}

if [ -d $EXTRA_LIB ] ; then
    for EXTRA_JARNAME in $( ls ${EXTRA_LIB} )
        do
           CLASSPATH=${CLASSPATH}:${EXTRA_LIB}/${EXTRA_JARNAME}
        done
else
        echo "$EXTRA_LIB not found."
fi

for JARNAME in $( ls ${WEBINFLIB} )
do
    CLASSPATH=${CLASSPATH}:${WEBINFLIB}/${JARNAME}
done
# if you export from a version that does not have a setenv.sh set the java_home yourself
export JAVA_HOME="/opt/SDK/jdk"
java -classpath ${CLASSPATH} org.alfresco.tools.Export -user admin -pwd mypassw -store workspace://SpacesStore -path /app:company_home/cm:intraPoly/ -dir /data/alf_migrate -overwrite
  -verbose  alfrescoSpaceStore-contentDEF


-2-
I've had quite a lot of troubles do perform an export from 32r2; the -path option is not very well documented
What worked for me.
/app:company_home …. (nothing else worked
and then the space meed to ne defined with prefix cm:myfolder
so /app:company_home/cm:intraPoly/cmSmiley Very HappyEF  did work.

-3- Import
Using the autoloader (see 2) helped a lot since I did not have to figure out the new names of the .jar when loading into a newer version of Alfresco (3.4.d) for the import as well.

However I've ended up busting the jvm on max memory (out of memory) Since there nothing that will be written in the database if you do not complete the process, I've ended up with an full alf_data and nothing in the DB…

To fix it, i've used :
java  -Xms254m -Xmx254m -XX:MaxPermSize=2048m  -classpath ${CLASSPATH} org.alfresco.tools.Import -user admin -pwd mynewpass -store workspace://SpacesStore -path /app:company_home/cm:intraPoly  -dir /data/alf_migrate   -verbose -encoding UTF-8  alfrescoSpaceStore-content

-3-
Then i've manually imported my additions to the datadict (my scripts and email templates)

-4-
That worked well for us and had been a good work around. Trying to autoconvert the DB  through a schem update ( first start of a new version pointing to old alf_data and DB. completed with patch errors form 32r2 to 3.4.d (wcm patch updater failed)
Note: we have followed the iso to UTF-8 upgrate path without success, so after a couple of days trying, I' ve decided for a export and import.