Hey all, could someone give me somehelp with the following error:
------------------------------
2004-04-30 16:56:23,673 [tcpConnection-6802-0] ERROR dining - EXCEPTION: net.sf.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of edu.udel.dining.beans.Screen1HPBean.setTermid
net.sf.hibernate.PropertyAccessException: exception setting property value with
CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter
of edu.udel.dining.beans.Screen1HPBean.setTermid
at net.sf.hibernate.persister.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:212)
at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2199)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:240)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
-----------------------------
I am trying to run a query:
session = HibernateSession.getSessionFactory().openSession(con);
tx = session.beginTransaction();
query = session.createQuery("from edu.udel.dining.beans.Screen1HPBean screen where screen.termid = 'ABC');
Iterator iter = query.iterate();
The query "should" return an object of type Screen1HPBean which contains:
String termid;
Set plans;
the Set plans, is a set of PlanBean objects
Here is my mapping file:
---------------------------
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping
PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping schema="web001" package="edu.udel.dining">
<class name="edu.udel.dining.beans.Screen1HPBean" table="dining_screenbean">
<id name="id">
<column name="id" unique="true" not-null="true" sql-type="char"
length="32" />
<generator class="uuid.hex"/>
</id>
<property name="termid" type="char">
<column name="termid" length="3" not-null="true" />
</property>
<set name="plans" lazy="true">
<key column="id" />
<one-to-many class="edu.udel.dining.beans.PlanBean" />
</set>
</class>
<class name="edu.udel.dining.beans.PlanBean" table="dining_planbean">
<id name="id" column="id">
<generator class="uuid.hex"/>
</id>
<property name="mealPlan" type="char" length="1"/>
<property name="blackBoard" type="string"/>
<property name="numberOfMeals" type="string"/>
<property name="semesterAmount" type="string"/>
<property name="pointsAmount" type="string"/>
<property name="traditionalOption" type="int"/>
<property name="nonTraditionalOption" type="int"/>
<property name="allowCancellations" type="int"/>
</class>
</hibernate-mapping>
--------------------------
Thanks for any help in advance,
Luis
|