hybox / aws

AWS CloudFormation templates for the Hydra-in-a-Box application stack
Apache License 2.0
24 stars 13 forks source link

Unusual values for fcrepo.object.directory and fcrepo.binary.directory #140

Closed mbklein closed 7 years ago

mbklein commented 7 years ago

This is going to be fixed (eventually) by #121 anyway, but the fcrepo file-simple configuration is getting some weird ideas about where its object and binary directories are. I can't figure out where those values are coming from; they're different from the defaults in file-simple/repository.json and I don't see them having been overridden anywhere.

INFO 02:57:22.847 (ModeShapeRepositoryFactoryBean) Using repo config (classpath): file:/var/lib/tomcat8/webapps/ROOT/WEB-INF/classes/config/file-simple/repository.json
INFO 02:57:22.851 (DefaultPropertiesLoader) Loading properties
INFO 02:57:22.851 (DefaultPropertiesLoader) com.arjuna.ats.arjuna.common.ObjectStoreEnvironmentBean.default.objectStoreDir = /usr/share/tomcat8/fcrepo4-data/com.arjuna.ats.arjuna.common.ObjectStoreEnvironmentBean.default.objectStoreDir
INFO 02:57:22.851 (DefaultPropertiesLoader) com.arjuna.ats.arjuna.objectstore.objectStoreDir = /usr/share/tomcat8/fcrepo4-data/com.arjuna.ats.arjuna.objectstore.objectStoreDir
INFO 02:57:22.851 (DefaultPropertiesLoader) fcrepo.object.directory = /usr/share/tomcat8/fcrepo4-data/fcrepo.object.directory
INFO 02:57:22.851 (DefaultPropertiesLoader) fcrepo.binary.directory = /usr/share/tomcat8/fcrepo4-data/fcrepo.binary.directory
INFO 02:57:22.851 (DefaultPropertiesLoader) fcrepo.modeshape.index.directory = /usr/share/tomcat8/fcrepo4-data/fcrepo.modeshape.index.directory
INFO 02:57:22.851 (DefaultPropertiesLoader) fcrepo.activemq.directory = /usr/share/tomcat8/fcrepo4-data/fcrepo.activemq.directory
WARN 02:57:23.516 (XmlWebApplicationContext) Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'modeshapeRepofactory': Invocation of init method failed; nested exception is org.fcrepo.kernel.api.exception.RepositoryRuntimeException: org.modeshape.persistence.file.FileProviderException: java.nio.file.AccessDeniedException: /usr/share/tomcat8/fcrepo4-data
ERROR 02:57:23.520 (ContextLoader) Context initialization failed
mbklein commented 7 years ago

Now that I dig in further, it appears the values are coming from fcrepo's DefaultPropertyLoader. I'm leaving this issue open while I look into the "access denied" issues, but the properties at least make sense now.

mbklein commented 7 years ago

This is definitely a directory permissions issue. I can only assume it's the result of the updated Tomcat 8 Solution Stack. Making it work reliably would require adding a pre-deployment script, which involves adding an .ebextensions directory to the root of the warfile. It probably makes more sense to forget about file-simple persistence and proceed with #121.