cancel
Showing results for 
Search instead for 
Did you mean: 

Schema not created with 2.0 and MySql 4.1 and Linux

green804
Champ in-the-making
Champ in-the-making
The schema is not gettting created and it's throwing errors.  I can't find any information on how to fix this.  Is there a way to manually create the schema?  Please help.  I have been trying to fix this for 2 days now.

21:10:12,220 WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
21:11:15,899 ERROR [quartz.core.JobRunShell] Job DEFAULT.org.springframework.scheduling.quartz.JobDetailBean#4b0bbb threw an unhandled Exception:
org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not execute query; bad SQL grammar [select max(transactio1_.id) as col_0_0_ from alf_node_status nodestatus0_ inner join alf_transaction transactio1_ on nodestatus0_.transaction_id=transactio1_.id]; nested exception is com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'alfresco.alf_node_status' doesn't existcom.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'alfresco.alf_node_status' doesn't exist
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3124)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1149)
        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1262)
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
        at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
        at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
        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:2145)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
        at org.hibernate.loader.Loader.list(Loader.java:2024)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
        at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:749)
        at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl$17.doInHibernate(HibernateNodeDaoServiceImpl.java:1140)
        at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:365)
        at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333)
        at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.getLastTxn(HibernateNodeDaoServiceImpl.java:1143)
        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:585)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
        at org.alfresco.repo.transaction.TransactionalDaoInterceptor.invoke(TransactionalDaoInterceptor.java:68)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
        at $Proxy1.getLastTxn(Unknown Source)
        at org.alfresco.repo.node.index.FullIndexRecoveryComponent.reindexImpl(FullIndexRecoveryComponent.java:128)
        at org.alfresco.repo.node.index.AbstractReindexComponent$1.doWork(AbstractReindexComponent.java:217)
        at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:176)
        at org.alfresco.repo.transaction.TransactionUtil.executeInUserTransaction(TransactionUtil.java:82)
        at org.alfresco.repo.node.index.AbstractReindexComponent.reindex(AbstractReindexComponent.java:221)
        at org.alfresco.repo.node.index.IndexRecoveryJob.execute(IndexRecoveryJob.java:31)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
21:11:15,912 ERROR [quartz.core.ErrorLogger] Job (DEFAULT.org.springframework.scheduling.quartz.JobDetailBean#4b0bbb threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not execute query; bad SQL grammar [select max(transactio1_.id) as col_0_0_ from alf_node_status nodestatus0_ inner join alf_transaction transactio1_ on nodestatus0_.transaction_id=transactio1_.id]; nested exception is com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'alfresco.alf_node_status' doesn't exist]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
Caused by: org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not execute query; bad SQL grammar [select max(transactio1_.id) as col_0_0_ from alf_node_status nodestatus0_ inner join alf_transaction transactio1_ on nodestatus0_.transaction_id=transactio1_.id]; nested exception is com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'alfresco.alf_node_status' doesn't exist
        at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:223)
        at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
        at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:411)
        at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:370)
        at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333)
        at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.getLastTxn(HibernateNodeDaoServiceImpl.java:1143)
        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:585)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
        at org.alfresco.repo.transaction.TransactionalDaoInterceptor.invoke(TransactionalDaoInterceptor.java:68)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
        at $Proxy1.getLastTxn(Unknown Source)
        at org.alfresco.repo.node.index.FullIndexRecoveryComponent.reindexImpl(FullIndexRecoveryComponent.java:128)
        at org.alfresco.repo.node.index.AbstractReindexComponent$1.doWork(AbstractReindexComponent.java:217)
        at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:176)
        at org.alfresco.repo.transaction.TransactionUtil.executeInUserTransaction(TransactionUtil.java:82)
        at org.alfresco.repo.node.index.AbstractReindexComponent.reindex(AbstractReindexComponent.java:221)
        at org.alfresco.repo.node.index.IndexRecoveryJob.execute(IndexRecoveryJob.java:31)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
        … 1 more
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'alfresco.alf_node_status' doesn't exist
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3124)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1149)
        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1262)
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
        at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
        at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
        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:2145)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
        at org.hibernate.loader.Loader.list(Loader.java:2024)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
        at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:749)
        at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl$17.doInHibernate(HibernateNodeDaoServiceImpl.java:1140)
        at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:365)
        … 21 more
CompilerOracle: exclude org/apache/lucene/index/IndexReader$1 doBody
CompilerOracle: exclude org/alfresco/repo/search/impl/lucene/index/IndexInfo$Merger mergeIndexes
CompilerOracle: exclude org/alfresco/repo/search/impl/lucene/index/IndexInfo$Merger mergeDeletions

[root@dev03.dmz.foxsports.com:/usr/local/alfresco/tomcat/logs] 979> tail -30f catalina.out
        at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
        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:2145)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
        at org.hibernate.loader.Loader.list(Loader.java:2024)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
        at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:749)
        at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl$17.doInHibernate(HibernateNodeDaoServiceImpl.java:1140)
        at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:365)
        … 21 more
1 REPLY 1

derek
Star Contributor
Star Contributor
Hi,

The error is that your schema has not been created by the time the first quartz job kicks off.  It won't actually be doing anything other than reporting nasties while the real schema creation is still under way.  You can switch the index checking off for the first boot using index.recovery.mode=NONE.  But you should also be concerned that the schema creation is taking that long.  What app server and type of machine are you on?

Regards