cancel
Showing results for 
Search instead for 
Did you mean: 

Export func - Error creating 'dictionaryRepositoryBootstrap'

unknown-user
Champ on-the-rise
Champ on-the-rise
Hello everybody,

again I need some help with my Alfresco Installation. Actually I'm working on a backup script, which should at the end perform a server and database stop, make a backup of both and then restart server and db.

Everything, but the Alfresco full repository export works fine. When I start my export script, I get the following error.


Alfresco Repository Exporter
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
org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
org.hibernate.exception.GenericJDBCException: Cannot open connection
        at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
        at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420)
        at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
        at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:129)
        at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
        at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1290)
        at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:520)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:282)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:225)
        at org.alfresco.util.transaction.SpringAwareUserTransaction.begin(SpringAwareUserTransaction.java:356)
        at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:175)
        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(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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.Export.main(Export.java:65)
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'
        at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:766)
        at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
        at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:80)
        at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)
        … 28 more
Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:760)
        … 31 more

Right now I'm testing my script in a virtual machine running an Ubuntu OS with Alfresco 2.0 Community Ed. (Tomcat) and Oracle XE database. This is my script:

#!/bin/sh
export TOMCAT_HOME=/opt/alfresco/tomcat

cd $TOMCAT_HOME

export PATH=${PATH}:${TOMCAT_HOME}
export IMPORT_LIB=/webapps/alfresco/WEB-INF/lib
export IMPORT_COMMON=/common/lib
export JAVA_CLASSPATH=/webapps/alfresco/WEB-INF/lib
export IMPORT_CLASSES=/shared/classes:./webapps/alfresco/WEB-INF/classes
echo $IMPORT_CLASSES

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

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

export JAVA_CLASSPATH=${JAVA_CLASSPATH}:${IMPORT_CLASSES}
echo $JAVA_CLASSPATH

/../../jdk1.6.0_01/bin/java -cp $JAVA_CLASSPATH org.alfresco.tools.Export -user admin -store workspace://SpacesStore -pwd 12345 -verbose TestExport.acp  "$@"

May somebody help me with fixing the script to make it work properly?

A second question would be: Does this store parameter (workspace://SpacesStore) cover the complete repository with user settings etc., or which one do I need to export instead of it?

I'm grateful for every hint.

Kind regards,
Chris.
11 REPLIES 11

cleseach
Star Contributor
Star Contributor
If you export every store, you will get all categories, all document properties, all versions and so on. Keep in mind that documents are stored in the file system.

To make a full back-up you can also try saving alf_data folder and dumping your database.

unknown-user
Champ on-the-rise
Champ on-the-rise
Hm, now I'm confused. x_X

My plan was to write a script which:

  • stops db and alf_server
  • exports all stores mentioned in the node browser
  • creates a database backup
  • restarts both services
Don't I have a full backup then? Although this may sound stupid, but please correct me, if I'm wrong.

Chris
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.