aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes EJB3.0 example Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB3.0 example " Watch "EJB3.0 example " New topic
Author

EJB3.0 example

santhoshkumar samala
Ranch Hand

Joined: Nov 12, 2003
Posts: 156

I have created an ejb3.0 entity bean example with @ManytoOne relation. Iam getting a strange error



my example code is as follows:
Book.java

Author.java


my stateful session bean has following code :



Iam using Mysql, can you please tell me what can be the fix for this?


santhosh<br />SCJP,SCWCD
santhoshkumar samala
Ranch Hand

Joined: Nov 12, 2003
Posts: 156

I was able to solve the above problem..

I have added above getId method of each entity.
 
Consider Paul's rocket mass heater.
 
subject: EJB3.0 example
 
Similar Threads
Unable to understand exception
EJB 3.0 Entity Bean
Getting Hibernate bidirectional mapping working with annotations
org.hibernate.AnnotationException: mappedBy reference an unknown target entity property
Many to One instead of One to One relationship