AnsweredAssumed Answered

Export command line

Question asked by ea on Dec 5, 2006
Latest reply on Dec 5, 2006 by ea
Hi,
I'm trying to make a full export of alfresco via command line, I've used the shell script provided in post http://forums.alfresco.com/viewtopic.php?t=2425&highlight=export+command+line

I've modified this script to match my alfresco environment

#!/usr/bin/ksh
export TOMCAT_HOME=/product/1.4.0/tomcat;
export PATH=${PATH}:${TOMCAT_HOME};

export IMPORT_LIB=./webapps/PortailCapitalisation/WEB-INF/lib
export IMPORT_COMMON=./common/lib
export JAVA_CLASSPATH=./webapps/PortailCapitalisation/WEB-INF/lib
export IMPORT_CLASSES=./webapps/PortailCapitalisation/WEB-INF/classes
cd $TOMCAT_HOME

for i in $TOMCAT_HOME/$IMPORT_LIB/*.jar ;
do export JAVA_CLASSPATH=${JAVA_CLASSPATH}:$i ;
done

# Class for Oracle
for i in $TOMCAT_HOME/$IMPORT_COMMON/classes12.jar ;
do export JAVA_CLASSPATH=${JAVA_CLASSPATH}:$i ;
done


export JAVA_CLASSPATH=${JAVA_CLASSPATH}:${IMPORT_CLASSES} ;
$JAVA_HOME/bin/java -cp $JAVA_CLASSPATH org.alfresco.tools.Export "$@"


…but it does not work.
It seems that export user 'admin' cannot connect to the Oracle database.

Anyway I've got this error :


./alf_exp.sh -user admin -pwd adminpass -s system://system  system.acp
Alfresco Repository Exporter
17:35:48,643 ERROR [transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to execute command: convert /tmp/Alfresco/ImageMagickContentTransformer_init_source_43370.gif  /tmp/Alfresco/ImageMagickContentTransformer_init_target_43371.png
17:35:49,858 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:450)
        at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:193)
        at org.alfresco.repo.transaction.TransactionUtil.executeInUserTransaction(TransactionUtil.java:74)
        at org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.bootstrap(DictionaryRepositoryBootstrap.java:126)
        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.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:40)
        at org.alfresco.tools.Tool.initialiseRepository(Tool.java:238)
        at org.alfresco.tools.Tool.start(Tool.java:204)
        at org.alfresco.tools.Export.main(Export.java:57)
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

If someone as an idea !
Thanks in advance

.-ea

Outcomes