cancel
Showing results for 
Search instead for 
Did you mean: 

Recommended upgrade path - Oracle Alf. 2.1 to MySQL Alf. 3.x

mjdinsmore
Champ in-the-making
Champ in-the-making
Hi everyone,
   I've been using the Oracle implementation of Alfresco for a few years.  I need to upgrade it so I can fix a few problems (like being able to regenerate the indexes) which have been addressed in a later version of Alfresco.

What is the recommended migration path for this?  I can tell you what I did, and where I'm getting stuck if you have any insight to that –

1. We started up an empty MySQL Alfresco 2.1 version, allowing it to create the MySQL database.  Then we shut it down.
2. Then we clean out all the tables that have data in it that causes migration from Oracle to MySQL (i.e. alf_permission) since starting up the MySQL Alfresco inserts some data into those tables.
3. I start up the 2.1 MySQL Alfresco and let it run for a while – and this is where I have a problem…

The log4j file says:
INFO  [org.alfresco.repo.admin.patch.PatchExecuter] Checking for patches to apply …

and it seems to stay there for over 12 hours until:


11:51:41,328 INFO  [org.alfresco.repo.admin.patch.PatchExecuter] Checking for patches to apply …
21:53:20,726 ERROR [org.alfresco.repo.admin.patch.PatchServiceImpl] org.alfresco.error.AlfrescoRuntimeException: Bootstrap failed


Caused by: org.alfresco.service.cmr.view.ImporterException: Failed to import package at line 14; column 20 due to error: Duplicate child name not allowed: Web Scripts
        at org.alfresco.repo.importer.view.ViewParser.parse(ViewParser.java:190)
        at org.alfresco.repo.importer.ImporterComponent.parserImport(ImporterComponent.java:360)
        at org.alfresco.repo.importer.ImporterComponent.importView(ImporterComponent.java:224)
        at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:426)
        … 170 more
Caused by: org.alfresco.service.cmr.repository.DuplicateChildNodeNameException: Duplicate child name not allowed: Web Scripts
        at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.setChildNameUnique(HibernateNodeDaoServiceImpl.java:698)
        at sun.reflect.GeneratedMethodAccessor264.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)


I couldn't find any posts about this specific error.  Is it because my approach to upgrading it is not proper or correct?  I'd love to hear from someone else who has gone through the same process and figured out how to do it successfully!

Thank you,
Michael
10 REPLIES 10

loftux
Star Contributor
Star Contributor
This is what you should do
Migrate Oracle 2.1 to Mysql 2.1 (but not using a db transfer, see below)
- Since you are on pre 3.x version, complete repo export is still available, see http://wiki.alfresco.com/wiki/Export_and_Import. So no need to do a db export/import.
In your extensions directory you will have a file called restore-context.xml.sample, review that one and you can see how you set a clean repository to import your exported files on first start.
To export, you can do a complete repository export from within Alfresco admin console. Since the export files will be stored within Alfresco itself, this may not work if you have a large repository. Then do an export as in the link above.
After you have verified your 2.1 Mysql, upgrade that to 3.4. You may have to do intermediate version upgrades, I would try going straight to 3.4, if that fails try intermediate versions.

mjdinsmore
Champ in-the-making
Champ in-the-making
Loftux,  thanks for the reply.  I had tried using some of the import/export tools before they they don't work with my data – I think I have too many large files that it can't handle (it's not memory efficient).  The space has multi-terabytes of data files.  It worked for some of my data, but to do it all, I'd have to manually go into thousands for spaces and export each one and then manually import it into thousands of spaces.

I also saw this note on that page:
Import/Export is not recommended to perform an upgrade (Versions 2.x-3.x).
And it's not clear if my operations is considered and "upgrade" or just a lateral change?  For our testing environment we have a script that syncs over any files and indexes and copies over the database at that time so the indexes are in sync with the filesystem.  This is important because if we lost our indexes, we cannot get them back – last time we tried having Alfresco make new ones, we killed it after 7 days and it still hadn't completed.

Is there any script/program to iteratively recurse a space and export that space and a companion script/program to repopulate it into the appropriate directory?  Am I missing something about the tools to handle this?

loftux
Star Contributor
Star Contributor
If you follow the link in my post about export you will see that you can do this with command line, not storing the content within Alfresco itself.
Can be a bit tricky to get dependencies right, so I have made a script for it http://forums.alfresco.com/en/viewtopic.php?t=16145
Probably need adapting to fit your needs.

You are correct, export/import is not for upgrade, but this would not be an upgrade, as you use the same version, and then start your upgrades.

Reindexing in later version is much quicker, but may of course depend on your actual repository.

mjdinsmore
Champ in-the-making
Champ in-the-making
I guess I'll try to figure out how much work it'll be to take that export script you have, then add my own wrapper around it to go into the thousands of spaces and do each one independently, since the export tool doesn't work for large file sizes.  Then I'd have to make a new secondary script to run an import tool and iterate through all those files and insert them in the proper place.   Unfortunately, this sounds like an awful lot of work!   :cry:

No advice about manually editing the ALF_APPLIED_PATCH table and removing the items from that?  Or is that going to cause worse problems?

One of the reasons we want to upgrade is to fix the slow index building which was reported as fixed in the newer version.  Last time we tried to have it rebuild indexes, we let it run for a week and it was only 50% complete and it was getting progressively slower.  I have no idea how long it would take (if it'd finish at all)!

mjdinsmore
Champ in-the-making
Champ in-the-making
Is the applying patches for a new installation supposed to take a VERY long time?  As you can see from my stack trace below, Alfresco says it's applying patches and then 6.5 hours later I get an exception (so it never finishes applying the patches).  What is the typical or expected time for applying patches or is there any logging I should turn on to get a better understanding of the work being performed?

The CentOS linux server is a dual Quad-Core AMD Opteron™ Processor 2356 and I'm giving the JVM 3gb of memory (there's 16gb on the machine) and this is the only active process on the machine (there's no other real activities performed on the machine).  So I wouldn't think it's taking a while because there's not enough horsepower…



10:57:42,747 INFO  [org.alfresco.repo.node.index.IndexRecoveryBootstrapBean] Checking/Recovering indexes …
10:57:42,749 DEBUG [org.alfresco.repo.node.index.FullIndexRecoveryComponent] Performing index recovery for type: NONE
10:57:42,750 INFO  [org.alfresco.repo.node.index.IndexRecoveryBootstrapBean] Checking/Recovering indexes …
10:57:42,761 INFO  [org.alfresco.repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: /fg/alfresco/dev-mysql
10:57:43,511 INFO  [org.alfresco.repo.admin.patch.PatchExecuter] Checking for patches to apply …
17:26:55,010 WARN  [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 08S01
17:26:55,011 ERROR [org.hibernate.util.JDBCExceptionReporter] Communications link failure

Last packet sent to the server was 1394992 ms ago.
17:26:55,025 ERROR [org.alfresco.repo.admin.patch.PatchServiceImpl] org.springframework.dao.DataAccessResourceFailureException: could not exec
ute query; nested exception is org.hibernate.exception.JDBCConnectionException: could not execute query
Caused by: org.hibernate.exception.JDBCConnectionException: could not execute query
   at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)
   at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
   at org.hibernate.loader.Loader.doList(Loader.java:2214)
   at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095)
   at org.hibernate.loader.Loader.list(Loader.java:2090)
   at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:388)
   at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
   at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
   at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
   at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
   at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:804)
   at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl$4.doInHibernate(HibernateNodeDaoServiceImpl.java:684)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:367)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333)
   at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.setChildNameUnique(HibernateNodeDaoServiceImpl.java:687)
   at sun.reflect.GeneratedMethodAccessor338.invoke(Unknown Source)
   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: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.TransactionalDaoInterceptor.invoke(TransactionalDaoInterceptor.java:68)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
   at $Proxy59.setChildNameUnique(Unknown Source)
   at org.alfresco.repo.node.db.DbNodeServiceImpl.setChildUniqueName(DbNodeServiceImpl.java:2022)
   at org.alfresco.repo.node.db.DbNodeServiceImpl.moveNode(DbNodeServiceImpl.java:445)
   at sun.reflect.GeneratedMethodAccessor326.invoke(Unknown Source)
   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: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:144)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
   at $Proxy60.moveNode(Unknown Source)
   at sun.reflect.GeneratedMethodAccessor326.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:221)
   at $Proxy61.moveNode(Unknown Source)
   at sun.reflect.GeneratedMethodAccessor326.invoke(Unknown Source)
   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: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 $Proxy60.moveNode(Unknown Source)
   at org.alfresco.repo.admin.patch.impl.VersionHistoryPerformancePatch.applyInternal(VersionHistoryPerformancePatch.java:51)
   at org.alfresco.repo.admin.patch.AbstractPatch$1$1.execute(AbstractPatch.java:350)
   at org.alfresco.repo.admin.patch.AbstractPatch$1$1.execute(AbstractPatch.java:344)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:225)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155)
   at org.alfresco.repo.admin.patch.AbstractPatch$1.doWork(AbstractPatch.java:355)
   at org.alfresco.repo.admin.patch.AbstractPatch$1.doWork(AbstractPatch.java:340)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:260)
   at org.alfresco.repo.admin.patch.AbstractPatch.apply(AbstractPatch.java:358)
   at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatch(PatchServiceImpl.java:232)
   at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatchAndDependencies(PatchServiceImpl.java:186)
   at org.alfresco.repo.admin.patch.PatchServiceImpl.applyOutstandingPatches(PatchServiceImpl.java:127)
   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:281)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
   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 $Proxy102.applyOutstandingPatches(Unknown Source)
   at org.alfresco.repo.admin.patch.PatchExecuter.applyOutstandingPatches(PatchExecuter.java:89)
   at org.alfresco.repo.admin.patch.PatchExecuter.onBootstrap(PatchExecuter.java:132)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
   at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
   at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:241)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
   at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.j
ava:156)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
…edited for berevity…
   at java.lang.Thread.run(Thread.java:619)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Last packet sent to the server was 1394992 ms ago.
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
   at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
   at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2985)
   at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2871)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3414)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
   at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
   at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1885)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
   at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
   at org.hibernate.loader.Loader.getResultSet(Loader.java:1778)
   at org.hibernate.loader.Loader.doQuery(Loader.java:662)
   at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
   at org.hibernate.loader.Loader.doList(Loader.java:2211)
   … 219 more
Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly
lost.
   at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2431)
   at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2882)
   … 232 more

loftux
Star Contributor
Star Contributor
No, that looks like it is something out of Alfresco, the db connection is lost.
I would say it is lost at 10.57, in that step it is just querying the database, so upgrade or not, that should be a quick step. It is don at every start of Alfresco.

So double check your db connection.

mjdinsmore
Champ in-the-making
Champ in-the-making
Sorry, it was the db connection – something I didn't think to check because I typically get notified if there's a db outage.  Something does seem horribly wrong that the applied patches process is taking so long.  I keep on getting the dupe patch applied error (see below) even though I manually remove any reference to it in the ALF_APPLIED_PATCH table before starting Alfresco up:

mysql> delete  from alf_applied_patch where id like '%patch.webscripts%';

and this removes a couple items in the database referring to the WebScripts.

From the log file below, you can see that it starts the web scripts process at 9:50PM and then finally gets the error and barfs around 6:47AM the following morning.  That's not very quick!  I tried adding some logging to see what it's actually doing all that time.  It seems rather slow!!!


21:50:15,755 INFO  [org.alfresco.repo.node.index.IndexRecoveryBootstrapBean] Checking/Recovering indexes …
21:50:15,756 DEBUG [org.alfresco.repo.node.index.FullIndexRecoveryComponent] Performing index recovery for type: NONE
21:50:15,758 INFO  [org.alfresco.repo.node.index.IndexRecoveryBootstrapBean] Checking/Recovering indexes …
21:50:15,778 INFO  [org.alfresco.repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: /fg/alfresco/dev-mysql
21:50:16,663 INFO  [org.alfresco.repo.admin.patch.PatchExecuter] Checking for patches to apply …
06:47:30,951 ERROR [org.alfresco.repo.admin.patch.PatchServiceImpl] org.alfresco.error.AlfrescoRuntimeException: Bootstrap failed
    at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:444)
    at org.alfresco.repo.admin.patch.impl.GenericBootstrapPatch.applyInternal(GenericBootstrapPatch.java:126)
    at org.alfresco.repo.admin.patch.AbstractPatch$1$1.execute(AbstractPatch.java:350)
    at org.alfresco.repo.admin.patch.AbstractPatch$1$1.execute(AbstractPatch.java:344)
    at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:225)
    at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155)
    at org.alfresco.repo.admin.patch.AbstractPatch$1.doWork(AbstractPatch.java:355)
    at org.alfresco.repo.admin.patch.AbstractPatch$1.doWork(AbstractPatch.java:340)
    at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:260)
    at org.alfresco.repo.admin.patch.AbstractPatch.apply(AbstractPatch.java:358)
    at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatch(PatchServiceImpl.java:232)
    at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatchAndDependencies(PatchServiceImpl.java:186)
    at org.alfresco.repo.admin.patch.PatchServiceImpl.applyOutstandingPatches(PatchServiceImpl.java:127)
    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:281)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
    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 $Proxy102.applyOutstandingPatches(Unknown Source)
    at org.alfresco.repo.admin.patch.PatchExecuter.applyOutstandingPatches(PatchExecuter.java:89)
    at org.alfresco.repo.admin.patch.PatchExecuter.onBootstrap(PatchExecuter.java:132)
    at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
    at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
    at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:241)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
    at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.ja
va:156)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
    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.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
    at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
    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.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
    at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
… removed some useless stack trace junk, jboss stack, to keep this short and sweet …
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy5.deploy(Unknown Source)
    at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
    at org.jboss.Main.boot(Main.java:200)
    at org.jboss.Main$1.run(Main.java:508)
    at java.lang.Thread.run(Thread.java:619)
Caused by: org.alfresco.service.cmr.view.ImporterException: Failed to import package at line 14; column 20 due to error: Duplicate child name n
ot allowed: Web Scripts
    at org.alfresco.repo.importer.view.ViewParser.parse(ViewParser.java:190)
    at org.alfresco.repo.importer.ImporterComponent.parserImport(ImporterComponent.java:360)
    at org.alfresco.repo.importer.ImporterComponent.importView(ImporterComponent.java:224)
    at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:426)
    … 170 more
Caused by: org.alfresco.service.cmr.repository.DuplicateChildNodeNameException: Duplicate child name not allowed: Web Scripts
    at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.setChildNameUnique(HibernateNodeDaoServiceImpl.java:698)

loftux
Star Contributor
Star Contributor
That do seem slow…
Have a look in tomcat/temp, Alfresco will put the actual db scripts it is trying to run in there. Maybe you can find out something from that.
And clean tomcat/temp before you start, will make it easier to find the correct files.

mjdinsmore
Champ in-the-making
Champ in-the-making
Thanks for the tip. One note – I've been running this in JBoss (with it's included tomcat).  I typically clean out all my tmp directories before each run because they do get quite full with various files and complicates the debugging process.  However, I didn't see any files in the temp folder – I checked the temp folder for jboss, the temp folder I specify with the jvm (i.e. -Djava.io.tmpdir=/tmp/alfresco).  I didn't look in the CacheManager configured temp folder since that sohuld only have the Hibernate junk  –

[net.sf.ehcache.CacheManager] Creating a new instance of CacheManager using the diskStorePath "/tmp/fg/alfresco/tmp/mysql-tmp" which is already used by an existing CacheManager.

When I had the Hibernate logging turned on high (debug), I could see it was doing a lot of different things.  It had generated a 7GB file under an hour or thereabouts of all the junk it was doing.  I ended up killing it because I don't have a few free TB of local disk to allow it to write to.

I currently have changed a few items in the log4j.properties:

log4j.logger.org.hibernate=info
log4j.logger.org.alfresco.repo=warn

I was hoping that the repo package would be useful thinking the patches functionality would be included in there?  It currently doesn't spit out anything after the 'applying patches' line with this setting though.  I'd love to be able to get a happy medium where I get some logging but nothing generating tens of GB of it to wade through.   Smiley Surprised