2010-04-22 87 views
0

嗨我对Java完全陌生,很抱歉如果我的问题听起来有点愚蠢。ApplicationContext ctx = new FileSystemXmlApplicationContext错误

我正在关注一个关于hibernate的教程,我正试图从文件系统中获取上下文定义文件。

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

,但我得到以下错误:

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

任何想法是什么问题?

感谢

回答

2

你的ApplicationContext进口是错误 - 修复它,指向春天的ApplicationContext。 (目前,它来自Weld框架)。所以:

org.springframework.context.ApplicationContext 

,而不是

org.jboss.weld.context.ApplicationContext 
相关问题