Bonjours à tous,

Je souhaite externaliser les propriété de mon prjet dans un répertoire spécifique. J'ai donc essayé de paramétrer ceci en local :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
 
   <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <list>             
                <value>file:/c:/database.properties</value>
                <value>file:/c:/eloi.properties</value>     
            </list>
        </property>
    </bean>
Ceci marche très bien sur mon poste. J'éssay donc un déploiement sur un serveur linux, pour ce faire je change la configuration comme ceci :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
 
  <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <list>             
                <value>file://eloi/cfg/database.properties</value>
                <value>file://eloi/cfg/eloi.properties</value>     
            </list>
        </property>
    </bean>
La par contre ça ne marche plus et mon erreur est la suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
 
org.springframework.beans.factory.access.BootstrapException: Unable to initialize group definition. Group resource name [classpath*:beanRefContext.xml], factory key [projectContext]; 
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'projectContext' defined in URL [file:/opt/jakarta-tomcat-5.0.30/webapps/eloi/WEB-INF/classes/beanRefContext.xml]: Instantiation of bean failed; 
nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class 
[org.springframework.context.support.ClassPathXmlApplicationContext]: 
Constructor threw exception; nested exception is org.springframework.beans.factory.BeanInitializationException: 
Could not load properties; nested exception is java.net.UnknownHostException: eloi
        at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:389)
J'ai donc essayé de rajouter à la main le repertoire eloi/cfg dans le manifest comme ceci :

Class-Path: /eloi/cfg/




Mais rien y fais l'erreur est la même.

Auriez vous des idées? Merci.