cancel
Showing results for 
Search instead for 
Did you mean: 

WAR install schemaBootstrap err on startup with Tomcat/MySQL

jason_botwick
Champ in-the-making
Champ in-the-making
Hi,

I'm trying to get Alfresco running on

    SuSE 10.1
    Tomcat 5
    MySQL 5.0.18
    mysql-connector-java-5.0.3-bin.jar (installed at /srv/www/tomcat5/base/common/lib; note the "base" directory is the tomcat root directory under the SuSE install)

# java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)

== start.log ==

Using CATALINA_BASE:   /srv/www/tomcat5/base
Using CATALINA_HOME:   /usr/share/tomcat5
Using CATALINA_TMPDIR: /srv/www/tomcat5/base/temp
Using JAVA_HOME:       /usr/lib/jvm/java (resolves eventually to /usr/lib/jvm/java-1.5.0-sun-1.5.0_06)

using the community WAR file, version 1.4.

I copied the contents of the extension directory provided in the WAR distribution to

/srv/www/tomcat5/base/shared/classes/alfresco/extension

and removed the .sample extension from the following files:

    custom-db-and-data-context.xml (no edit)
    custom-data-location.properties (no edit)
    custom-hibernate-dialect.properties (uncommented the MySQL dialect)
    custom-db-connection.properties (contents below)
== custom-db-connection.properties ==
db.name=alfresco
db.schema.update=true
db.username=alfresco
db.password=<a password>
db.pool.initial=10
db.pool.max=100
db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://localhost/alfresco

I created the database using the supplied script, verified the permissions and the MySQL connection parameters.

I've followed the scattered instructions and forum hints the best I can, but I'm still receiving the error below when I start Tomcat (other webapps run fine).

It appears to me as if it is trying to update database schema versions, before creating the database. I know the database is not created, because there are no tables in there. According to the wiki, this schemaBootstrap is supposed to detect whether there is an existing schema, and if not "take the appropriate action". It doesn't appear to be doing so. What am I missing?

Or maybe it just can't find the class referred to by bean "schemaUpdateScript-V1.4-1" (org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch)? I'm grasping at straws, because I can see that repository.class is in the WAR distribution, so I doubt that's it. But I have no idea.

Additional info: Earlier in this trial phase, I installed the full package install, and it started Alfresco up and ran, no problem. And other Tomcat webapps run. So, I don't think there's anything wrong with the non-Alfresco components or config, but obviously I'm missing some difference between the full installation and the WAR installation. Can someone point me in the right direction?

Thanks. Here's the top of the error trace (I can post more if it will help).


org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schemaBootstrap' defined in class path resource [alfresco/bootstrap-context.xml]: Can't resolve reference to bean 'patch.schemaUpdateScript-V1.4-1' while setting property 'applyUpdateScriptPatches[0]'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patch.schemaUpdateScript-V1.4-1' defined in file [/srv/www/tomcat5/base/webapps/alfresco/WEB-INF/classes/alfresco/patch/patch-services-context.xml]: Can't resolve reference to bean 'patchComponent' while setting property 'patchService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patchComponent' defined in file [/srv/www/tomcat5/base/webapps/alfresco/WEB-INF/classes/alfresco/patch/patch-services-context.xml]: Can't resolve reference to bean 'descriptorComponent' while setting property 'descriptorService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'descriptorComponent' defined in class path resource [alfresco/bootstrap-context.xml]: Can't resolve reference to bean 'systemBootstrap' while setting property 'systemBootstrap'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemBootstrap' defined in class path resource [alfresco/bootstrap-context.xml]: Can't resolve reference to bean 'importerComponent' while setting property 'importerService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'importerComponent' defined in class path resource [alfresco/import-export-context.xml]: Can't resolve reference to bean 'NodeService' while setting property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AuditMethodInterceptor' defined in class path resource [alfresco/public-services-context.xml]: Can't resolve reference to bean 'auditComponent' while setting property 'auditComponent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditComponent' defined in class path resource [alfresco/audit-services-context.xml]: Can't resolve reference to bean 'auditDao' while setting property 'auditDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditDao' defined in class path resource [alfresco/hibernate-context.xml]: Can't resolve reference to bean 'auditFileContentStore' while setting property 'contentStore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditFileContentStore' defined in class path resource [alfresco/audit-services-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.alfresco.repo.content.filestore.FileContentStore]; constructor threw exception; nested exception is org.alfresco.service.cmr.repository.ContentIOException: Failed to create store root: /srv/alfresco/data/audit.contentstore
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patch.schemaUpdateScript-V1.4-1' defined in file [/srv/www/tomcat5/base/webapps/alfresco/WEB-INF/classes/alfresco/patch/patch-services-context.xml]: Can't resolve reference to bean 'patchComponent' while setting property 'patchService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patchComponent' defined in file [/srv/www/tomcat5/base/webapps/alfresco/WEB-INF/classes/alfresco/patch/patch-services-context.xml]: Can't resolve reference to bean 'descriptorComponent' while setting property 'descriptorService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'descriptorComponent' defined in class path resource [alfresco/bootstrap-context.xml]: Can't resolve reference to bean 'systemBootstrap' while setting property 'systemBootstrap'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemBootstrap' defined in class path resource [alfresco/bootstrap-context.xml]: Can't resolve reference to bean 'importerComponent' while setting property 'importerService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'importerComponent' defined in class path resource [alfresco/import-export-context.xml]: Can't resolve reference to bean 'NodeService' while setting property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AuditMethodInterceptor' defined in class path resource [alfresco/public-services-context.xml]: Can't resolve reference to bean 'auditComponent' while setting property 'auditComponent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditComponent' defined in class path resource [alfresco/audit-services-context.xml]: Can't resolve reference to bean 'auditDao' while setting property 'auditDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditDao' defined in class path resource [alfresco/hibernate-context.xml]: Can't resolve reference to bean 'auditFileContentStore' while setting property 'contentStore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditFileContentStore' defined in class path resource [alfresco/audit-services-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.alfresco.repo.content.filestore.FileContentStore]; constructor threw exception; nested exception is org.alfresco.service.cmr.repository.ContentIOException: Failed to create store root: /srv/alfresco/data/audit.contentstore
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patchComponent' defined in file [/srv/www/tomcat5/base/webapps/alfresco/WEB-INF/classes/alfresco/patch/patch-services-context.xml]: Can't resolve reference to bean 'descriptorComponent' while setting property 'descriptorService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'descriptorComponent' defined in class path resource [alfresco/bootstrap-context.xml]: Can't resolve reference to bean 'systemBootstrap' while setting property 'systemBootstrap'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemBootstrap' defined in class path resource [alfresco/bootstrap-context.xml]: Can't resolve reference to bean 'importerComponent' while setting property 'importerService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'importerComponent' defined in class path resource [alfresco/import-export-context.xml]: Can't resolve reference to bean 'NodeService' while setting property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AuditMethodInterceptor' defined in class path resource [alfresco/public-services-context.xml]: Can't resolve reference to bean 'auditComponent' while setting property 'auditComponent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditComponent' defined in class path resource [alfresco/audit-services-context.xml]: Can't resolve reference to bean 'auditDao' while setting property 'auditDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditDao' defined in class path resource [alfresco/hibernate-context.xml]: Can't resolve reference to bean 'auditFileContentStore' while setting property 'contentStore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditFileContentStore' defined in class path resource [alfresco/audit-services-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.alfresco.repo.content.filestore.FileContentStore]; constructor threw exception; nested exception is org.alfresco.service.cmr.repository.ContentIOException: Failed to create store root: /srv/alfresco/data/audit.contentstore
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'descriptorComponent' defined in class path resource [alfresco/bootstrap-context.xml]: Can't resolve reference to bean 'systemBootstrap' while setting property 'systemBootstrap'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemBootstrap' defined in class path resource [alfresco/bootstrap-context.xml]: Can't resolve reference to bean 'importerComponent' while setting property 'importerService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'importerComponent' defined in class path resource [alfresco/import-export-context.xml]: Can't resolve reference to bean 'NodeService' while setting property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AuditMethodInterceptor' defined in class path resource [alfresco/public-services-context.xml]: Can't resolve reference to bean 'auditComponent' while setting property 'auditComponent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditComponent' defined in class path resource [alfresco/audit-services-context.xml]: Can't resolve reference to bean 'auditDao' while setting property 'auditDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditDao' defined in class path resource [alfresco/hibernate-context.xml]: Can't resolve reference to bean 'auditFileContentStore' while setting property 'contentStore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditFileContentStore' defined in class path resource [alfresco/audit-services-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.alfresco.repo.content.filestore.FileContentStore]; constructor threw exception; nested exception is org.alfresco.service.cmr.repository.ContentIOException: Failed to create store root: /srv/alfresco/data/audit.contentstore
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemBootstrap' defined in class path resource [alfresco/bootstrap-context.xml]: Can't resolve reference to bean 'importerComponent' while setting property 'importerService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'importerComponent' defined in class path resource [alfresco/import-export-context.xml]: Can't resolve reference to bean 'NodeService' while setting property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AuditMethodInterceptor' defined in class path resource [alfresco/public-services-context.xml]: Can't resolve reference to bean 'auditComponent' while setting property 'auditComponent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditComponent' defined in class path resource [alfresco/audit-services-context.xml]: Can't resolve reference to bean 'auditDao' while setting property 'auditDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditDao' defined in class path resource [alfresco/hibernate-context.xml]: Can't resolve reference to bean 'auditFileContentStore' while setting property 'contentStore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditFileContentStore' defined in class path resource [alfresco/audit-services-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.alfresco.repo.content.filestore.FileContentStore]; constructor threw exception; nested exception is org.alfresco.service.cmr.repository.ContentIOException: Failed to create store root: /srv/alfresco/data/audit.contentstore
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'importerComponent' defined in class path resource [alfresco/import-export-context.xml]: Can't resolve reference to bean 'NodeService' while setting property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AuditMethodInterceptor' defined in class path resource [alfresco/public-services-context.xml]: Can't resolve reference to bean 'auditComponent' while setting property 'auditComponent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditComponent' defined in class path resource [alfresco/audit-services-context.xml]: Can't resolve reference to bean 'auditDao' while setting property 'auditDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditDao' defined in class path resource [alfresco/hibernate-context.xml]: Can't resolve reference to bean 'auditFileContentStore' while setting property 'contentStore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditFileContentStore' defined in class path resource [alfresco/audit-services-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.alfresco.repo.content.filestore.FileContentStore]; constructor threw exception; nested exception is org.alfresco.service.cmr.repository.ContentIOException: Failed to create store root: /srv/alfresco/data/audit.contentstore
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AuditMethodInterceptor' defined in class path resource [alfresco/public-services-context.xml]: Can't resolve reference to bean 'auditComponent' while setting property 'auditComponent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditComponent' defined in class path resource [alfresco/audit-services-context.xml]: Can't resolve reference to bean 'auditDao' while setting property 'auditDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditDao' defined in class path resource [alfresco/hibernate-context.xml]: Can't resolve reference to bean 'auditFileContentStore' while setting property 'contentStore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditFileContentStore' defined in class path resource [alfresco/audit-services-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.alfresco.repo.content.filestore.FileContentStore]; constructor threw exception; nested exception is org.alfresco.service.cmr.repository.ContentIOException: Failed to create store root: /srv/alfresco/data/audit.contentstore
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditComponent' defined in class path resource [alfresco/audit-services-context.xml]: Can't resolve reference to bean 'auditDao' while setting property 'auditDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditDao' defined in class path resource [alfresco/hibernate-context.xml]: Can't resolve reference to bean 'auditFileContentStore' while setting property 'contentStore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditFileContentStore' defined in class path resource [alfresco/audit-services-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.alfresco.repo.content.filestore.FileContentStore]; constructor threw exception; nested exception is org.alfresco.service.cmr.repository.ContentIOException: Failed to create store root: /srv/alfresco/data/audit.contentstore
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditDao' defined in class path resource [alfresco/hibernate-context.xml]: Can't resolve reference to bean 'auditFileContentStore' while setting property 'contentStore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditFileContentStore' defined in class path resource [alfresco/audit-services-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.alfresco.repo.content.filestore.FileContentStore]; constructor threw exception; nested exception is org.alfresco.service.cmr.repository.ContentIOException: Failed to create store root: /srv/alfresco/data/audit.contentstore
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditFileContentStore' defined in class path resource [alfresco/audit-services-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.alfresco.repo.content.filestore.FileContentStore]; constructor threw exception; nested exception is org.alfresco.service.cmr.repository.ContentIOException: Failed to create store root: /srv/alfresco/data/audit.contentstore
org.springframework.beans.FatalBeanException: Could not instantiate class [org.alfresco.repo.content.filestore.FileContentStore]; constructor threw exception; nested exception is org.alfresco.service.cmr.repository.ContentIOException: Failed to create store root: /srv/alfresco/data/audit.contentstore
4 REPLIES 4

jason_botwick
Champ in-the-making
Champ in-the-making
Resolved:

Well, as it turns out, the key information was at the end of that huge error message, not at the beginning . . . I didn't realize that the data directory specified by dir.root had to be created on the filesystem manually.

Is that documented somewhere? I haven't been able to find it, but I might've missed it–searching capabilities on these forums and the wiki seem really poor.

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

Alfresco is supposed to create the dir.root path on the filesystem for you as long as it has the permissions to do so. Looks like it failed when trying to create it:
[org.alfresco.repo.content.filestore.FileContentStore]; constructor threw exception; nested exception is org.alfresco.service.cmr.repository.ContentIOException: Failed to create store root: /srv/alfresco/data/audit.contentstore

Were you running as a user other than root? If so, did the user have the appropriate permissions to create dir.root?

Regards,

–Aladdin

jason_botwick
Champ in-the-making
Champ in-the-making
I didn't think of that. The Tomcat server runs as the 'tomcat' user, and didn't have permissions to write to the directory where the dir.root was set to be created.

This might be a good thing to have in the install docs. In my case, the location where dir.root is going to be ploppped isn't allowed to be writable by 'tomcat' because of biziness rules; I'm sure there are other folks with similar constraints.

joseph_curtis_t
Champ in-the-making
Champ in-the-making
Resolved:

Well, as it turns out, the key information was at the end of that huge error message, not at the beginning . . . I didn't realize that the data directory specified by dir.root had to be created on the filesystem manually.

Is that documented somewhere? I haven't been able to find it, but I might've missed it–searching capabilities on these forums and the wiki seem really poor.

where did you create the directory.