我有以下 xml。遗留:xml(无法更改,因为它是外部化的)。
<bean id="oracleLobHandler" class="org.springframework.jdbc.support.lob.OracleLobHandler" lazy-init="true">
<property name="nativeJdbcExtractor" ref="dbcpJdbcExtractor"/>
</bean>
<!-- LobHandler for well-behaved JDBC drivers -->
<!-- (simply delegating to corresponding PreparedStatement and ResultSet methods) -->
<bean id="defaultLobHandler" class="org.springframework.jdbc.support.lob.DefaultLobHandler" lazy-init="true"/>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="defaultDataSource"/>
</bean>
<bean id="dbcpJdbcExtractor" class="org.springframework.jdbc.support.nativejdbc.CommonsDbcpNativeJdbcExtractor"
lazy-init="true"/>
</beans>
违规代码:
BeanFactory getBeanFactory() {
new XmlBeanFactory(new ClassPathResource("/META-INF/beans.xml"));
}
日志:org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68) org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85) org.springframework.beans.factory。 parsing.ReaderContext.error(ReaderContext.java:76) org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:245) org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java: 196)
怎么了?顺便说一句,我在使用 spring 1.2 时从未遇到过问题。