1 Reply Latest reply on Jul 8, 2011 3:51 PM by marius.bogoevici

    beanRefFactory error

    mclairine

      hello guys,

       

      I'm a newbie, I deployed androMDA demo application in JBoss 5.1

      the deployment was success but when I open the application, there is an error :

       

       

      18:58:16,080 INFO  [STDOUT] 18:58:16,080 ERROR [SearchController:293] java.lang.RuntimeException: org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [beanRefFactoryEjb], from group with resource name [classpath*:beanRefFactory.xml]; nested exception is org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'beanRefFactoryEjb' must be of type [org.springframework.beans.factory.BeanFactory], but was actually of type [org.springframework.context.support.ClassPathXmlApplicationContext]

       

       

      my beanRefFactory.xml :

       

      <?xml version="1.0" encoding="UTF-8"?>

      <!-- Generated by: beanRefFactory.xml.vsl in andromda-spring-cartridge. -->

       

       

      <beans xmlns="http://www.springframework.org/schema/beans"

             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

             xmlns:lang="http://www.springframework.org/schema/lang"

             xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd">

       

       

          <bean id="beanRefFactory" class="org.springframework.context.support.ClassPathXmlApplicationContext">

              <constructor-arg>

                 <list>

                      <value>applicationContext.xml</value>

                      <value>applicationContext-dataSource.xml</value>

                      <!-- beanRefFactory merge-point -->

                 </list>

              </constructor-arg>

          </bean>

       

       

          <bean id="beanRefFactoryEjb"

               class="org.springframework.context.support.ClassPathXmlApplicationContext">

              <constructor-arg>

                 <list>

                      <value>applicationContext-localEjb.xml</value>

                      <!-- beanRefFactoryEjb merge-point -->

                 </list>

              </constructor-arg>

          </bean>

          <!-- beanRefFactoryEjbXml merge-point -->

       

       

      </beans>

       

       

       

      please help me.

      thanx