Embedded Value Objects can't be instanciated by hibernate ---------------------------------------------------------
Key: EJB-74 URL: http://jira.andromda.org/browse/EJB-74 Project: EJB Cartridge Type: Bug Environment: Application Server: JBoss 4.2.0 Reporter: D. S. Assigned to: Vance Karimi s. Forum http://galaxy.andromda.org/forum/viewtopic.php?t=4626&start=0&postdays=0&postorder=asc I am using EJB3-Cartridge to generate data access layer for my application. The domain model contains the datatype money, which I want to generate as Embedded Value Object. Money datatype should have additionally some methods like add() and changeCurrency(). EJB3-Cartridge generate this classes: Code: public abstract class Money implements java.io.Serializable { ... } Code: public class MoneyImpl extends Money { ... } The entities using the money datatype reference the abstract class money Code: public class Bill implements java.io.Serializable { ... @javax.persistence.Embedded public Money getAmount() { return _amount; } } If I try to get the entity from the database the following error occurs: javax.persistence.PersistenceException: org.hibernate.InstantiationException: Cannot instantiate abstract class or interface: Money Is it possible to generate, like by entities, an embedded abstract class MoneyEmbedded and embeddable class Money, where the additionally methods should be implemented? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.andromda.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/