views:

166

answers:

1

Hi I am completely new to Java, so sorry if my question may sound a bit stupid.

I am following a tutorial on hibernate and i am trying to get the context definition files from the file system.

ApplicationContext ctx  = new FileSystemXmlApplicationContext(
        new String[] { "conf/rssWebApplication-services.xml",
        "conf/rssWebApplication-data-hibernate.xml" });

But i get the following error:

found   : org.springframework.context.support.FileSystemXmlApplicationContext
required: org.jboss.weld.context.ApplicationContext
        ApplicationContext ctx  = new FileSystemXmlApplicationContext(
                new String[] { "conf/rssWebApplication-services.xml",

Any idea what is the problem?

Thanks

+1  A: 

Your import of ApplicationContext is wrong - fix it, to point to spring's ApplicationContext. (Currently, it is from the Weld framework). So:

org.springframework.context.ApplicationContext

instead of

org.jboss.weld.context.ApplicationContext 
Bozho