我的任务是将应用程序从WAS 6.1迁移到WAS 8.5。该应用程序是使用CXF 2.2.7,Spring 2.5.6和Hibernate 3.2.x开发的。
我已经将Spring的版本更改为4.1.x,将CXF的版本更改为3.2.0,以便能够在WAS 8.5中使用Java 8运行它。
我们收到以下错误:
Error 500: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 20 in XML document from class path resource [Meta-INF/cxf/cxf.xml] is invalid;
nested exception is org.xml.sax.SAXParseException: cvc-elt.1:
Cannot find the declaration of element 'beans'.
此cxf.xml文件存在于cxf-core.jar中,我们不编辑此文件。
特定于应用程序的bean在config XML文件中定义,并且这些文件是从web.xml文件引用的,并且位于/path/to/was_8.5/appserver/profiles/profile_name/properties/config/目录:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:Meta-INF/cxf/cxf.xml
classpath:/path/to/was_8.5/appserver/profiles/profile_name/properties/config/commonBeans.xml
</param-value>
</context-param>
我是否正确理解此错误,因为CXF库无法找到/path/to/was_8.5/appserver/profiles/profile_name/properties/config/commonBeans.xml文件?