Export func - Error creating 'dictionaryRepositoryBootstrap'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2007 05:31 AM
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 ExporterThe 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 connectionorg.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 connectionorg.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connectionorg.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 moreCaused 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/shexport TOMCAT_HOME=/opt/alfresco/tomcatcd $TOMCAT_HOMEexport PATH=${PATH}:${TOMCAT_HOME}export IMPORT_LIB=/webapps/alfresco/WEB-INF/libexport IMPORT_COMMON=/common/libexport JAVA_CLASSPATH=/webapps/alfresco/WEB-INF/libexport IMPORT_CLASSES=/shared/classes:./webapps/alfresco/WEB-INF/classesecho $IMPORT_CLASSESfor i in $TOMCAT_HOME$IMPORT_LIB/*.jardoexport JAVA_CLASSPATH=${JAVA_CLASSPATH}:$idonefor i in $TOMCAT_HOME$IMPORT_COMMON/ojdbc*.jardoexport JAVA_CLASSPATH=${JAVA_CLASSPATH}:$idoneexport 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.
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2007 05:58 AM
Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'
Are you sure MySQL JDBC Connector is in the Classpath ?
Regarding workspace://SpacesStore you will only find current nodes. You should use the node browser (available in management console) to see what are the available stores and what they contain.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2007 06:25 AM
thanks a lot for the very helpful hint with the node browser!
Regarding the problem with the MySQL JDBC Connector, I'm rather confused, because I don't use a MySQL database and JDBC connector. After your question, I checked the $JAVA_CLASSPATH entries my script generates and I also found my Oracle JDBC Connector in there.
:/opt/alfresco/tomcat/common/lib/ojdbc14_g.jar:
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2007 07:39 AM
As far as I undesrtand, your Alfresco is configured to use MySQL. You should verify your hibernate-cfg.properties specifies the good connector.
You should also try to add ${TOMCAT_HOME}${IMPORT_CLASSES} to your class path : I'm not sure your personal configuration stored in ${TOMCAT_HOME}/shared/classes/alfresco are read by your script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2007 08:11 AM
Thanks for your reply again. I described the environment I'm using in my first entry. DB = Oracle 10g XE
[…]
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:
[…]
I'm using the custom-hibernate-dialect.properties file to override the default configuration, which is MySQL in the file you mentioned above, with the corresponding entry for my Oracle db.
Alfresco is already up and running smoothly.
When I use the built-in Export func. within the web interface, I can also export the repository to a chosen space, but the command-line export doesn't work.
Actually the server is shut down, when I'm trying to export its files. Does it make any difference, if I'm trying to export online or offline?
P.S.: Another option may be to "monitor" the commands, which are performed, when starting the export func. through the web interface. Do you people out there know how to do this?
Now I'll add ${TOMCAT_HOME}${IMPORT_CLASSES} to the Classpath and try it again. My next reply is soon to come. ^^
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2007 08:21 AM
====================================== STARTING ALFRESCO EXPORT FUNCTION ======================================Alfresco Repository ExporterThe following error has occurred:net.sf.acegisecurity.BadCredentialsException: Bad credentials presentednet.sf.acegisecurity.BadCredentialsException: Bad credentials presented at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.authenticate(DaoAuthenticationProvider.java:290) at net.sf.acegisecurity.providers.ProviderManager.doAuthentication(ProviderManager.java:159) at net.sf.acegisecurity.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:49) at org.alfresco.repo.security.authentication.AuthenticationComponentImpl.authenticate(AuthenticationComponentImpl.java:74) at org.alfresco.repo.security.authentication.AuthenticationServiceImpl.authenticate(AuthenticationServiceImpl.java:112) 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.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:116) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:219) at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:165) at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) at $Proxy20.authenticate(Unknown Source) at org.alfresco.tools.Tool.login(Tool.java:237) at org.alfresco.tools.Tool.start(Tool.java:213) at org.alfresco.tools.Export.main(Export.java:65)org.alfresco.repo.security.authentication.AuthenticationException: net.sf.acegisecurity.BadCredentialsException: Bad credentials presentednet.sf.acegisecurity.BadCredentialsException: Bad credentials presented at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.authenticate(DaoAuthenticationProvider.java:290) at net.sf.acegisecurity.providers.ProviderManager.doAuthentication(ProviderManager.java:159) at net.sf.acegisecurity.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:49) at org.alfresco.repo.security.authentication.AuthenticationComponentImpl.authenticate(AuthenticationComponentImpl.java:74) at org.alfresco.repo.security.authentication.AuthenticationServiceImpl.authenticate(AuthenticationServiceImpl.java:112) 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.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:116) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:219) at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:165) at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) at $Proxy20.authenticate(Unknown Source) at org.alfresco.tools.Tool.login(Tool.java:237) at org.alfresco.tools.Tool.start(Tool.java:213) at org.alfresco.tools.Export.main(Export.java:65) at org.alfresco.repo.security.authentication.AuthenticationComponentImpl.authenticate(AuthenticationComponentImpl.java:88) at org.alfresco.repo.security.authentication.AuthenticationServiceImpl.authenticate(AuthenticationServiceImpl.java:112) 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.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:116) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:219) at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:165) at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) at $Proxy20.authenticate(Unknown Source) at org.alfresco.tools.Tool.login(Tool.java:237) at org.alfresco.tools.Tool.start(Tool.java:213) at org.alfresco.tools.Export.main(Export.java:65)
May be we are able to get rid of this message, too? I'm going to check, if there are already other topics with this "new" error.
Thanks in advance.
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2007 08:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2007 08:50 AM
Time to execute 81.67067 secondsAlfresco Repository Exporter successfully completed.
Wow, you made my day.
If you ever come close to the area of Cologne / Germany. I'll invite you on a couple of beers.
After hours and days, I was so disoriented, that i mixed up the login data of our productional server with the login data on my virtual machine. But more important was the hint with the missing CLASSPATH entries.
Thanks a lot,
Chris.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2007 08:57 AM
Keep the beer cold
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2007 09:25 AM
To get that one clear … if I want to export my complete repository, I need to export all the spaces, mentioned in the node browser?
Phew, finally I can start experimenting with the Export / Import func. and their parameters.
Chris