[jboss-user] [EJB 3.0] - Re: Anyone have SINGLE_TABLE Entity inheritance working?

lpmon do-not-reply at jboss.com
Thu Jan 17 10:54:31 EST 2008


As I suspected this did not work.  How would the container know the coulmn and the type to apply the discriminator value to if you omit the @DiscriminatorColumn?

It seems to be complaining about a property named "connected".  My entity has no such property?

I see many examples like what I am trying to do yet I cannot get mine to work.

If I leave out @DiscriminatorColumn

I get:

09:47:47,243 WARN  [ServiceController] Problem starting service persistence.units:ear=shockwatch.ear,jar=shockwatch.jar,unitName=shockwatch
javax.persistence.PersistenceException: org.hibernate.PropertyNotFoundException: Could not find a setter for property connected in class com.shockwatch.server.FMPUnit
	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:698)
	at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
	at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:264)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:102)
	at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
	at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
	at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
	at $Proxy0.start(Unknown Source)
	at org.jboss.system.ServiceController.start(ServiceController.java:417)
	at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)

......
Caused by: org.hibernate.PropertyNotFoundException: Could not find a setter for property connected in class com.shockwatch.server.FMPUnit
	at org.hibernate.property.BasicPropertyAccessor.createSetter(BasicPropertyAccessor.java:216)
	at org.hibernate.property.BasicPropertyAccessor.getSetter(BasicPropertyAccessor.java:209)
	at org.hibernate.mapping.Property.getSetter(Property.java:277)
	at org.hibernate.tuple.entity.PojoEntityTuplizer.buildPropertySetter(PojoEntityTuplizer.java:251)
	at org.hibernate.tuple.entity.AbstractEntityTuplizer.(AbstractEntityTuplizer.java:126)
	at org.hibernate.tuple.entity.PojoEntityTuplizer.(PojoEntityTuplizer.java:55)
	at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.(EntityEntityModeToTuplizerMapping.java:56)
	at org.hibernate.tuple.entity.EntityMetamodel.(EntityMetamodel.java:295)
	at org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:434)
	at org.hibernate.persister.entity.SingleTableEntityPersister.(SingleTableEntityPersister.java:109)
	at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
	at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:226)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:691)
	... 145 more


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120964#4120964

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120964



More information about the jboss-user mailing list