【发布时间】:2010-11-24 11:49:37
【问题描述】:
我尝试将 iReport 与使用 spring xml 配置文件加载的休眠连接一起使用。
因此,在 netbeans 向导中,我选择新数据源并选择“弹簧加载的 Hibernate 集合”。 我设置了我的 xml spring 文件,但是当我点击测试时我有这个异常:
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/spring.cfg.xml]; nested exception is org.springframework.beans.FatalBeanException: NamespaceHandler class [org.springframework.context.config.ContextNamespaceHandler] for namespace [http://www.springframework.org/schema/context] not found; nested exception is java.lang.ClassNotFoundException: org.springframework.context.config.ContextNamespaceHandler
spring xml 没问题,因为在应用程序中效果很好,问题是当我尝试在 netbeans 插件中将它用于 iRepor 时。
关于jasper报告使用hibernate和spring的文档非常非常少。
编辑 我在 Tools->Options->iReport->classpath 中添加了所有spring-dependance jar(我指的是netbeans,这完全没有记录......)最后似乎加载了上下文,但现在我有这个异常:
WARNING [org.netbeans.ProxyClassLoader]: Will not load class org.springframework.beans.factory.xml.NamespaceHandlerSupport arbitrarily from one of ModuleCL@10eaeda[com.jaspersoft.ireport] and ModuleCL@19e3bdd[org.netbeans.libs.springframework] starting from SystemClassLoader[569 modules]; see http://wiki.netbeans.org/DevFaqModuleCCE
WARNING [org.netbeans.ProxyClassLoader]: Will not load class org.springframework.beans.factory.xml.NamespaceHandler arbitrarily from one of ModuleCL@10eaeda[com.jaspersoft.ireport] and ModuleCL@19e3bdd[org.netbeans.libs.springframework] starting from SystemClassLoader[569 modules]; see http://wiki.netbeans.org/DevFaqModuleCCE
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/spring.cfg.xml]; nested exception is org.springframework.beans.FatalBeanException: Class [org.springframework.context.config.ContextNamespaceHandler] for namespace [http://www.springframework.org/schema/context] does not implement the [org.springframework.beans.factory.xml.NamespaceHandler] interface
我认为这只是 netbeans 插件的问题,我可以做任何事情:(
谢谢。
【问题讨论】: