AnsweredAssumed Answered

Installation against SQL Server 2005

Question asked by samuel.penn on May 28, 2008
Latest reply on May 29, 2008 by samuel.penn
Hi all,

I'm trying to get Alfresco 2.2 installed against SQL Server 2005 (I was previously trying against 2000, failed, and have just upgraded to 2005 and still get the same error), both on Windows XP Pro. I've had Alfresco working fine against HSQL and MySQL on this machine, but this is a completely fresh installation.

The first error I get is:

17:26:13,415 ERROR [web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: Bootstrap failed

And someway down the error stack, I have the message:

Caused by: org.alfresco.repo.search.SearcherException: More than one root node in index: 2

The full error is:


17:25:59,290 INFO  [alfresco.mbeans.VirtServerRegistry] Created JMX serverConnector
17:26:04,883 INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.alfresco.r
epo.domain.hibernate.dialect.AlfrescoSQLServerDialect.
17:26:06,805 INFO  [domain.schema.SchemaBootstrap] Executing database script o:\servers\alfresco\tom
cat\temp\Alfresco\AlfrescoSchemaCreate-org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerD
ialect-42328.sql (Generated).
17:26:07,665 INFO  [domain.schema.SchemaBootstrap] Executing database script o:\servers\alfresco\tom
cat\temp\Alfresco\AlfrescoSchemaUpdate-org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerD
ialect-42329.sql (Copied from classpath:alfresco/dbscripts/create/2.2/org.alfresco.repo.domain.hiber
nate.dialect.AlfrescoSQLServerDialect/AlfrescoPostCreate-2.2-MappedFKIndexes.sql).
17:26:07,774 INFO  [domain.schema.SchemaBootstrap] Executing database script o:\servers\alfresco\tom
cat\temp\Alfresco\AlfrescoSchemaUpdate-org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerD
ialect-42330.sql (Copied from classpath:alfresco/dbscripts/create/2.2/org.alfresco.repo.domain.hiber
nate.dialect.AlfrescoSQLServerDialect/AlfrescoPostCreate-2.2-Extra.sql).
17:26:07,821 INFO  [domain.schema.SchemaBootstrap] All executed statements written to file o:\server
s\alfresco\tomcat\temp\Alfresco\AlfrescoSchemaUpdate-All_Statements-42331.sql.
17:26:13,415 ERROR [web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: Bootstrap failed
        at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:322)
        at org.alfresco.repo.importer.ImporterBootstrap.onBootstrap(ImporterBootstrap.java:650)
        at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)

        at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicati
onEventMulticaster.java:77)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(Simple
ApplicationEventMulticaster.java:75)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractAppli
cationContext.java:241)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicatio
nContext.java:349)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(
AbstractRefreshableWebApplicationContext.java:156)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.j
ava:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.jav
a:184)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderLis
tener.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)
Caused by: org.alfresco.repo.search.SearcherException: More than one root node in index: 2
        at org.alfresco.repo.search.impl.lucene.query.LeafScorer.initialise(LeafScorer.java:252)
        at org.alfresco.repo.search.impl.lucene.query.LeafScorer.<init>(LeafScorer.java:164)
        at org.alfresco.repo.search.impl.lucene.query.PathScorer.createPathScorer(PathScorer.java:16
7)
        at org.alfresco.repo.search.impl.lucene.query.PathQuery$StructuredFieldWeight.scorer(PathQue
ry.java:258)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:130)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:100)
        at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:66)
        at org.apache.lucene.search.Hits.<init>(Hits.java:45)
        at org.apache.lucene.search.Searcher.search(Searcher.java:45)
        at org.apache.lucene.search.Searcher.search(Searcher.java:37)
        at org.alfresco.repo.search.impl.lucene.ADMLuceneSearcherImpl.query(ADMLuceneSearcherImpl.ja
va:296)
        at org.alfresco.repo.search.SearcherComponent.query(SearcherComponent.java:85)
        at org.alfresco.repo.importer.ImporterComponent$NodeImporter.resolveImportedNodeRef(Importer
Component.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:224)
        at org.alfresco.repo.importer.ImporterBootstrap.doImport(ImporterBootstrap.java:422)
        at org.alfresco.repo.importer.ImporterBootstrap.access$000(ImporterBootstrap.java:71)
        at org.alfresco.repo.importer.ImporterBootstrap$1.execute(ImporterBootstrap.java:312)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransacti
onHelper.java:241)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransacti
onHelper.java:171)
        at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:318)
        … 35 more
17:26:13,415 ERROR [[Catalina].[localhost].[/alfresco]] Exception sending context initialized event
to listener instance of class org.springframework.web.context.ContextLoaderListener
org.alfresco.error.AlfrescoRuntimeException: Bootstrap failed
        at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:322)
        at org.alfresco.repo.importer.ImporterBootstrap.onBootstrap(ImporterBootstrap.java:650)
        at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)

        at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicati
onEventMulticaster.java:77)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(Simple
ApplicationEventMulticaster.java:75)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractAppli
cationContext.java:241)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicatio
nContext.java:349)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(
AbstractRefreshableWebApplicationContext.java:156)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.j
ava:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.jav
a:184)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderLis
tener.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)
Caused by: org.alfresco.repo.search.SearcherException: More than one root node in index: 2
        at org.alfresco.repo.search.impl.lucene.query.LeafScorer.initialise(LeafScorer.java:252)
        at org.alfresco.repo.search.impl.lucene.query.LeafScorer.<init>(LeafScorer.java:164)
        at org.alfresco.repo.search.impl.lucene.query.PathScorer.createPathScorer(PathScorer.java:16
7)
        at org.alfresco.repo.search.impl.lucene.query.PathQuery$StructuredFieldWeight.scorer(PathQue
ry.java:258)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:130)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:100)
        at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:66)
        at org.apache.lucene.search.Hits.<init>(Hits.java:45)
        at org.apache.lucene.search.Searcher.search(Searcher.java:45)
        at org.apache.lucene.search.Searcher.search(Searcher.java:37)
        at org.alfresco.repo.search.impl.lucene.ADMLuceneSearcherImpl.query(ADMLuceneSearcherImpl.ja
va:296)
        at org.alfresco.repo.search.SearcherComponent.query(SearcherComponent.java:85)
        at org.alfresco.repo.importer.ImporterComponent$NodeImporter.resolveImportedNodeRef(Importer
Component.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:224)
        at org.alfresco.repo.importer.ImporterBootstrap.doImport(ImporterBootstrap.java:422)
        at org.alfresco.repo.importer.ImporterBootstrap.access$000(ImporterBootstrap.java:71)
        at org.alfresco.repo.importer.ImporterBootstrap$1.execute(ImporterBootstrap.java:312)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransacti
onHelper.java:241)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransacti
onHelper.java:171)
        at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:318)
        … 35 more
17:26:13,415 ERROR [[Catalina].[localhost].[/alfresco]] Exception sending context initialized event
to listener instance of class org.alfresco.web.app.ContextListener
org.alfresco.error.AlfrescoRuntimeException: Bootstrap failed
        at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:322)
        at org.alfresco.repo.importer.ImporterBootstrap.onBootstrap(ImporterBootstrap.java:650)
        at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)

        at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicati
onEventMulticaster.java:77)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(Simple
ApplicationEventMulticaster.java:75)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractAppli
cationContext.java:241)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicatio
nContext.java:349)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(
AbstractRefreshableWebApplicationContext.java:156)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.j
ava:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.jav
a:184)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderLis
tener.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)
Caused by: org.alfresco.repo.search.SearcherException: More than one root node in index: 2
        at org.alfresco.repo.search.impl.lucene.query.LeafScorer.initialise(LeafScorer.java:252)
        at org.alfresco.repo.search.impl.lucene.query.LeafScorer.<init>(LeafScorer.java:164)
        at org.alfresco.repo.search.impl.lucene.query.PathScorer.createPathScorer(PathScorer.java:16
7)
        at org.alfresco.repo.search.impl.lucene.query.PathQuery$StructuredFieldWeight.scorer(PathQue
ry.java:258)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:130)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:100)
        at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:66)
        at org.apache.lucene.search.Hits.<init>(Hits.java:45)
        at org.apache.lucene.search.Searcher.search(Searcher.java:45)
        at org.apache.lucene.search.Searcher.search(Searcher.java:37)
        at org.alfresco.repo.search.impl.lucene.ADMLuceneSearcherImpl.query(ADMLuceneSearcherImpl.ja
va:296)
        at org.alfresco.repo.search.SearcherComponent.query(SearcherComponent.java:85)
        at org.alfresco.repo.importer.ImporterComponent$NodeImporter.resolveImportedNodeRef(Importer
Component.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:224)
        at org.alfresco.repo.importer.ImporterBootstrap.doImport(ImporterBootstrap.java:422)
        at org.alfresco.repo.importer.ImporterBootstrap.access$000(ImporterBootstrap.java:71)
        at org.alfresco.repo.importer.ImporterBootstrap$1.execute(ImporterBootstrap.java:312)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransacti
onHelper.java:241)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransacti
onHelper.java:171)
        at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:318)
        … 35 more
28-May-2008 17:26:13 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
28-May-2008 17:26:13 org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
28-May-2008 17:26:16 org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
28-May-2008 17:26:27 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
28-May-2008 17:26:27 org.apache.catalina.startup.Catalina start
INFO: Server startup in 52781 ms

I'm trying to connect to a database server on my local machine, I've enabled TCP access, have created a user called alfresco (password alfresco) and a database called alfresco which the alfresco user has db_owner permission on. Alfresco is able to connect to the database and create a large number of tables, so I reckon that this side of it is working.

My Alfresco repository configuration is:


db.username=alfresco
db.password=alfresco
db.pool.initial=10
db.pool.max=100
db.schema.update=true
db.driver=net.sourceforge.jtds.jdbc.Driver
db.url=jdbc:jtds:sqlserver://localhost:1433;DatabaseName=alfresco

And my Hibernate dialect is set to:

hibernate.dialect=org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect

I've placed the jtds-1.2.2.jar in tomcat/shared/libs

Does anyone have any ideas what I'm missing? I've also tried the Microsoft JDBC drivers, which also failed.

Thanks,
Sam.

Outcomes