cancel
Showing results for 
Search instead for 
Did you mean: 

SchemaBootstrap.java throws AlfrescoRuntimeException

muruga
Champ in-the-making
Champ in-the-making
Hi,
  Getting following error when i start my tomcat after depolying alfresco.war. Looks like defaultCatalog and defaultSchema returns nulls(SchemaBootstrap.java). Could you please let me know where the these gettiing populated.(I am using MySQL DB).

13:43:00,864  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:1151)
   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:3843)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515)
   at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1231)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
   at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(Unknown Source)
   at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown Source)
   at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
   at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
   at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1471)
   at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:243)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
   at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857)
   at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)
   at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
   at java.lang.Thread.run(Unknown Source)
13:43:00,864  ERROR [web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: Schema auto-update failed
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1209)
   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:3843)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515)
   at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1231)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
   at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(Unknown Source)
   at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown Source)
   at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
   at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
   at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1471)
   at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:243)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
   at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857)
   at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)
   at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
   at java.lang.Thread.run(Unknown Source)
Caused by: 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:1151)
   … 43 more
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
7 REPLIES 7

muruga
Champ in-the-making
Champ in-the-making
It created problem because of the DB URL was not set correctly. Later i faced problem in creating in alf_bootstrap_lock table. Then dropped the database and created the alf_bootstrap_lock again. It went through creating all the repository tables. But it could not create all the tables. Before completion of creating tables, it throws the following exception.

10:01:43,007  ERROR [web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: Bootstrap failed
   at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:336)
   at org.alfresco.repo.importer.ImporterBootstrap.onBootstrap(ImporterBootstrap.java:699)
   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:3843)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515)
   at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1231)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
   at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(Unknown Source)
   at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown Source)
   at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
   at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
   at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1471)
   at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:243)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
   at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857)
   at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)
   at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
   at java.lang.Thread.run(Unknown Source)
Caused by: org.alfresco.error.AlfrescoRuntimeException: Exception in Transaction.
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:378)
   at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:332)
   … 44 more
Caused by: java.lang.OutOfMemoryError: Java heap space
   at java.util.Hashtable.getEnumeration(Unknown Source)
   at java.util.Hashtable.elements(Unknown Source)
   at org.apache.lucene.index.SegmentReader.closeNorms(SegmentReader.java:511)
   at org.apache.lucene.index.SegmentReader.doClose(SegmentReader.java:257)
   at org.apache.lucene.index.IndexReader.close(IndexReader.java:722)
   at org.apache.lucene.index.SegmentMerger.closeReaders(SegmentMerger.java:113)
   at org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:1576)
   at org.apache.lucene.index.IndexWriter.flushRamSegments(IndexWriter.java:1351)
   at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:588)
   at org.alfresco.repo.search.impl.lucene.index.IndexInfo.closeDeltaIndexWriter(IndexInfo.java:867)
   at org.alfresco.repo.search.impl.lucene.AbstractLuceneBase.closeDeltaWriter(AbstractLuceneBase.java:232)
   at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl.flushPending(AbstractLuceneIndexerImpl.java:822)
   at org.alfresco.repo.search.impl.lucene.AbstractLuceneBase.getSearcher(AbstractLuceneBase.java:171)
   at org.alfresco.repo.search.impl.lucene.ADMLuceneSearcherImpl.query(ADMLuceneSearcherImpl.java:246)
   at org.alfresco.repo.search.SearcherComponent.query(SearcherComponent.java:85)
   at org.alfresco.repo.importer.ImporterComponent$NodeImporter.resolveImportedNodeRef(ImporterComponent.java:1026)
   at org.alfresco.repo.importer.ImporterComponent$NodeImporter.end(ImporterComponent.java:746)
   at org.alfresco.repo.importer.ImporterComponent.parserImport(ImporterComponent.java:361)
   at org.alfresco.repo.importer.ImporterComponent.importView(ImporterComponent.java:235)
   at org.alfresco.repo.importer.ImporterBootstrap.doImport(ImporterBootstrap.java:453)
   at org.alfresco.repo.importer.ImporterBootstrap.access$000(ImporterBootstrap.java:72)
   at org.alfresco.repo.importer.ImporterBootstrap$1.execute(ImporterBootstrap.java:326)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:294)
   at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:332)
   at org.alfresco.repo.importer.ImporterBootstrap.onBootstrap(ImporterBootstrap.java:699)
   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)
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.

muruga
Champ in-the-making
Champ in-the-making
Solved.
Solution : Increase the heap size.

muruga
Champ in-the-making
Champ in-the-making
Solved.
Solution : Increase the heap size.

madhu2710
Champ in-the-making
Champ in-the-making
Hi Muruga,
How can we increase the heap size..?

sandhya
Champ in-the-making
Champ in-the-making
modify the file catalina.sh located in tomcat/bin directory :-

Modify the line :

JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"

by the line :

JAVA_OPTS="$JAVA_OPTS -Xms512m -Xmx1024m -XX:MaxPermSize=512m -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"

madhu2710
Champ in-the-making
Champ in-the-making
Thanks Sandhya,

I have changed the Catalina.sh file as said but there is no change in my stack trace, the same errors repeat.Were u able to resolve the errors..?

sandhya
Champ in-the-making
Champ in-the-making
I have faced the same issue and the problem was solved after increasing the heap size.It seems that alfresco needs minimum 512 MB space as initial memory pool.
Madhu,which version of tomcat are you using?