cancel
Showing results for 
Search instead for 
Did you mean: 

Backup/Restore/DB issue

edk
Champ in-the-making
Champ in-the-making
Currently we have a small Alfresco installation with some documents…. but because:
  1. It wasn't created from svn source

  2. It runs under Tomcat and not JBoss
I want to migrate the content from an Alfresco installation from Labs 3 Final running on Tomcat/MySQL 5.0.24-standard to JBoss 4.2.3.GA/MySQL 5.0.67. To backup to running Alfresco, I stopped the program, dumped the database, and backed up the alf_dir directory - as instructed by http://wiki.alfresco.com/wiki/Backup_and_Restore .

Now the problem is restoring the content on the new server. I get the following error:
14:12:30,110 INFO  [STDOUT] 14:12:30,110  INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
14:14:31,018 INFO  [STDOUT] 14:14:31,014  ERROR [domain.schema.SchemaBootstrap] Schema auto-update failed org.alfresco.error.AlfrescoRuntimeException: A previous schema upgrade failed or was not completed.  Revert to the original database before attempting the upgrade again.
        at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1136)
        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:246)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
        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)
Node the two minute delay, I dropped and reloaded the database backup before this run

My questions are:
  1. Is the backup procedure correct?

  2. Is there more logging that could shed some light on this?
8 REPLIES 8

edk
Champ in-the-making
Champ in-the-making
Ok, I've been able to show the logs… they are:

15:27:55,841 INFO  [STDOUT] 15:27:55,841  INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
15:27:55,907 INFO  [STDOUT] 15:27:55,907  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-6381117311039975216.sql
   random-access: true
15:27:55,907 INFO  [STDOUT] 15:27:55,907  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@dc0dd8
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@11120f9
15:27:55,908 INFO  [STDOUT] 15:27:55,908  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-6381117311039975216.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@11120f9
15:28:00,943 INFO  [STDOUT] 15:28:00,943  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-720728471844854005.sql
   random-access: true
15:28:00,943 INFO  [STDOUT] 15:28:00,943  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@aa21e
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@197522
15:28:00,945 INFO  [STDOUT] 15:28:00,945  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-720728471844854005.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@197522
15:28:06,016 INFO  [STDOUT] 15:28:06,016  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-6978599462603569950.sql
   random-access: true
15:28:06,016 INFO  [STDOUT] 15:28:06,016  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@15609e1
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1a2a1d2
15:28:06,018 INFO  [STDOUT] 15:28:06,018  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-6978599462603569950.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1a2a1d2
15:28:11,054 INFO  [STDOUT] 15:28:11,054  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-4179451539366882962.sql
   random-access: true
15:28:11,054 INFO  [STDOUT] 15:28:11,054  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@419444
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@16d2378
15:28:11,055 INFO  [STDOUT] 15:28:11,055  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-4179451539366882962.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@16d2378
15:28:16,081 INFO  [STDOUT] 15:28:16,081  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-1826209960880431217.sql
   random-access: true
15:28:16,081 INFO  [STDOUT] 15:28:16,081  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@19ce804
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@446cc5
15:28:16,083 INFO  [STDOUT] 15:28:16,083  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-1826209960880431217.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@446cc5
15:28:21,117 INFO  [STDOUT] 15:28:21,117  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-3993117552369683694.sql
   random-access: true
15:28:21,118 INFO  [STDOUT] 15:28:21,118  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@c67c0f
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@facfa5
15:28:21,119 INFO  [STDOUT] 15:28:21,119  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-3993117552369683694.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@facfa5
15:28:26,158 INFO  [STDOUT] 15:28:26,158  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-7729178908314986615.sql
   random-access: true
15:28:26,158 INFO  [STDOUT] 15:28:26,158  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@1a5e310
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1de5e71
15:28:26,160 INFO  [STDOUT] 15:28:26,160  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-7729178908314986615.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1de5e71
15:28:31,215 INFO  [STDOUT] 15:28:31,215  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-2194577402776871180.sql
   random-access: true
15:28:31,215 INFO  [STDOUT] 15:28:31,215  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@1c7a917
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@12e4ff9
15:28:31,216 INFO  [STDOUT] 15:28:31,216  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-2194577402776871180.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@12e4ff9
15:28:36,246 INFO  [STDOUT] 15:28:36,245  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-4450939462557904026.sql
   random-access: true
15:28:36,246 INFO  [STDOUT] 15:28:36,246  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@2d490b
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@116a69b
15:28:36,247 INFO  [STDOUT] 15:28:36,247  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-4450939462557904026.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@116a69b
15:28:41,287 INFO  [STDOUT] 15:28:41,287  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-3351988303112692487.sql
   random-access: true
15:28:41,287 INFO  [STDOUT] 15:28:41,287  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@1c0bd17
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@be707a
15:28:41,288 INFO  [STDOUT] 15:28:41,288  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-3351988303112692487.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@be707a
15:28:46,319 INFO  [STDOUT] 15:28:46,319  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-483308965899626171.sql
   random-access: true
15:28:46,319 INFO  [STDOUT] 15:28:46,319  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@1171cd1
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@64e307
15:28:46,320 INFO  [STDOUT] 15:28:46,320  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-483308965899626171.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@64e307
15:28:51,362 INFO  [STDOUT] 15:28:51,362  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-4470716264247956184.sql
   random-access: true
15:28:51,362 INFO  [STDOUT] 15:28:51,362  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@16fde80
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@178d35f
15:28:51,364 INFO  [STDOUT] 15:28:51,364  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-4470716264247956184.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@178d35f
15:28:56,394 INFO  [STDOUT] 15:28:56,393  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-7037306617715316303.sql
   random-access: true
15:28:56,394 INFO  [STDOUT] 15:28:56,394  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@b23e72
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@21eb3f
15:28:56,395 INFO  [STDOUT] 15:28:56,395  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-7037306617715316303.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@21eb3f
15:29:01,427 INFO  [STDOUT] 15:29:01,427  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-3115649656493598922.sql
   random-access: true
15:29:01,428 INFO  [STDOUT] 15:29:01,428  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@176150c
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@15fc793
15:29:01,429 INFO  [STDOUT] 15:29:01,429  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-3115649656493598922.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@15fc793
15:29:06,461 INFO  [STDOUT] 15:29:06,461  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-5451243437000909699.sql
   random-access: true
15:29:06,466 INFO  [STDOUT] 15:29:06,466  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@a41d56
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@8209d7
15:29:06,467 INFO  [STDOUT] 15:29:06,467  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-5451243437000909699.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@8209d7
15:29:11,506 INFO  [STDOUT] 15:29:11,505  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-6045534761801563401.sql
   random-access: true
15:29:11,506 INFO  [STDOUT] 15:29:11,506  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@1851a89
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1911a2d
15:29:11,508 INFO  [STDOUT] 15:29:11,508  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-6045534761801563401.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1911a2d
15:29:16,571 INFO  [STDOUT] 15:29:16,571  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-1188541627610923817.sql
   random-access: true
15:29:16,571 INFO  [STDOUT] 15:29:16,571  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@78014a
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@9cafe0
15:29:16,572 INFO  [STDOUT] 15:29:16,572  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-1188541627610923817.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@9cafe0
15:29:21,601 INFO  [STDOUT] 15:29:21,601  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-8089946797059054190.sql
   random-access: true
15:29:21,601 INFO  [STDOUT] 15:29:21,601  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@1a477bf
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@b1abcd
15:29:21,603 INFO  [STDOUT] 15:29:21,603  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-8089946797059054190.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@b1abcd
15:29:26,630 INFO  [STDOUT] 15:29:26,630  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-3645387021090696793.sql
   random-access: true
15:29:26,630 INFO  [STDOUT] 15:29:26,630  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@681ff4
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@9fc98
15:29:26,632 INFO  [STDOUT] 15:29:26,632  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-3645387021090696793.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@9fc98
15:29:31,735 INFO  [STDOUT] 15:29:31,735  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-952497733614205414.sql
   random-access: true
15:29:31,736 INFO  [STDOUT] 15:29:31,736  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@17844d3
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@ee83a8
15:29:31,737 INFO  [STDOUT] 15:29:31,737  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-952497733614205414.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@ee83a8
15:29:36,765 INFO  [STDOUT] 15:29:36,765  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-5167214003600603499.sql
   random-access: true
15:29:36,766 INFO  [STDOUT] 15:29:36,766  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@1902242
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1b92a37
15:29:36,767 INFO  [STDOUT] 15:29:36,767  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-5167214003600603499.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1b92a37
15:29:41,809 INFO  [STDOUT] 15:29:41,809  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-8285090547097470203.sql
   random-access: true
15:29:41,810 INFO  [STDOUT] 15:29:41,810  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@19e922d
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@18ef33e
15:29:41,811 INFO  [STDOUT] 15:29:41,811  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-8285090547097470203.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@18ef33e
15:29:46,841 INFO  [STDOUT] 15:29:46,841  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-7594259673437446361.sql
   random-access: true
15:29:46,842 INFO  [STDOUT] 15:29:46,842  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@43a8b8
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1f9ddb5
15:29:46,843 INFO  [STDOUT] 15:29:46,843  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-7594259673437446361.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1f9ddb5
15:29:51,869 INFO  [STDOUT] 15:29:51,869  DEBUG [content.filestore.FileContentWriter] Opened write channel to file:
   file: /tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-8065247922739168630.sql
   random-access: true
15:29:51,870 INFO  [STDOUT] 15:29:51,870  DEBUG [repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@18cc276
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@330a31
15:29:51,871 INFO  [STDOUT] 15:29:51,871  DEBUG [repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///tmp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-8065247922739168630.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@330a31
15:29:56,881 INFO  [STDOUT] 15:29:56,876  ERROR [domain.schema.SchemaBootstrap] Schema auto-update failed
org.alfresco.error.AlfrescoRuntimeException: A previous schema upgrade failed or was not completed.  Revert to the original database before attempting the upgrade again.
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1136)
   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:246)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
   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)
Any Ideas? They system will run with an empty alf_data directory and empty database.

pmonks
Star Contributor
Star Contributor
From the error:

15:29:56,881 INFO  [STDOUT] 15:29:56,876  ERROR [domain.schema.SchemaBootstrap] Schema auto-update failed
org.alfresco.error.AlfrescoRuntimeException: A previous schema upgrade failed or was not completed.  Revert to the original database before attempting the upgrade again.
It looks like the version of Alfresco has changed between the two instances.  Is this correct?

If so, the upgrade process appears to have failed and the first step would be to restore the backup again (with both Alfresco instances shut down) and try it again.  If the upgrade fails again post the error here and we'll see if we can figure out what's going on.

Cheers,
Peter

edk
Champ in-the-making
Champ in-the-making
It looks like the version of Alfresco has changed between the two instances.  Is this correct?
You are correct, I was changing the version from Alfresco-Labs-3 to a svn v12844 (But then is this really a version change?)

I tried the alfresco.war and share.war from Alfresco-Labs-3's tomcat installation and it resulted in the same error messages. The entire log file is available at: http://atl.org/~ed/jboss-run-42.zip

I did a fresh backup, tar the alf_dir directory and backup the database with: mysqldump –skip-opt alfresco

Other changes:
  • Alfresco-Labs-3 Tomcat -> jboss 4.2.3.GA

  • MySQL 5.0.24 -> 5.0.67

  • Linux x64 -> x86 (64-bit to 32-bit)

edk
Champ in-the-making
Champ in-the-making
In my attempts to reproduce the production server, I installed build-1342_alfresco-labs-tomcat-3c.tar.gz on my backup server. After editing custom-repository.properties and custom-hibernate-dialect.properties, adding mysql-connector-java-5.1.7-bin.jar, restoring alf_dir, restoring the database, then finally running ./alfresco.sh start I still get the following error:


00:54:14,612 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
00:54:14,660 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-2775722226551032788.sql
   random-access: true
00:54:14,661 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@1d95643
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1ae53e9
00:54:14,661 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-2775722226551032788.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1ae53e9
00:54:19,696 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-7689938032201176762.sql
   random-access: true
00:54:19,696 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@b8a28b
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1b78a69
00:54:19,696 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-7689938032201176762.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1b78a69
00:54:24,729 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-6069370357975578868.sql
   random-access: true
00:54:24,729 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@2b6e48
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1553d28
00:54:24,730 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-6069370357975578868.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1553d28
00:54:29,763 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-3358303642268414141.sql
   random-access: true
00:54:29,763 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@14435e5
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@12e8360
00:54:29,763 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-3358303642268414141.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@12e8360
00:54:34,795 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-7155585871997458660.sql
   random-access: true
00:54:34,795 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@1cf437c
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@578b06
00:54:34,795 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-7155585871997458660.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@578b06
00:54:39,826 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-902973672445880099.sql
   random-access: true
00:54:39,827 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@6ad18a
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@e2c05d
00:54:39,827 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-902973672445880099.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@e2c05d
00:54:44,864 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-7603693020531754747.sql
   random-access: true
00:54:44,864 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@1fca052
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@8197b2
00:54:44,865 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-7603693020531754747.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@8197b2
00:54:49,897 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-6158395102148636276.sql
   random-access: true
00:54:49,897 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@3cdf2d
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@604106
00:54:49,898 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-6158395102148636276.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@604106
00:54:54,928 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-4848154179018417490.sql
   random-access: true
00:54:54,928 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@194a7ec
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@9c8620
00:54:54,928 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-4848154179018417490.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@9c8620
00:54:59,977 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-4454997246138879999.sql
   random-access: true
00:54:59,977 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@7f1ac
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@18b91cb
00:54:59,978 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-4454997246138879999.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@18b91cb
00:55:05,013 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-6337253409498401301.sql
   random-access: true
00:55:05,013 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@5b644b
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@157e43
00:55:05,013 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-6337253409498401301.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@157e43
00:55:10,051 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-792976291626088848.sql
   random-access: true
00:55:10,051 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@f6925f
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@3be58
00:55:10,052 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-792976291626088848.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@3be58
00:55:15,071 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-1954553587292600070.sql
   random-access: true
00:55:15,071 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@1f3305e
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@ec7aae
00:55:15,071 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-1954553587292600070.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@ec7aae
00:55:20,105 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-2024384302887235889.sql
   random-access: true
00:55:20,105 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@bb2acf
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1f7b6e1
00:55:20,106 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-2024384302887235889.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1f7b6e1
00:55:25,136 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-5445480810276678991.sql
   random-access: true
00:55:25,137 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@1a90deb
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1d0f57e
00:55:25,137 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-5445480810276678991.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1d0f57e
00:55:30,168 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-5589793951788158944.sql
   random-access: true
00:55:30,169 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@1fb672f
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@334bfc
00:55:30,169 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-5589793951788158944.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@334bfc
00:55:35,190 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-67027036671109013.sql
   random-access: true
00:55:35,190 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@b8daa7
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1b41b4
00:55:35,190 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-67027036671109013.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1b41b4
00:55:40,217 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-1116966689908650420.sql
   random-access: true
00:55:40,217 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@e7c6d1
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@adfa2c
00:55:40,217 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-1116966689908650420.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@adfa2c
00:55:45,245 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-1390087396018002469.sql
   random-access: true
00:55:45,246 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@18f7af7
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@d22860
00:55:45,246 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-1390087396018002469.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@d22860
00:55:50,272 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-6608851500272522136.sql
   random-access: true
00:55:50,272 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@ba9d8e
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1bdfbf6
00:55:50,273 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-6608851500272522136.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1bdfbf6
00:55:55,299 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-8504143970845321398.sql
   random-access: true
00:55:55,300 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@1ebec47
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1e5348f
00:55:55,300 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-8504143970845321398.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1e5348f
00:56:00,327 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-3154818553825126429.sql
   random-access: true
00:56:00,328 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@a2e359
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1fc0936
00:56:00,328 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-3154818553825126429.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1fc0936
00:56:05,354 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-689288390864798866.sql
   random-access: true
00:56:05,354 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@1f70225
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1add353
00:56:05,355 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-689288390864798866.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@1add353
00:56:10,380 DEBUG [org.alfresco.repo.content.filestore.FileContentWriter] Opened write channel to file:
   file: /home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-3636994646749170469.sql
   random-access: true
00:56:10,380 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Created callback byte channel:
   original: sun.nio.ch.FileChannelImpl@1297ad9
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@407072
00:56:10,380 DEBUG [org.alfresco.repo.content.AbstractContentWriter] Opened channel onto content:
   content: ContentAccessor[ contentUrl=store:///home/ed/Alfresco-Tomcat/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-3636994646749170469.sql, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@407072
00:56:15,384 ERROR [org.alfresco.repo.domain.schema.SchemaBootstrap] Schema auto-update failed
org.alfresco.error.AlfrescoRuntimeException: A previous schema upgrade failed or was not completed.  Revert to the original database before attempting the upgrade again.
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1134)
   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:246)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:448)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
   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.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

The full log can be found at: http://atl.org/~ed/AlfrescoTomcatLog.zip

The SQL statement that it is attempted:


– Title:      Update for permissions schema changes
– Database:   MySQL InnoDB
– Since:      V2.2 Schema 85
– Author:     Andy Hind

– Please contact support@alfresco.com if you need assistance with the upgrade.


CREATE TABLE alf_acl_change_set (
   id BIGINT NOT NULL AUTO_INCREMENT,
   version BIGINT NOT NULL,
   primary key (id)
) ENGINE=InnoDB;


– Add to ACL
ALTER TABLE alf_access_control_list
   ADD COLUMN type INT NOT NULL DEFAULT 0,
   ADD COLUMN latest BOOLEAN NOT NULL DEFAULT TRUE,
   ADD COLUMN acl_id VARCHAR(36) NOT NULL DEFAULT 'UNSET',
   ADD COLUMN acl_version BIGINT NOT NULL DEFAULT 1,
   ADD COLUMN inherited_acl BIGINT,
   ADD COLUMN is_versioned BOOLEAN NOT NULL DEFAULT FALSE,
   ADD COLUMN requires_version BOOLEAN NOT NULL DEFAULT FALSE,
   ADD COLUMN acl_change_set BIGINT,
   ADD COLUMN inherits_from BIGINT,
   ADD INDEX fk_alf_acl_acs (acl_change_set),
   ADD CONSTRAINT fk_alf_acl_acs FOREIGN KEY (acl_change_set) REFERENCES alf_acl_change_set (id),
   ADD INDEX idx_alf_acl_inh (inherits, inherits_from);

UPDATE alf_access_control_list acl
   set acl_id = (acl.id);

ALTER TABLE alf_access_control_list
   ADD UNIQUE (acl_id, latest, acl_version);

– Create ACL member list
CREATE TABLE alf_acl_member (
   id BIGINT NOT NULL AUTO_INCREMENT,
   version BIGINT NOT NULL,
   acl_id BIGINT NOT NULL,
   ace_id BIGINT NOT NULL,
   pos INT NOT NULL,
   INDEX fk_alf_aclm_acl (acl_id),
   CONSTRAINT fk_alf_aclm_acl FOREIGN KEY (acl_id) REFERENCES alf_access_control_list (id),
   INDEX fk_alf_aclm_ace (ace_id),
   CONSTRAINT fk_alf_aclm_ace FOREIGN KEY (ace_id) REFERENCES alf_access_control_entry (id),
   primary key (id),
   unique(acl_id, ace_id, pos)
) ENGINE=InnoDB;

ALTER TABLE alf_access_control_entry DROP INDEX acl_id;

– Extend ACE
ALTER TABLE alf_access_control_entry
   ADD COLUMN auth_id BIGINT NOT NULL DEFAULT -1,
   ADD COLUMN applies INT NOT NULL DEFAULT 0,
   ADD COLUMN context_id BIGINT;

– remove unused
DROP TABLE alf_auth_ext_keys;

– remove authority constraint
ALTER TABLE alf_access_control_entry DROP INDEX FKFFF41F99B25A50BF, DROP FOREIGN KEY FKFFF41F99B25A50BF; – (optional)

– restructure authority
ALTER TABLE alf_authority
   DROP PRIMARY KEY,
   ADD COLUMN id BIGINT NOT NULL AUTO_INCREMENT,
   ADD COLUMN crc BIGINT,
   CHANGE recipient authority VARCHAR(100),
   ADD INDEX idx_alf_auth_aut (authority),
   ADD primary key (id),
   ADD UNIQUE (authority, crc);

– migrate data - fix up FK refs to authority
UPDATE alf_access_control_entry ace
   set auth_id = (select id from alf_authority a where a.authority = ace.authority_id);


– migrate data - build equivalent ACL entries
INSERT INTO alf_acl_member (version, acl_id, ace_id, pos)
   select 1, ace.acl_id, ace.id, 0 from alf_access_control_entry ace join alf_access_control_list acl on acl.id = ace.acl_id;

– Create ACE context
CREATE TABLE alf_ace_context (
   id BIGINT NOT NULL AUTO_INCREMENT,
   version BIGINT NOT NULL,
   class_context VARCHAR(1024),
   property_context VARCHAR(1024),
   kvp_context VARCHAR(1024),
   primary key (id)
) ENGINE=InnoDB;


– Create auth aliases table
CREATE TABLE alf_authority_alias (
   id BIGINT NOT NULL AUTO_INCREMENT,
   version BIGINT NOT NULL,
   auth_id BIGINT NOT NULL,
   alias_id BIGINT NOT NULL,
   INDEX fk_alf_autha_ali (alias_id),
   CONSTRAINT fk_alf_autha_ali FOREIGN KEY (alias_id) REFERENCES alf_authority (id),
   INDEX fk_alf_autha_aut (auth_id),
   CONSTRAINT fk_alf_autha_aut FOREIGN KEY (auth_id) REFERENCES alf_authority (id),
   primary key (id),
   UNIQUE (auth_id, alias_id)
)  ENGINE=InnoDB;


– Tidy up unused cols on ace table and add the FK contstraint back
– finish take out of ACL_ID
ALTER TABLE alf_access_control_entry
   DROP INDEX FKFFF41F99B9553F6C, DROP FOREIGN KEY FKFFF41F99B9553F6C,
   DROP INDEX FKFFF41F9960601995, DROP FOREIGN KEY FKFFF41F9960601995,
   DROP COLUMN acl_id, DROP COLUMN authority_id,
   CHANGE auth_id authority_id BIGINT NOT NULL,
   ADD INDEX fk_alf_ace_auth (authority_id),
   ADD CONSTRAINT fk_alf_ace_auth FOREIGN KEY (authority_id) REFERENCES alf_authority (id),
   ADD INDEX fk_alf_ace_perm (permission_id),
   ADD CONSTRAINT fk_alf_ace_perm FOREIGN KEY (permission_id) REFERENCES alf_permission (id),
   ADD INDEX fk_alf_ace_ctx (context_id),
   ADD CONSTRAINT fk_alf_ace_ctx FOREIGN KEY (context_id) REFERENCES alf_ace_context (id)
;
  

CREATE TABLE alf_tmp_min_ace (
  min BIGINT NOT NULL,
  permission_id BIGINT NOT NULL,
  authority_id BIGINT NOT NULL,
  allowed BIT(1) NOT NULL,
  applies INT NOT NULL,
  UNIQUE (permission_id, authority_id, allowed, applies)
) ENGINE=InnoDB;

INSERT INTO alf_tmp_min_ace (min, permission_id, authority_id, allowed, applies)
    SELECT
       min(ace1.id),
       ace1.permission_id,
       ace1.authority_id,
       ace1.allowed,
       ace1.applies
    FROM
       alf_access_control_entry ace1
    GROUP BY
       ace1.permission_id, ace1.authority_id, ace1.allowed, ace1.applies
;
  

– Update members to point to the first use of an access control entry
UPDATE alf_acl_member mem
   SET ace_id = (SELECT help.min FROM alf_access_control_entry ace
                     JOIN alf_tmp_min_ace help
                     ON      help.permission_id = ace.permission_id AND
                                help.authority_id = ace.authority_id AND
                                help.allowed = ace.allowed AND
                                help.applies = ace.applies
                     WHERE ace.id = mem.ace_id  );

DROP TABLE alf_tmp_min_ace;

– Remove duplicate aces the mysql way (as you can not use the deleted table in the where clause …)

CREATE TABLE tmp_to_delete SELECT ace.id FROM alf_acl_member mem RIGHT OUTER JOIN alf_access_control_entry ace ON mem.ace_id = ace.id WHERE mem.ace_id IS NULL;
DELETE FROM ace USING alf_access_control_entry ace JOIN tmp_to_delete t ON ace.id = t.id;
DROP TABLE tmp_to_delete;

– Add constraint for duplicate acls

ALTER TABLE alf_access_control_entry
   ADD UNIQUE (permission_id, authority_id, allowed, applies, context_id);


– Record script finish

DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.2-ACL';
INSERT INTO alf_applied_patch
  (id, description, fixes_from_schema, fixes_to_schema, applied_to_schema, target_schema, applied_on_date, applied_to_server, was_executed, succeeded, report)
  VALUES
  (
    'patch.db-V2.2-ACL', 'Manually executed script upgrade V2.2: Update acl schema',
    0, 119, -1, 120, null, 'UNKOWN', 1, 1, 'Script completed'
  );

But of course it fails since alf_acl_change_set exists.

pmonks
Star Contributor
Star Contributor
The error:

org.alfresco.error.AlfrescoRuntimeException: A previous schema upgrade failed or was not completed.  Revert to the original database before attempting the upgrade again.
indicates that the backup that you're using was taken after the first upgrade attempt had been made.  You'll need to find an older backup (from prior to any upgrade attempts), restore that, and try the upgrade again.

Cheers,
Peter

edk
Champ in-the-making
Champ in-the-making
indicates that the backup that you're using was taken after the first upgrade attempt had been made.  You'll need to find an older backup (from prior to any upgrade attempts), restore that, and try the upgrade again.
Reverting to another backup is not a problem. I am working on a staging server, so at any time I can go back to the production server and pull off a new backup.

What was very frustrating was that any changes to the parameters in jboss/server/default/conf/alfresco/extension/custom-repository.properties had no changes to the system. And while I had another installation installed in the database of 'alfresco' my real database was in 'alfresco3'. Once I restored my database backup to the 'alfresco' database everything worked.

To repeat, I deleted the 'alfresco3' database, but this diff file still works!
diff -u -r jboss-org/bin/run.sh jboss/bin/run.sh
— jboss-org/bin/run.sh   2008-07-18 14:18:48.000000000 -0400
+++ jboss/bin/run.sh   2009-02-10 22:15:50.000000000 -0500
@@ -5,6 +5,9 @@
##                                                                          ##
### ====================================================================== ###

+JAVA_HOME="/home/ed/local/jdk1.6.0_11"
+JAVA_OPTS="-Xms512m -Xmx1G -XX:MaxPermSize=128m -server -Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=false"
+
### $Id: run.sh 75849 2008-07-15 18:43:17Z dimitris@jboss.org $ ###

DIRNAME=`dirname $0`
Only in jboss/server/default/conf: alfresco
Only in jboss/server/default: data
Only in jboss/server/default/deploy: alfresco.war
diff -u -r jboss-org/server/default/deploy/ejb3.deployer/META-INF/persistence.properties jboss/server/default/deploy/ejb3.deployer/META-INF/persistence.properties
— jboss-org/server/default/deploy/ejb3.deployer/META-INF/persistence.properties   2008-07-18 14:21:02.000000000 -0400
+++ jboss/server/default/deploy/ejb3.deployer/META-INF/persistence.properties   2009-02-10 22:15:50.000000000 -0500
@@ -14,4 +14,4 @@
hibernate.jndi.java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
hibernate.bytecode.use_reflection_optimizer=false
# I don't think this is honored, but EJB3Deployer uses it
-hibernate.bytecode.provider=javassist
\ No newline at end of file
+hibernate.bytecode.provider=cglib
diff -u -r jboss-org/server/default/deploy/jboss-web.deployer/conf/web.xml jboss/server/default/deploy/jboss-web.deployer/conf/web.xml
— jboss-org/server/default/deploy/jboss-web.deployer/conf/web.xml   2008-07-18 14:21:02.000000000 -0400
+++ jboss/server/default/deploy/jboss-web.deployer/conf/web.xml   2009-02-10 22:15:50.000000000 -0500
@@ -59,16 +59,20 @@

    <!– Configures JSF for a web application if the javax.faces.webapp.FacesServlet is declared –>
    <!– in web.xml.                                                                             –>
+   <!–
    <listener>
      <listener-class>org.jboss.web.jsf.integration.config.JBossJSFConfigureListener</listener-class>
    </listener>
+   –>

    <!– Listens to all web app lifecycle events so that @PreDestroy can be called on –>
    <!– JSF managed beans that go out of scope.  You can comment this out if you     –>
    <!– don't use JSF or you don't use annotations on your managed beans.            –>
+   <!–
    <listener>
      <listener-class>com.sun.faces.application.WebappLifecycleListener</listener-class>
    </listener>
+   –>


   <!– ================== Built In Servlet Definitions ==================== –>
Only in jboss/server/default/deploy: share.war
Only in jboss/server/default/lib: mysql-connector-java-5.1.7-bin.jar
Only in jboss/server/default: log
Only in jboss/server/default: tmp
Only in jboss/server/default: work
diff -u -r -N jboss-org/server/default/conf/alfresco/extension/custom-hibernate-dialect.properties jboss/server/default/conf/alfresco/extension/custom-hibernate-dialect.properties
— jboss-org/server/default/conf/alfresco/extension/custom-hibernate-dialect.properties   1969-12-31 19:00:00.000000000 -0500
+++ jboss/server/default/conf/alfresco/extension/custom-hibernate-dialect.properties   2009-02-10 22:36:26.000000000 -0500
@@ -0,0 +1,25 @@
+#
+# Sample Hibernate configuration for changing Database dialect
+# For a full list: http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#configuration-optional-dialects
+#
+
+#
+# Derby dialect
+#
+#hibernate.dialect=org.hibernate.dialect.DerbyDialect
+
+#
+# HSQL dialect
+#
+#hibernate.dialect=org.hibernate.dialect.HSQLDialect
+
+#
+# MySQL dialect (default)
+#
+hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
+
+#
+# PostgreSQL dialect
+#
+#hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
+#hibernate.query.substitutions=true TRUE, false FALSE
diff -u -r -N jboss-org/server/default/conf/alfresco/extension/custom-repository.properties jboss/server/default/conf/alfresco/extension/custom-repository.properties
— jboss-org/server/default/conf/alfresco/extension/custom-repository.properties   1969-12-31 19:00:00.000000000 -0500
+++ jboss/server/default/conf/alfresco/extension/custom-repository.properties   2009-02-10 23:28:36.000000000 -0500
@@ -0,0 +1,58 @@
+###############################
+## Common Alfresco Properties #
+###############################
+
+#
+# Sample custom content and index data location
+#
+#dir.root=/home/ed/Alfresco-Labs/alf_data
+#dir.indexes=/home/ed/Alfresco-Labs/alf_data/lucene-indexes
+
+#
+# Sample database connection properties
+#
+#db.name=alfresco3
+db.username=alfresco3
+db.password=alfresco3
+#db.pool.initial=10
+#db.pool.max=100
+
+#
+# External locations
+#
+ooo.exe=/usr/lib/openoffice.org3/program/soffice
+ooo.user=${dir.root}/oouser
+img.root=/usr/local/ed/
+swf.exe=/home/ed/local/swftools-2009-01-06-2243/bin/pdf2swf
+
+#
+# Property to control whether schema updates are performed automatically.
+# Updates must be enabled during upgrades as, apart from the static upgrade scripts,
+# there are also auto-generated update scripts that will need to be executed.  After
+# upgrading to a new version, this can be disabled.
+#
+#db.schema.update=true
+
+#
+# Derby connection
+#
+#db.driver=org.apache.derby.jdbc.EmbeddedDriver
+#db.url=jdbc:derby:/home/ed/Alfresco-Labs/alf_data/derby_data/alfresco;create=true
+
+#
+# HSQL connection
+#
+#hsql#db.driver=org.hsqldb.jdbcDriver
+#hsql#db.url=jdbc:hsqldb:file:/home/ed/Alfresco-Labs/alf_data/hsql_data/alfresco;ifexists=true;shutdown=true;
+
+#
+# MySQL connection (This is default and requires mysql-connector-java-5.0.3-bin.jar, which ships with the Alfresco server)
+#
+db.driver=org.gjt.mm.mysql.Driver
+db.url=jdbc:mysql://localhost/alfresco3
+
+#
+# PostgreSQL connection (requires postgresql-8.2-504.jdbc3.jar or equivalent)
+#
+#postgresql#db.driver=org.postgresql.Driver
+#postgresql#db.url=jdbc:postgresql://localhost:3306/alfresco
diff -u -r -N jboss-org/server/default/conf/alfresco/extension/dev-log4j.properties jboss/server/default/conf/alfresco/extension/dev-log4j.properties
— jboss-org/server/default/conf/alfresco/extension/dev-log4j.properties   1969-12-31 19:00:00.000000000 -0500
+++ jboss/server/default/conf/alfresco/extension/dev-log4j.properties   2009-02-10 23:30:52.000000000 -0500
@@ -0,0 +1,4 @@
+log4j.logger.org.alfresco.repo.content.transform=debug
+log4j.logger.org.alfresco.repo.thumbnail=debug
+log4j.logger.org.alfresco.util.exec=debug
+log4j.logger.org.alfresco=debug

Now, I know that the java process opened the properties file, because when I run a strace like this:
strace -f -e trace=file -o trace5.log ./jboss/bin/run.sh 
The file was opened. But changes to any of the parameters in this file have no affect.

So, how then do I make configuration changes to a JBoss installation?

edk
Champ in-the-making
Champ in-the-making
I think that the root of the problem is that when Alfresco runs under JBoss, it doesn't accept any custom configurations. I've created a new thread with a demonstration. Please read: http://forums.alfresco.com/en/viewtopic.php?t=16926 It is a simpler use case. And if solved, might help me on this thread.

derek
Star Contributor
Star Contributor
Hi,
You can set the basic repository properties (but not Hibernate dialect) using stardard java -D options as well.  This was just incidentally present in your version but will be fully supported in the next set of releases.
Regards