Adding custom settings
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2006 03:37 PM
../jboss/server/default/conf/alfresco/extension
to make your config changes? I seen mentioned in the wiki about changing your custom setting to
etc/alfresco/config
and putting your changes there but I guess I am confused as to what I need to do to create the custom setting and have them looked up from there.
Thanks
T
- Labels:
-
Archive

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 04:28 AM
Basically any spring config file ending with -content.xml placed in the folder you mentioned will automatically get read in during startup.
If you place a file in there that overrides the bean that loads all the repository settings you can point to a custom repository.properties file. This means in the future, when you upgrade, you shouldn't need to make the same config changes again.
The following example will load a custom repository.properties file from /etc/alfresco/config.
<bean id="repository-properties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="ignoreUnresolvablePlaceholders"> <value>true</value> </property> <property name="locations"> <list> <value>classpath:alfresco/repository.properties</value> <value>classpath:alfresco/version.properties</value> <value>classpath:alfresco/domain/transaction.properties</value> <value>file:/etc/alfresco/config/repository.properties</value> <!– override core properties –> </list> </property> </bean>
Your /etc/alfresco/config/repository.properties file then only needs to have the alf_data property in it, for example:
dir.root=/srv/alfresco/data
Hope that helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2006 03:08 PM
ok I put in a file called core-services-context.xml
in the jboss/server/default/conf/alfresco/extension folder
and created a repository.properties file in /etc/alfresco/config
but I can't get the alfresco.war to load
Here are some highlights of the errors I get.
2006-03-23 09:35:51,237 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Line 1 in XML document from file [/home/alfresco/alfresco/jboss/server/default/conf/alfresco/extension/core-services-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Document root element "bean", must match DOCTYPE root "null".
org.xml.sax.SAXParseException: Document root element "bean", must match DOCTYPE root "null".
2006-03-23 09:35:52,037 ERROR [org.apache.catalina.core.StandardContext] Error listenerStart
2006-03-23 09:35:52,055 ERROR [org.apache.catalina.core.StandardContext] Context [/alfresco] startup failed due to previous errors
2006-03-23 09:35:52,093 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/alfresco]] Exception sending context destroyed event to listener instance of class org.alfresco.web.app.ContextListener
org.springframework.beans.factory.BeanDefinitionStoreException: Line 1 in XML document from file [/home/alfresco/alfresco/jboss/server/default/conf/alfresco/extension/core-services-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Document root element "bean", must match DOCTYPE root "null".
org.xml.sax.SAXParseException: Document root element "bean", must match DOCTYPE root "null".
2006-03-23 09:35:52,344 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/alfresco]] Closing Spring root WebApplicationContext
2006-03-23 09:35:52,399 WARN [org.jboss.system.ServiceController] Problem starting service jboss.web.deployment:war=alfresco.war,id=1437698285
org.jboss.deployment.DeploymentException: URL file:/home/alfresco/alfresco/jboss/server/default/tmp/deploy/tmp2696alfresco.war/ deployment failed
2006-03-23 09:35:54,116 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing:
— Incompletely deployed packages —
org.jboss.deployment.DeploymentInfo@55b188ed { url=file:/home/alfresco/alfresco/jboss/server/default/deploy/alfresco.war }
deployer: MBeanProxyExt[jboss.web:service=WebServer]
status: Deployment FAILED reason: URL file:/home/alfresco/alfresco/jboss/server/default/tmp/deploy/tmp2696alfresco.war/ deployment failed
state: FAILED
watch: file:/home/alfresco/alfresco/jboss/server/default/deploy/alfresco.war
altDD: null
lastDeployed: 1143142509916
lastModified: 1143142508000
mbeans:
— MBeans waiting for other MBeans —
ObjectName: jboss.web.deployment:war=alfresco.war,id=1437698285
State: FAILED
Reason: org.jboss.deployment.DeploymentException: URL file:/home/alfresco/alfresco/jboss/server/default/tmp/deploy/tmp2696alfresco.war/ deployment failed
— MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM —
ObjectName: jboss.web.deployment:war=alfresco.war,id=1437698285
State: FAILED
Reason: org.jboss.deployment.DeploymentException: URL file:/home/alfresco/alfresco/jboss/server/default/tmp/deploy/tmp2696alfresco.war/ deployment failed
Any help is appreciated
Thanks
T

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2006 05:01 PM
Try giving your file a name that doesn't clash with ours and see if that solves the errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2006 05:47 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2006 06:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2006 06:56 PM
<bean id="repository-properties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="ignoreUnresolvablePlaceholders">
<value>true</value>
</property>
<property name="locations">
<list>
<value>classpath:alfresco/repository.properties</value>
<value>classpath:alfresco/version.properties</value>
<value>classpath:alfresco/domain/transaction.properties</value>
<value>file:/etc/alfresco/config/repository.properties</value> <!– override core properties –>
</list>
</property>
</bean>
and created a repository.properties file in /etc/alfresco/config
with
dir.root=/home/alfresco/alfresco
am I supposed to change someing in the -context.xml file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2006 01:50 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2006 03:26 AM
OK, sorry, i should have been clearer, what i posted was just the body of the XML, you'll need the surrounding <beans> element too. I have posted what you should have below:
<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'><beans> <!– overriding to point to custom properties –> <bean id="repository-properties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="ignoreUnresolvablePlaceholders"> <value>true</value> </property> <property name="locations"> <list> <value>classpath:alfresco/repository.properties</value> <value>classpath:alfresco/version.properties</value> <value>classpath:alfresco/domain/transaction.properties</value> <value>file:/etc/alfresco/config/repository.properties</value> </list> </property> </bean></beans>
thaneshk,
/etc/alfresco/config is a unix style path, this is the standard place on linux to store configuration files. If you are using windows you can store them anywhere so yours maybe for example…
<value>file:c:/my-alfresco-config/repository.properties</value>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2006 11:04 PM
Cheers
