cancel
Showing results for 
Search instead for 
Did you mean: 

Strange issue in Alfresco-while executing code.

amit_wmw
Champ in-the-making
Champ in-the-making
Hello

Recently 1 strange issue I encountered in Alfresco. Suppose

1)   When I run a sample program (say FirstJCRClient.java) it executes properly giving correct result.
2)   After that I start Alfresco server and then stop it (using alf_stop script);
3)   Go back to eclipse and try running FirstFoundationClient, it throws error (as below).

** Note that this is not the case when I perform 1st step –> skip 2nd step and perform 3rd step. FirstFoundationClient executes properly giving correct result.

###################################################################################################
Log details:

17:53:30,965 WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
17:53:33,589 WARN  [alfresco.util.OpenOfficeConnectionTester] A connection to OpenOffice could not be established.
17:53:36,589 INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
17:53:38,027 INFO  [domain.schema.SchemaBootstrap] Executing database script C:\DOCUME~1\AMIT~1.KAR\LOCALS~1\Temp\Alfresco\AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-60166.sql (Generated).
17:53:43,011 ERROR [domain.schema.SchemaBootstrap] Statement execution failed:
   SQL:  alter table alf_access_control_entry add index FKFFF41F99B25A50BF (authority_id), add constraint FKFFF41F99B25A50BF foreign key (authority_id) references alf_authority (recipient)
   Error: Can't create table '.\alfresco\#sql-464_542.frm' (errno: 150)
   File: C:\DOCUME~1\AMIT~1.KAR\LOCALS~1\Temp\Alfresco\AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-60166.sql
   Line: 26
17:53:43,043 ERROR [domain.schema.SchemaBootstrap] Schema auto-update failed
java.sql.SQLException: Can't create table '.\alfresco\#sql-464_542.frm' (errno: 150)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
###################################################################################################

1 thing skeptical to me is when I stop alfresco server, it every time throwing error like:

***********************************************************************************************************************
Server log details:

“LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository”
***********************************************************************************************************************

Does the prior issue is because of the later one? Any comments or suggestions? Work around I got for this drop database, create it again things will be back on track. But this is temporary solution. I cannot think of dropping my db in production  :roll:

Thanks n reg-
Amit.
1 REPLY 1

nadaoneal
Champ in-the-making
Champ in-the-making
Hi Amit, the LogMananger.repositorySelector (note: "mananger" instead of "manager", always makes me giggle) is unrelated, and is a sort of well-known log4j/tomcat handoff bug. Here's a succinct explanation of the bug and here's a representative discussion of the bug. Maybe someone else on the boards has figured out how to hide it, but I suspect it's going to be showing up in our logs for a while yet.

Looking at your error log, I wonder if the issue is that alfresco's MySQL account has insufficient permission to create new tables. Have you tried running MySQLInnoDBDialect-60166.sql from the MySQL command line, logged in with alfresco's MySQL account?