Alfresco 3.0 fails to start -- More than one Alfresco schema was found

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2014 07:03 PM
Hi,
So our Data Center took a power hit and our racks lost power. Upon reboot of the Linux server that runs Alfresco we see this in our alfresco.log:
————————-
18:43:34,821 INFO [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
18:43:34,949 ERROR [domain.schema.SchemaBootstrap] Schema auto-update failed
org.alfresco.error.AlfrescoRuntimeException:
More than one Alfresco schema was found when querying the database metadata.
Limit the database user's permissions or set the 'hibernate.default_schema' property in 'custom-hibernate-dialect.properties'.
at org.alfresco.repo.domain.schema.SchemaBootstrap.countAppliedPatches(SchemaBootstrap.java:424)
————————–
I am not quite sure what this means or how it got there but I looked for the file custom-hibernate-dialect.properties and it was only located in the source directory on the file system:
/usr/local/src/Alfresco/extensions/extension/custom-hibernate-dialect.properties
/usr/local/src/Alfresco/extensions/extension/custom-hibernate-dialect.properties.sample
There is a post here:
https://forums.alfresco.com/forum/installation-upgrades-configuration-integration/configuration/erro...
That talks about editing a different file, tomcat/webapps/alfresco/WEB-INF/classes/alfresco/domain/hibernate-cfg.properties, and putting in:
hibernate.default_schema=alfresco
That file is located here on our Red Hat Server:
/usr/share/apache-tomcat-6.0.20/webapps/alfresco/WEB-INF/classes/alfresco/domain/hibernate-cfg.properties
Lastly, I tried creating the file as per what the logfile was telling me here:
/usr/share/apache-tomcat-6.0.20/webapps/alfresco/WEB-INF/classes/alfresco/extension/custom-hibernate-dialect.properties
And put in:
hibernate.default_schema=alfresco
But same errors…. I tried putting in hibernate.default_schema=alfresco to both the aforementioned files and we get the same thing.
we are in the house of pain right now as our company's DocRep is d0wn… if anyone could lend a hand we would be forever grateful!
Thanks,
Jg
So our Data Center took a power hit and our racks lost power. Upon reboot of the Linux server that runs Alfresco we see this in our alfresco.log:
————————-
18:43:34,821 INFO [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
18:43:34,949 ERROR [domain.schema.SchemaBootstrap] Schema auto-update failed
org.alfresco.error.AlfrescoRuntimeException:
More than one Alfresco schema was found when querying the database metadata.
Limit the database user's permissions or set the 'hibernate.default_schema' property in 'custom-hibernate-dialect.properties'.
at org.alfresco.repo.domain.schema.SchemaBootstrap.countAppliedPatches(SchemaBootstrap.java:424)
————————–
I am not quite sure what this means or how it got there but I looked for the file custom-hibernate-dialect.properties and it was only located in the source directory on the file system:
/usr/local/src/Alfresco/extensions/extension/custom-hibernate-dialect.properties
/usr/local/src/Alfresco/extensions/extension/custom-hibernate-dialect.properties.sample
There is a post here:
https://forums.alfresco.com/forum/installation-upgrades-configuration-integration/configuration/erro...
That talks about editing a different file, tomcat/webapps/alfresco/WEB-INF/classes/alfresco/domain/hibernate-cfg.properties, and putting in:
hibernate.default_schema=alfresco
That file is located here on our Red Hat Server:
/usr/share/apache-tomcat-6.0.20/webapps/alfresco/WEB-INF/classes/alfresco/domain/hibernate-cfg.properties
Lastly, I tried creating the file as per what the logfile was telling me here:
/usr/share/apache-tomcat-6.0.20/webapps/alfresco/WEB-INF/classes/alfresco/extension/custom-hibernate-dialect.properties
And put in:
hibernate.default_schema=alfresco
But same errors…. I tried putting in hibernate.default_schema=alfresco to both the aforementioned files and we get the same thing.
we are in the house of pain right now as our company's DocRep is d0wn… if anyone could lend a hand we would be forever grateful!
Thanks,
Jg
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2014 05:03 PM
Is your database running? IIRC that dialect stuff nonsense can also be caused by failure to connect to the database.
The first location is the correct one. Editing stuff in web-inf is always wrong.
The first location is the correct one. Editing stuff in web-inf is always wrong.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2014 05:31 PM
Hello!
Thanks so much for the reply mrogers… you have given us hope here in Seattle.
To answer your first question, yes MySQL is running as we can see via:
[Thu Aug 07 | root@babbage:/tmp/Alf_Restore]$ service mysqld status
mysqld (pid 6342) is running…
[Thu Aug 07 | root@babbage:/tmp/Alf_Restore]$ lsof -i | grep -i mysql
mysqld 6342 mysql 3u IPv4 15767 TCP *:mysql (LISTEN)
And the user alfresco can connect to the alfresco db:
[Thu Aug 07 | root@babbage:/tmp/Alf_Restore]$ mysql -u alfresco -p alfresco
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 106
Server version: 5.0.45 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
—————
So can you please specify what file is the correct one? Like with the exact file name?
When you say editing stuff in web-inf is always wrong both files that we tried have that in their directory path:
#1) /usr/share/apache-tomcat-6.0.20/webapps/alfresco/WEB-INF/classes/alfresco/domain/hibernate-cfg.properties
#2) /usr/share/apache-tomcat-6.0.20/webapps/alfresco/WEB-INF/classes/alfresco/extension/custom-hibernate-dialect.properties
Should we edit door #1 or door #2?
THANKS!
-jg

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2014 01:17 PM
WE HAVE SOLVED IT!!! Thanks to mrogers and some more digging we found that the INNODB engine was disabled when the power outage hit. MySQL was up but the InnoDB engine was down.. that's why we were getting this error in the alfresco.log
Hope this info helps someone along the way!
Peace from SeaTown!
-jg

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2015 03:01 PM
For anyone ever experiencing this issue again here is a more detailed write up of the problem:
http://samurai-sysadmin.com/?p=79
