-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: PropertyNotFoundException - memory size problem?
PostPosted: Fri May 07, 2004 1:57 pm 
Newbie

Joined: Fri May 07, 2004 1:07 pm
Posts: 4
I am getting the stack trace below after adding a couple more classes to my property mapping file.
The error is not in the new classes, but in a class above them that has always worked before.
Additionally, if I turn on DEBUG level tracing, the PropertyNotFoundException occurs on a *different* property higher up the mapping file.

This causes me to think there is a memory allocation problem somewhere, but I'll be darned if I can figure out where after looking at the hibernate code. The class and properties are getting mapped according to the DEBUG comments, but the actual java class isn't getting created with the correct getters, and is therefore not found on reflection.

Removing the new classes causes this problem to go away.
Leaving the new classes in, but removing some old (working) classes at the top of the mapping file *also* causes this problem to go away.
Have I hit some limit somehwere? If so, where? (I've increased JVM heap size as well)

Question: Any ideas on how to resolve this??
_______________________________

HIBERNATE VERSION
2.1.2

DB
MySQL 4.1.1-1
_________________________

ERROR
Code:
net.sf.hibernate.PropertyNotFoundException: Could not find a getter for recipients in class jdo.Message
        at net.sf.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:182)
        at net.sf.hibernate.mapping.Property.getGetter(Property.java:179)
        at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:734)
        at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:715)
        at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:41)
        at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:137)
        at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:750)
        at com.telehealth.schema.util.HibernateLoader.getSessionFactory(HibernateLoader.java:91)

____________________________________
Mapping snippet

Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<!-- ...about 50 classes skipped -->
<subclass name="jdo.Message" proxy="jdo.Message">
<property name="shorttext" column="f_shorttext" type="string" length="255" />
<property name="createdbyobjectclass" column="f_createdbyobjectclass" type="string" />
<property name="createdbydobjectid" column="f_createdbydobjectid" type="string" length="32" />
<set name="recipients" inverse="true" lazy="true">
<key column="message_id" />
<one-to-many class="jdo.Recipientrel" />
</set>
</subclass>

___________________
Java class

Code:
package jdo;
public class Message extends Libraryentry
{
public Message ()
{
super();
}
...

public java.util.Collection c_recipients = new java.util.HashSet();

public void setRecipients(java.util.Collection recipients) {
this.c_recipients = recipients;
}
public java.util.Collection getRecipients() { return this.c_recipients; }
public void addRecipients(jdo.Recipientrel recipients) {
this.c_recipients.add(recipients);
recipients.setMessage(this);
}


__________________________
Configuration stuff
Code:
         {
             /* Old way
            Datastore hibernateDataStore = Hibernate.createDatastore();
            hibernateDataStore.storeResource("telehealth-hibernate.hbm.xml", HibernateLoader.class.getClassLoader());

            s_factory = hibernateDataStore.buildSessionFactory();
*/
             Configuration cfg = new Configuration();
             cfg.addResource("telehealth-hibernate.hbm.xml", HibernateLoader.class.getClassLoader());
             Properties hibernateProperties = new Properties();
              hibernateProperties.load(HibernateLoader.class.getClassLoader().getResourceAsStream("hibernate.properties"));
                  cfg.addProperties(hibernateProperties);

             s_factory = cfg.buildSessionFactory();

          }
          catch (MappingException me)
          {
            me.printStackTrace();
          }
          catch (HibernateException he)
          {
            he.printStackTrace();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }

          s_initialized = true;
          return s_factory;
        }

_____________________________
DEBUG log

/usr/java/jdk/bin/java -classpath build/classes/site:.:/usr/java/jboss/client/log4j.jar:src/schema3/output/lib/schema-generator.jar:src/schema3/output/lib/telehealth-jdo.jar:lib/site/batik.jar:lib/site/bcel.jar:lib/site/com-darwinsys-util.jar:lib/site/jcommon-0.9.1.jar:lib/site/jdom-b8.jar:lib/site/jfreechart-0.9.16.jar:lib/site/Opta2000.jar:lib/site/velocity-dep-1.3.1.jar:/usr/java/tomcat/shared/lib/ant-1.5.3.jar:/usr/java/tomcat/shared/lib/ant-optional-1.5.3.jar:/usr/java/tomcat/shared/lib/c3p0-0.8.3.jar:/usr/java/tomcat/shared/lib/cglib-2.0-rc2.jar:/usr/java/tomcat/shared/lib/com-darwinsys-util.jar:/usr/java/tomcat/shared/lib/commons-collections-2.1.jar:/usr/java/tomcat/shared/lib/commons-dbcp-1.1.jar:/usr/java/tomcat/shared/lib/commons-fileupload-1.0.jar:/usr/java/tomcat/shared/lib/commons-lang-1.0.1.jar:/usr/java/tomcat/shared/lib/commons-logging-1.0.3.jar:/usr/java/tomcat/shared/lib/commons-pool-1.1.jar:/usr/java/tomcat/shared/lib/concurrent-1.3.2.jar:/usr/java/tomcat/shared/lib/connector.jar:/usr/java/tomcat/shared/lib/dom4j-1.4.jar:/usr/java/tomcat/shared/lib/ehcache-0.6.jar:/usr/java/tomcat/shared/lib/hibernate2.jar:/usr/java/tomcat/shared/lib/jaas.jar:/usr/java/tomcat/shared/lib/jboss-cache.jar:/usr/java/tomcat/shared/lib/jboss-common.jar:/usr/java/tomcat/shared/lib/jboss-jmx.jar:/usr/java/tomcat/shared/lib/jboss-system.jar:/usr/java/tomcat/shared/lib/jcs-1.0-dev.jar:/usr/java/tomcat/shared/lib/jdbc2_0-stdext.jar:/usr/java/tomcat/shared/lib/jgroups-2.2.jar:/usr/java/tomcat/shared/lib/jta.jar:/usr/java/tomcat/shared/lib/junit-3.8.1.jar:/usr/java/tomcat/shared/lib/log4j-1.2.8.jar:/usr/java/tomcat/shared/lib/mysql-connector-java-3.0.11-stable-bin.jar:/usr/java/tomcat/shared/lib/odmg-3.0.jar:/usr/java/tomcat/shared/lib/Opta2000.jar:/usr/java/tomcat/shared/lib/oscache-2.0.jar:/usr/java/tomcat/shared/lib/proxool-0.8.3.jar:/usr/java/tomcat/shared/lib/swarmcache-1.0rc2.jar:/usr/java/tomcat/shared/lib/xalan-2.4.0.jar:/usr/java/tomcat/shared/lib/xerces-2.4.0.jar:/usr/java/tomcat/shared/lib/xml-apis.jar com.telehealth.server.reminder.EventServer
12:38:02,639 [main] INFO [reminder.EventServer] EventServer started.
12:38:02,645 [main] INFO [reminder.EventServer] ReminderThread starting for interval start=11:38 end=12:42
12:38:02,745 [main] INFO [reminder.EventServer] AlertThread starting at 12:38, covering past 60 minutes
12:38:03,015 [ReminderThread-2] INFO [cfg.Environment] Hibernate 2.1.2
12:38:03,112 [ReminderThread-2] INFO [cfg.Environment] loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=com.mysql.jdbc.Driver, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.jdbc.use_streams_for_binary=true, hibernate.jdbc.batch_size=0, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.query.imports=net.sf.hibernate.test, hibernate.connection.username=hivoprod, hibernate.connection.url=jdbc:mysql://127.0.0.1:3306/hivoprod?autoReconnect=true, hibernate.show_sql=false, hibernate.connection.password=hivoprod, hibernate.connection.pool_size=10}
12:38:03,118 [ReminderThread-2] INFO [cfg.Environment] using java.io streams to persist binary types
12:38:03,266 [ReminderThread-2] INFO [cfg.Environment] using CGLIB reflection optimizer
12:38:03,279 [ReminderThread-2] INFO [cfg.Configuration] Mapping resource: telehealth-hibernate.hbm.xml
12:38:04,257 [ReminderThread-2] DEBUG [util.DTDEntityResolver] trying to locate http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath under net/sf/hibernate/
12:38:04,260 [ReminderThread-2] DEBUG [util.DTDEntityResolver] found http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath
12:38:05,098 [ReminderThread-2] INFO [cfg.Binder] Mapping class: jdo.Patient -> patient_t
12:38:05,328 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: id -> id, type: string
12:38:05,440 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: gender -> f_gender, type: integer
12:38:05,441 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: dob -> f_dob, type: timestamp
12:38:05,441 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: maritalstatus -> f_maritalstatus, type: integer
12:38:05,513 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: ssn -> f_ssn, type: string
12:38:05,514 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: race -> f_race, type: string
12:38:05,514 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: emergencycontactname -> f_emergencycontactname, type: string
12:38:05,587 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: emergencycontactrelationship -> f_emergencycontactrelationship, type: string
12:38:05,685 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: picture -> picture_id, type: jdo.Multimedia
12:38:05,691 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: contactinfo -> contactinfo_id, type: jdo.Contact
12:38:05,779 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: user -> user_id, type: jdo.User
12:38:05,967 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: patientids, type: java.util.Set
12:38:05,971 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: mailingaddress -> mailingaddress_id, type: jdo.Address
12:38:06,056 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: employerinfo -> employerinfo_id, type: jdo.Employer
12:38:06,140 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: insuranceinfo, type: java.util.Set
12:38:06,221 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: emergencycontactinfo -> emergencycontactinfo_id, type: jdo.Contact
12:38:06,385 [ReminderThread-2] INFO [cfg.Binder] Mapping class: jdo.Remotereading -> remotereading_t
12:38:06,386 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: id -> id, type: string
12:38:06,386 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: patientid -> f_patientid, type: string
12:38:06,460 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: patientack -> f_patientack, type: boolean
12:38:06,460 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: result -> f_result, type: string
12:38:06,461 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: readingnumber -> f_readingnumber, type: integer
12:38:06,461 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: readingtype -> f_readingtype, type: string
<snip> <about 40 classes snipped here...>

12:38:22,626 [ReminderThread-2] INFO [cfg.Binder] Mapping subclass: jdo.Message -> lifecycle_t
12:38:22,698 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: shorttext -> f_shorttext, type: string
12:38:22,699 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: createdbyobjectclass -> f_createdbyobjectclass, type: string
12:38:22,699 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: createdbydobjectid -> f_createdbydobjectid, type: string
12:38:22,701 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: recipients, type: java.util.Set
12:38:22,774 [ReminderThread-2] INFO [cfg.Binder] Mapping subclass: jdo.Video -> lifecycle_t
12:38:22,858 [ReminderThread-2] INFO [cfg.Binder] Mapping subclass: jdo.Image -> lifecycle_t
12:38:22,941 [ReminderThread-2] DEBUG [cfg.Binder] Mapped property: type -> f_type, type: integer
12:38:23,100 [ReminderThread-2] DEBUG [cfg.Binder] Mapped

<snip>

12:38:29,929 [ReminderThread-2] INFO [cfg.Configuration] processing one-to-many association mappings
12:38:29,930 [ReminderThread-2] DEBUG [cfg.Binder] Second pass for collection: jdo.Patient.patientids
<snip>

12:38:30,204 [ReminderThread-2] DEBUG [cfg.Binder] Second pass for collection: jdo.Message.recipients
12:38:30,204 [ReminderThread-2] INFO [cfg.Binder] Mapping collection: jdo.Message.recipients -> lifecycleassociation_t
12:38:30,205 [ReminderThread-2] DEBUG [cfg.Binder] Mapped collection key: message_id, one-to-many: jdo.Recipientrel

<snip>

12:38:31,306 [ReminderThread-2] INFO [cfg.Configuration] processing one-to-one association property references
12:38:31,307 [ReminderThread-2] INFO [cfg.Configuration] processing foreign key constraints
12:38:31,308 [ReminderThread-2] DEBUG [cfg.Configuration] resolving reference to class: jdo.Organization
12:38:31,381 [ReminderThread-2] DEBUG [cfg.Configuration] resolving reference to class: jdo.Patient
<snip>

12:38:32,103 [ReminderThread-2] DEBUG [cfg.Configuration] resolving reference to class: jdo.Message
12:38:32,103 [ReminderThread-2] DEBUG [cfg.Configuration] resolving reference to class: jdo.Survey
<snip>

12:38:32,810 [ReminderThread-2] INFO [dialect.Dialect] Using dialect: net.sf.hibernate.dialect.MySQLDialect
12:38:32,898 [ReminderThread-2] INFO [cfg.SettingsFactory] Use outer join fetching: true
12:38:32,912 [ReminderThread-2] INFO [connection.DriverManagerConnectionProvider] Using Hibernate built-in connection pool (not for production use!)
12:38:32,994 [ReminderThread-2] INFO [connection.DriverManagerConnectionProvider] Hibernate connection pool size: 10
12:38:33,167 [ReminderThread-2] INFO [connection.DriverManagerConnectionProvider] using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://127.0.0.1:3306/hivoprod?autoReconnect=true
12:38:33,168 [ReminderThread-2] INFO [connection.DriverManagerConnectionProvider] connection properties: {user=hivoprod, password=hivoprod}
12:38:33,257 [ReminderThread-2] INFO [transaction.TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
12:38:33,258 [ReminderThread-2] DEBUG [connection.DriverManagerConnectionProvider] total checked-out connections: 0
12:38:33,258 [ReminderThread-2] DEBUG [connection.DriverManagerConnectionProvider] opening new JDBC connection
12:38:33,670 [ReminderThread-2] DEBUG [connection.DriverManagerConnectionProvider] created connection to: jdbc:mysql://127.0.0.1:3306/hivoprod?autoReconnect=true, Isolation Level: 4
12:38:33,673 [ReminderThread-2] DEBUG [connection.DriverManagerConnectionProvider] returning connection to pool, pool size: 1
12:38:33,832 [ReminderThread-2] INFO [cfg.SettingsFactory] Use scrollable result sets: true
12:38:33,832 [ReminderThread-2] INFO [cfg.SettingsFactory] Use JDBC3 getGeneratedKeys(): true
12:38:33,833 [ReminderThread-2] INFO [cfg.SettingsFactory] Optimize cache for minimal puts: false
12:38:33,833 [ReminderThread-2] INFO [cfg.SettingsFactory] Query language substitutions: {no='N', true=1, yes='Y', false=0}
12:38:33,902 [ReminderThread-2] INFO [cfg.SettingsFactory] cache provider: net.sf.ehcache.hibernate.Provider
12:38:33,911 [ReminderThread-2] INFO [cfg.Configuration] instantiating and configuring caches
12:38:34,300 [ReminderThread-2] INFO [impl.SessionFactoryImpl] building session factory
12:38:34,302 [ReminderThread-2] DEBUG [impl.SessionFactoryImpl] instantiating session factory with properties: {java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, hibernate.connection.password=hivoprod, sun.boot.library.path=/usr/java/j2sdk1.4.2_03/jre/lib/i386, java.vm.version=1.4.2_03-b02, hibernate.connection.username=hivoprod, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=:, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=US, sun.os.patch.level=unknown, java.vm.specification.name=Java Virtual Machine Specification, user.dir=/home/mmccown/dev/hivo/hivoweb, java.runtime.version=1.4.2_03-b02, java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment, java.endorsed.dirs=/usr/java/j2sdk1.4.2_03/jre/lib/endorsed, os.arch=i386, java.io.tmpdir=/tmp, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., os.name=Linux, sun.java2d.fontpath=, java.library.path=/usr/java/j2sdk1.4.2_03/jre/lib/i386/client:/usr/java/j2sdk1.4.2_03/jre/lib/i386:/usr/java/j2sdk1.4.2_03/jre/../lib/i386:/noroot/lib:/home/mmccown/image/ImageMagick/lib:/usr/java/jdk/jre/lib/i386:/home/mmccown/image/ImageMagick/lib, java.specification.name=Java Platform API Specification, java.class.version=48.0, hibernate.connection.pool_size=10, java.util.prefs.PreferencesFactory=java.util.prefs.FileSystemPreferencesFactory, os.version=2.4.22-1.2149.nptl, user.home=/home/mmccown, user.timezone=America/Chicago, java.awt.printerjob=sun.print.PSPrinterJob, file.encoding=ISO-8859-15, java.specification.version=1.4, hibernate.connection.driver_class=com.mysql.jdbc.Driver, java.class.path=build/classes/site:.:/usr/java/jboss/client/log4j.jar:src/schema3/output/lib/schema-generator.jar:src/schema3/output/lib/telehealth-jdo.jar:lib/site/batik.jar:lib/site/bcel.jar:lib/site/com-darwinsys-util.jar:lib/site/jcommon-0.9.1.jar:lib/site/jdom-b8.jar:lib/site/jfreechart-0.9.16.jar:lib/site/Opta2000.jar:lib/site/velocity-dep-1.3.1.jar:/usr/java/tomcat/shared/lib/ant-1.5.3.jar:/usr/java/tomcat/shared/lib/ant-optional-1.5.3.jar:/usr/java/tomcat/shared/lib/c3p0-0.8.3.jar:/usr/java/tomcat/shared/lib/cglib-2.0-rc2.jar:/usr/java/tomcat/shared/lib/com-darwinsys-util.jar:/usr/java/tomcat/shared/lib/commons-collections-2.1.jar:/usr/java/tomcat/shared/lib/commons-dbcp-1.1.jar:/usr/java/tomcat/shared/lib/commons-fileupload-1.0.jar:/usr/java/tomcat/shared/lib/commons-lang-1.0.1.jar:/usr/java/tomcat/shared/lib/commons-logging-1.0.3.jar:/usr/java/tomcat/shared/lib/commons-pool-1.1.jar:/usr/java/tomcat/shared/lib/concurrent-1.3.2.jar:/usr/java/tomcat/shared/lib/connector.jar:/usr/java/tomcat/shared/lib/dom4j-1.4.jar:/usr/java/tomcat/shared/lib/ehcache-0.6.jar:/usr/java/tomcat/shared/lib/hibernate2.jar:/usr/java/tomcat/shared/lib/jaas.jar:/usr/java/tomcat/shared/lib/jboss-cache.jar:/usr/java/tomcat/shared/lib/jboss-common.jar:/usr/java/tomcat/shared/lib/jboss-jmx.jar:/usr/java/tomcat/shared/lib/jboss-system.jar:/usr/java/tomcat/shared/lib/jcs-1.0-dev.jar:/usr/java/tomcat/shared/lib/jdbc2_0-stdext.jar:/usr/java/tomcat/shared/lib/jgroups-2.2.jar:/usr/java/tomcat/shared/lib/jta.jar:/usr/java/tomcat/shared/lib/junit-3.8.1.jar:/usr/java/tomcat/shared/lib/log4j-1.2.8.jar:/usr/java/tomcat/shared/lib/mysql-connector-java-3.0.11-stable-bin.jar:/usr/java/tomcat/shared/lib/odmg-3.0.jar:/usr/java/tomcat/shared/lib/Opta2000.jar:/usr/java/tomcat/shared/lib/oscache-2.0.jar:/usr/java/tomcat/shared/lib/proxool-0.8.3.jar:/usr/java/tomcat/shared/lib/swarmcache-1.0rc2.jar:/usr/java/tomcat/shared/lib/xalan-2.4.0.jar:/usr/java/tomcat/shared/lib/xerces-2.4.0.jar:/usr/java/tomcat/shared/lib/xml-apis.jar:/usr/java/tomcat/common/lib/activation.jar:/usr/java/tomcat/common/lib/ant.jar:/usr/java/tomcat/common/lib/commons-collections.jar:/usr/java/tomcat/common/lib/commons-dbcp-1.1.jar:/usr/java/tomcat/common/lib/commons-el.jar:/usr/java/tomcat/common/lib/commons-pool-1.1.jar:/usr/java/tomcat/common/lib/jasper-compiler.jar:/usr/java/tomcat/common/lib/jasper-runtime.jar:/usr/java/tomcat/common/lib/jaxrpc.jar:/usr/java/tomcat/common/lib/jmx.jar:/usr/java/tomcat/common/lib/jmx-remote.jar:/usr/java/tomcat/common/lib/jmx-remote-tools.jar:/usr/java/tomcat/common/lib/jsp-api.jar:/usr/java/tomcat/common/lib/naming-common.jar:/usr/java/tomcat/common/lib/naming-factory.jar:/usr/java/tomcat/common/lib/naming-java.jar:/usr/java/tomcat/common/lib/naming-resources.jar:/usr/java/tomcat/common/lib/saaj.jar:/usr/java/tomcat/common/lib/servlet-api.jar:/usr/java/tomcat/common/lib/xml-security-bin-2_0.jar, user.name=mmccown, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.show_sql=false, java.vm.specification.version=1.0, java.home=/usr/java/j2sdk1.4.2_03/jre, sun.arch.data.model=32, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.connection.url=jdbc:mysql://127.0.0.1:3306/hivoprod?autoReconnect=true, user.language=en, java.specification.vendor=Sun Microsystems Inc., hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, hibernate.jdbc.use_streams_for_binary=true, java.version=1.4.2_03, java.ext.dirs=/usr/java/j2sdk1.4.2_03/jre/lib/ext, sun.boot.class.path=/usr/java/j2sdk1.4.2_03/jre/lib/rt.jar:/usr/java/j2sdk1.4.2_03/jre/lib/i18n.jar:/usr/java/j2sdk1.4.2_03/jre/lib/sunrsasign.jar:/usr/java/j2sdk1.4.2_03/jre/lib/jsse.jar:/usr/java/j2sdk1.4.2_03/jre/lib/jce.jar:/usr/java/j2sdk1.4.2_03/jre/lib/charsets.jar:/usr/java/j2sdk1.4.2_03/jre/classes, java.vendor=Sun Microsystems Inc., hibernate.jdbc.batch_size=0, file.separator=/, hibernate.query.imports=net.sf.hibernate.test, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.cpu.isalist=}
net.sf.hibernate.PropertyNotFoundException: Could not find a getter for recipients in class jdo.Message
at net.sf.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:182)
at net.sf.hibernate.mapping.Property.getGetter(Property.java:179)
at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:734)
at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:715)
at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:41)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:137)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:750)
at com.telehealth.schema.util.HibernateLoader.getSessionFactory(HibernateLoader.java:91)


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 07, 2004 1:58 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
public java.util.Collection getRecipients() { return this.c_recipients; }

Use a Set.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 07, 2004 2:26 pm 
Newbie

Joined: Fri May 07, 2004 1:07 pm
Posts: 4
Made your suggested change, but it had no effect. Can you tell me why you thought it
might?

Anyway, stack trace is the same as above:

Code:
net.sf.hibernate.PropertyNotFoundException: Could not find a getter for recipients in class jdo.Message
        at net.sf.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:182)
...

______________________
Modified code:

Code:
public java.util.Set c_recipients = new java.util.HashSet();

public void setRecipients(java.util.Set recipients) {
this.c_recipients = recipients;
}
public java.util.Set getRecipients() { return this.c_recipients; }
public void addRecipients(jdo.Recipientrel recipients) {
this.c_recipients.add(recipients);
recipients.setMessage(this);
}


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 07, 2004 2:44 pm 
Newbie

Joined: Fri May 07, 2004 1:07 pm
Posts: 4
Additional info - the property failure isn't just with multivalued types. If I move class mappings around in the file, I can get the following String attribute to fail in the same way:

Code:
13:39:42,897 [ReminderThread-1] INFO  [cfg.Binder] Mapping class: jdo.Mimetype -> mimetype_t
13:39:42,898 [ReminderThread-1] DEBUG [cfg.Binder] Mapped property: id -> id, type: string
13:39:42,898 [ReminderThread-1] DEBUG [cfg.Binder] Mapped property: originalmime -> f_originalmime, type: string


Code:
net.sf.hibernate.PropertyNotFoundException: Could not find a getter for originalmime in class jdo.Mimetype
        at net.sf.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:182)



Top
 Profile  
 
 Post subject:
PostPosted: Fri May 07, 2004 3:35 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Weird problem with your JVM/compiler, can't explain it.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 07, 2004 4:46 pm 
Newbie

Joined: Fri May 07, 2004 1:07 pm
Posts: 4
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)

latest and greatest from sun - think this build does something to break cglib?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.