• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB 3.0 cmp problem with Java interfaces

 
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all. I'm a newbie at 3.0 so if something I write is unclear, please let me know and I'll try to clarify.

I'm writing a Pojo for an entity bean. I want this Pojo to implement an interface. I also need this Pojo to contain a List (or collection of some sort) of type {the interface}. I keep getting a JBoss deployment error:

[exec] State: FAILED
[exec] Reason: org.hibernate.MappingException: Could not determine type for: java.util.List, for columns: [org.hibernate.mapping.Column({the interface})]



Any ideas how I may write this to make it work (if it can)? At this point, I have no explicit annotations on the accessors for the List. Thanks!
Paul
[ November 08, 2006: Message edited by: Paul Smiley ]
 
Paul Smiley
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
anyone?
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new to EJB3 but going by the exception that you are seeing it seems that Hibernate is not able to recognize the InterfaceItem.

At this point, I have no explicit annotations on the accessors for the List.



In that case Hibernate should not have considered this as an mapped attribute. Can you post the entire stacktrace and the entire contents of the Entity.
 
Paul Smiley
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your reply, Jaikiran. We decided the construct this in a different manner.
Paul
 
I will suppress my every urge. But not this shameless plug:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic