Using: Hibernate3, JBoss 4.0.3, JDK 1.5.0_05
I am getting the following exception when I deploy my .har file to JBoss:
org.hibernate.PropertyNotFoundException: Could not find a getter for assignedWorkflows in class au.net.isa.infobank.server.persistence.hibernate.UserHPO
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:241)
at org.hibernate.tuple.PojoEntityTuplizer.buildPropertyGetter(PojoEntityTuplizer.java:249)
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:243)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:405)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:216)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1033)
at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:239)
at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:130)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:287)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:236)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:974)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:453)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:276)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:973)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:963)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:489)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:203)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:182)
Mapping: User.hbm.xml
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="au.net.isa.infobank.server.persistence.hibernate.UserHPO" table="users" schema="public">
<id name="userId" type="integer">
<column name="user_id" />
<generator class="native">
<param name="sequence">user_seq</param>
</generator>
</id>
<property name="firstName" type="string">
<column name="first_name" length="50"/>
</property>
<property name="lastName" type="string">
<column name="last_name" length="50"/>
</property>
<property name="userName" type="string">
<column name="username" length="20"/>
</property>
<property name="password" type="string">
<column name="password" length="20"/>
</property>
<property name="createdDate" type="timestamp">
<column name="created" length="8"/>
</property>
<property name="archivedDate" type="timestamp">
<column name="archived" length="8"/>
</property>
<property name="email" type="string">
<column name="email" length="200"/>
</property>
<set name="userAgencyAsgts" inverse="true">
<key>
<column name="user_id" not-null="true" />
</key>
<one-to-many class="au.net.isa.infobank.server.persistence.hibernate.UserAgencyAsgtHPO" />
</set>
<set name="assignedWorkflows" inverse="true">
<key>
<column name="user_id" not-null="true" />
</key>
<one-to-many class="au.net.isa.infobank.server.persistence.hibernate.WorkflowHPO" />
</set>
</class>
</hibernate-mapping>
getter/setter methods in UserHPO.java:
Code:
...
public Set getAssignedWorkflows() {
return assignedWorkflows;
}
public void setAssignedWorkflows(Set assignedWorkflows) {
this.assignedWorkflows = assignedWorkflows;
}
...
I have many other hibernate mappings with exactly the same mapping structure and everything works. I cannot see why this particular mapping wont work. I have tried renaming the set to various other names with no effect. The userAgencyAsgts mapping above works correctly. If I remove the assignedWorkflows set, everything works.
Any ideas why this would be happening?
Cheers.