无法在JDeveloper 12c中读取Spring Bean配置文件

时间:2018-06-18 07:09:07

标签: spring oracle-adf jdeveloper spring-jms

我在我的项目中使用JDeveloper 12c。我的项目中也有ADF,所以我必须使用JDeveloper 12c.I我在我的ADF应用程序中集成了spring jms模块,具有以下spring依赖性:

 <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    <version>5.0.6.RELEASE</version>
    <type>jar</type>
    <scope>compile</scope>
 </dependency>
<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-tx</artifactId>
  <version>5.0.6.RELEASE</version>
  <type>jar</type>
  <scope>compile</scope>
</dependency>
<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-web</artifactId>
  <version>5.0.6.RELEASE</version>
  <type>jar</type>
  <scope>compile</scope>
</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-jms</artifactId>
    <version>5.0.6.RELEASE</version>
</dependency>

请在下面找到我的applicationContext.xml文件:

  <?xml version="1.0" encoding="windows-1252" ?>
  <beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xmlns:context="http://www.springframework.org/schema/context"
         xmlns:jee="http://www.springframework.org/schema/jee" 
         xmlns:tx="http://www.springframework.org/schema/tx"
         xmlns:jms="http://www.springframework.org/schema/jms"
         xsi:schemaLocation="http://www.springframework.org/schema/jms 
         http://www.springframework.org/schema/jms/spring-jms.xsd
         http://www.springframework.org/schema/jee 
         http://www.springframework.org/schema/jee/spring-jee.xsd
         http://www.springframework.org/schema/beans 
         http://www.springframework.org/schema/beans/spring-beans.xsd
         http://www.springframework.org/schema/context 
         http://www.springframework.org/schema/context/spring-context.xsd
         http://www.springframework.org/schema/tx 
         http://www.springframework.org/schema/tx/spring-tx.xsd">

        <jee:jndi-lookup id="userConnectionFactory" jndi-name="jms/usappFactory"
         expected-type="javax.jms.ConnectionFactory" />

        <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate" />

        <bean id="jmsDestinationResolver" class="org.springframework.jms.support.destination.JndiDestinationResolver">
             <property name="jndiTemplate" ref="jndiTemplate"/>
             <property name="cache" value="true"/>
        </bean>

        <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
            <property name="connectionFactory" ref="userConnectionFactory" />
            <property name="destinationResolver" ref="jmsDestinationResolver"/>
            <property name="messageConverter" ref="messageConverter" />
       </bean>

       <bean id="messageConverter"
class="org.springframework.jms.support.converter.MappingJackson2MessageConverter">
          <property name="targetType" value="TEXT" />
       </bean>
    </beans>

我的web.xml更新了以下与spring相关的配置:

<context-param>
   <param-name>contextConfigLocation</param-name>
   <param-value>/WEB-INF/spring/applicationContext.xml</param-value>
</context-param>

 <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

在部署期间,它在weblogic控制台中出现以下错误:

    org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 10 in XML document from ServletContext resource [/WEB- INF/spring/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 100; <Line 10, Column 100>: XML-24500: (Error) Can not build schema 'http://www.springframework.org/schema/beans' located at 'http://www.springframework.org/schema/beans/spring-beans.xsd'

我省略了xsd版本,因为版本也有同样的错误。

有人能解决这个问题吗?

0 个答案:

没有答案