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.<http://www.ie8.com.mx> >