-
1. Re: unanticipated error while deploying EntityBeans in EJB3.
nectodev Sep 24, 2005 7:58 AM (in response to nectodev)I have alternatively marked that property as transient. And JBoss ignores it and stills throws out the same error.
hmmmmmmmmmmmmm..... -
2. Re: unanticipated error while deploying EntityBeans in EJB3.
epbernard Sep 30, 2005 6:52 AM (in response to nectodev)use @Transient.
This is not a bug, all getters are supposed to be persistent -
3. Re: unanticipated error while deploying EntityBeans in EJB3.
nectodev Oct 2, 2005 8:03 AM (in response to nectodev)Thanks for your response. I already tried that. There is an improvement. but the fundamental problem continues.
Improvement: The entity bean is not iisted in the final summary of failed beans.
Continuing problem: JBoss throws a exception while "processing collections"..and further collection processing is aborted...i dont see other collections being processed after this exception... overall 3 collections gets processed...:26:49,845 WARN [ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=pu_services.ejb3
org.hibernate.MappingException: property not found: currentState
at org.hibernate.mapping.PersistentClass.getProperty(PersistentClass.java:351)
at org.hibernate.mapping.PersistentClass.getProperty(PersistentClass.java:356)
at org.hibernate.cfg.annotations.TableBinder.bindFk(TableBinder.java:115)
at org.hibernate.cfg.annotations.CollectionBinder.bindCollectionSecondPas.............
.........
.........
I want to take this opportunity to give u more information. Maybe u can see something wrong i am doing....
I have a class State and class StateContext (Embeddable) both mapped to the same Table "StateTB" (except for the transient properties in Class StateContext).@Entity @Table(name = "StateTB") public class State{ protected int a; @Embedded protedted StateContext stateContext = new StateContext(this); @Column(name = "colA") public getA(){...} public setA(){...} @Embedded @AttributeOverrides({ @AttributeOverride(name = "b", column = @Column(name = "colB")) }) public DealerContext getStateContext() { return stateContext; } public void setStateCtx(StateContext stateCtx) { this.stateContext = stateCtx; } } @Embeddable(access = AccessType.PROPERTY) public class StateContext{ protected int b; @Transient protected State currentState; public getB(){...} public setB(){...} @Transient public getCurrentState(){ return currentState; } public setCurrentState(State state){ currentState = state; } }
Obviously I have simplified the code for clarity
Hope this helps....I appreciate any pointers...
Thanks so much again for taking some time out. Feel free to let me know if u need more info... -
4. Re: unanticipated error while deploying EntityBeans in EJB3.
nectodev Oct 2, 2005 8:09 AM (in response to nectodev)There is a minor type in the above code listing...
corrected version is as follows@Entity @Table(name = "StateTB") public class State{ protected int a; @Embedded protected StateContext stateContext = new StateContext(this); @Column(name = "colA") public getA(){...} public setA(){...} @Embedded @AttributeOverrides({ @AttributeOverride(name = "b", column = @Column(name = "colB")) }) public StateContext getStateContext() { return stateContext; } public void setStateCtx(StateContext stateCtx) { this.stateContext = stateCtx; } } @Embeddable(access = AccessType.PROPERTY) public class StateContext{ protected int b; @Transient protected State currentState; public getB(){...} public setB(){...} @Transient public getCurrentState(){ return currentState; } public setCurrentState(State state){ currentState = state; } }
thanks. -
5. Re: unanticipated error while deploying EntityBeans in EJB3.
nectodev Oct 2, 2005 10:55 PM (in response to nectodev)update: in my earlier reply...i incorrectly said there was an "imrovement" after using @Transient annotation.
Actually the StateContext bean is still being reported as failing in the final summary report of JBoss deployments AFTER throwing an exception at the "processing collection mappings" phase. -
6. Re: unanticipated error while deploying EntityBeans in EJB3.
nectodev Oct 5, 2005 4:22 AM (in response to nectodev)FINAL UDATE:
The previous three replies from me are a non-issue.
in other words @Transient works..
END OF TOPIC
PS: Admin please consider removing this topic from the forum or the previous 3 resonses from me.