gamigin wrote:
Main question: I get the following error. My mapping file is very simple and seems fine. The message doesn't really give me any places to start investigate. The error is: "org.hibernate.MappingException: Could not read mappings from resource: com/auenrec/data/GenericUser.hbm.xml"
OK, it was a basic onfiguration error on my part: the classpath was properly set to the mapping XML files and the .java files but not to the compiled .class files.
Once I fixed that, I made it farther. I fixed another problem where I had to make a special version of hibernate.cfg.xml that refers to the database directly rather than via JNDI. That worked.
Then I get another configuration error:
"Problems while creating sessionfactory" with complete stack trace:
Quote:
org.hibernate.PropertyNotFoundException: Could not find a getter for enabled in class com.auenrec.data.ForeignSiteUser
at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:282)
at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:275)
at org.hibernate.mapping.Property.getGetter(Property.java:250)
at org.hibernate.tuple.PojoEntityTuplizer.buildPropertyGetter(PojoEntityTuplizer.java:255)
at org.hibernate.tuple.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:121)
at org.hibernate.tuple.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:64)
at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:249)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:411)
at org.hibernate.persister.entity.JoinedSubclassEntityPersister.<init>(JoinedSubclassEntityPersister.java:90)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:58)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:217)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1145)
at org.hibernate.console.ConsoleConfiguration$2.execute(Unknown Source)
at org.hibernate.console.execution.DefaultExecutionContext.execute(Unknown Source)
at org.hibernate.console.ConsoleConfiguration.execute(Unknown Source)
at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(Unknown Source)
at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(Unknown Source)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(Unknown Source)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
I triple checked my classpath, I rebuilt my class files and guaranteed that the getter function is there (it runs fine within my actual Hibernate application). What is odd, is that when I delete the .class file, I get the exact same error. I would expect the error would change to a class not found error or something similar.
Any help is greatly appreciated.
BTW, I love the work that you guys do, and I am especially thankful that the developers are reading the forums to answer questions: But this software is really difficult to configure and non-developer friendly.
I'm no dummy; I have quite a bit of development experience (although I'm sure the impression I give off from these forum posts isn't great). I'm certainly not trying to brag, but I'm pretty sure that if I have this many problems a lot of others are as well. It would you be great if you focused on better error messages to help developers root these kind of issues out. Just a request...