cancel
Showing results for 
Search instead for 
Did you mean: 

shared-properties configuration

ale_carraro
Champ in-the-making
Champ in-the-making
The problem I'm trying to resolve is (maybe) hard, however the step I got blocked into should not be….

I'm trying to deploy more than instance in the same server.
After cloning the war, the config directory, the alf_data directory,   I'm getting the following error:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverConnector' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is java.io.IOException: Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi]
java.io.IOException: Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi]
   at javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:814)……..
I'm trying to redefine the port used, that is defined in file alfresco-shared.properties. I dropped the modified file in {tomcat-dir}/shared/classes/alfresco2/extension/ but the error does not disappear (so I suppose new port definition isn't loaded)

I've tried also to replicate the bean definition that loads that property file, core-services-context.xml, containing the following:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!– Core and miscellaneous bean definitions –>
<beans>
    <!– Load properties that must be shared between the        –>
    <!– Alfresco server and its remote clients.                –>
    <!–                                                        –>
    <!– Note:  This is done in a seperate bean to make it      –>
    <!–        for users who have alrady overridden their      –>
    <!–        "repository-properties" in a dev-context.xml    –>
    <!–        or custom-db-and-data-context.xml file.         –>
    <bean id="shared-properties"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="ignoreUnresolvablePlaceholders">
            <value>true</value>
        </property>
        <property name="locations">
            <list>
                <value>classpath:alfresco/alfresco-shared.properties</value>
            </list>
        </property>
    </bean>
</beans>
What I'm missing?

p.s. I don't need jmx, so helping me in disabling it is enough.. :wink:
1 REPLY 1

ale_carraro
Champ in-the-making
Champ in-the-making
I found that extension are loaded from <tomcat_home>/shared/classes/alfresco/extension even if the web application name is not alfresco (in my deployment it is alfresco2).

Is there a way to set the classpath as <tomcat_home>/shared/classes/<alfresco_webapp_name>/extension ?


I noticed that main configuration is defined in this way:
<import resource="classpath*:alfresco/extension/*-context.xml"/>
Is it possible to write it as
<import resource="classpath*:${alfresco}/extension/*-context.xml"/>