Hi Matt, this is my applicationContext.xml:
*************************

<?xml version="1.0" encoding="UTF-8"?>
<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";
       xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
       http://www.springframework.org/schema/context 
http://www.springframework.org/schema/context/spring-context.xsd";
       default-lazy-init="true">

    <!-- Activates scanning of @Autowired -->
    <context:annotation-config/>

    <!-- Activates scanning of @Repository and @Service -->
    <context:component-scan base-package="com.sofandtech.steren"/>

    <!-- Add new DAOs here -->

    <!--FamiliaManager-START-->
    <bean id="familiaManager" 
class="org.appfuse.service.impl.GenericManagerImpl">
        <constructor-arg>
            <bean class="org.appfuse.dao.hibernate.GenericDaoHibernate">
                <constructor-arg value="com.sofandtech.steren.model.Familia"/>
            </bean>
        </constructor-arg>
    </bean>
    <!--FamiliaManager-END-->

    <!--SubFamiliaManager-START-->
    <bean id="subFamiliaManager" 
class="org.appfuse.service.impl.GenericManagerImpl">
        <constructor-arg>
            <bean class="org.appfuse.dao.hibernate.GenericDaoHibernate">
                <constructor-arg 
value="com.sofandtech.steren.model.SubFamilia"/>
            </bean>
        </constructor-arg>
    </bean>
    <!--SubFamiliaManager-END-->

    <!-- Add new Managers here -->
</beans>

From: m...@raibledesigns.com
Date: Mon, 7 Dec 2009 09:22:49 -0700
To: users@appfuse.dev.java.net
Subject: Re: [appfuse-user] BeanCreationException: Error creating bean with     
name 'XXXXXXXManager'

Can you please post your applicationContext.xml?

On Sun, Dec 6, 2009 at 10:27 PM, Mauricio Ortega Barrios 
<mauricio.ort...@hotmail.es> wrote:







Hi everyone, I'm getting this error, and I tried with versions 2.1.0-M1, 
2.1.0-M2-SNAPSHOT with the same result. Any comments?

Environment:

MacOSX 10.5.8 (Leopard)
Java 1.5.0_20-b02-315, Apache Maven 2.2.1

JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home

MAVEN_OPTS='-Xmx512m -XX:MaxPermSize=256m'

PATH=/sw/bin:/sw/sbin:/Applications/apache/apache-maven-2.2.1/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin



Steps:



1 mvn install appfuse:gen -Dentity=Familia 
2 mvn clean jetty:run-war (It worked!, Ok with some minor changes)
3 mvn install appfuse:gen -Dentity=SubFamilia 

4 mvn clean jetty:run-war ERROR (the following error with the same minor 
changes in step 2:)

The error: 
surefire-reports: FamiliaActionTest
-------------------
testSearch, testEdit, testSave, testRemove


+++++++
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'familiaManager' defined in file 
[/Users/mauricio/dev/steren210/target/test-classes/WEB-INF/applicationContext.xml]:
 Cannot create inner bean 
'org.appfuse.dao.hibernate.GenericDaoHibernate#b28f30' of type 
[org.appfuse.dao.hibernate.GenericDaoHibernate] while setting constructor 
argument; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'org.appfuse.dao.hibernate.GenericDaoHibernate#b28f30' defined in 
file 
[/Users/mauricio/dev/steren210/target/test-classes/WEB-INF/applicationContext.xml]:
 Initialization of bean failed; nested exception is 
org.springframework.beans.factory.BeanInitializationException: Property 
'sessionFactory' is required for bean 
'org.appfuse.dao.hibernate.GenericDaoHibernate#b28f30'


...
Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'org.appfuse.dao.hibernate.GenericDaoHibernate#b28f30' 
defined in file 
[/Users/mauricio/dev/steren210/target/test-classes/WEB-INF/applicationContext.xml]:
 Initialization of bean failed; nested exception is 
org.springframework.beans.factory.BeanInitializationException: Property 
'sessionFactory' is required for bean 
'org.appfuse.dao.hibernate.GenericDaoHibernate#b28f30'


....
Caused by: org.springframework.beans.factory.BeanInitializationException: 
Property 'sessionFactory' is required for bean 
'org.appfuse.dao.hibernate.GenericDaoHibernate#b28f30'
...
+++++++++


This are my Entities:

@Entity
public class Familia extends BaseObject {
    private static final long serialVersionUID = -5455064482216857393L;

    private Integer idFamilia;
    private String descripcion;



    @Id @GeneratedValue(strategy=GenerationType.AUTO)
    @Column(name="ID_FAMILIA")
    public Integer getIdFamilia() {
        return idFamilia;
    }

    public void setIdFamilia(Integer idFamilia) {


        this.idFamilia = idFamilia;
    }

    @Column(name="DESCRIPCION", length=60, nullable=false)
    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {


        this.descripcion = descripcion;
    }

...

@Entity
public class SubFamilia extends BaseObject {
    private static final long serialVersionUID = -7494045344113777394L;
    
    private Integer idSubFamilia;


    private String descripcion;
    
    @Id @GeneratedValue(strategy=GenerationType.AUTO)
    @Column(name="ID_SUBFAMILIA")
    public Integer getIdSubFamilia() {
        return idSubFamilia;


    }
    public void setIdSubFamilia(Integer idSubFamilia) {
        this.idSubFamilia = idSubFamilia;
    }
    
    @Column(name="DESCRIPCION", length=60, nullable=false)
    public String getDescripcion() {


        return descripcion;
    }
    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }





                                          
Cuida tu aguinaldo y tus cuentas bancarias, OTTO te enseña cómo.



                                          
_________________________________________________________________
Una nueva experiencia de búsqueda está aquí
http://www.bing.com/?mkt=es-MX&FORM=M006IR&Publ=WLHMTAG&Crea=TEXT_M006IR_Bing_ES_SaveTimeClicks_1X1

Reply via email to