cancel
Showing results for 
Search instead for 
Did you mean: 

application context xml

nanou
Champ in-the-making
Champ in-the-making
Hi,

I try to use the content repository, but I get an exception :

Caused by: java.io.FileNotFoundException: class path resource [classpath=alfresco/myContext.xml] cannot be opened because it does not exist
        at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:142)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
        … 14 more

my java code :
ApplicationContext context = new ClassPathXmlApplicationContext("classpath=alfresco/myContext.xml");
this.repository = (Repository)context.getBean("JCR.Repository");

I've tried many places, but unfortunetely none works.
Can you help me and explain me where to put this file.

Thanks.
2 REPLIES 2

rivetlogic
Champ on-the-rise
Champ on-the-rise
Try

"classpath:alfresco/myContext.xml"

or

"classpath*:alfresco/myContext.xml"



as your argument.

Regards,
Shagul

nanou
Champ in-the-making
Champ in-the-making
Thank you well! I just put an * and it works!

"classpath*:alfresco/myContext.xml"