Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] newbee question .. MappingException: Could not determine type for:
[Teneo] newbee question .. MappingException: Could not determine type for: [message #616060] Thu, 03 April 2008 11:52
prasad is currently offline prasadFriend
Messages: 22
Registered: July 2009
Junior Member
hi,
I have just started with the library tutorial on elver.org. The library xsd
is attached.
I have done the following things:
1) created model and edit plugins for the library xsd
2) setup a hsql server instance , created a library db and modified the
hibernate properties accordingly.
3) I am using the versions we got from the eclipsecon2008 Teneo session in
model-driven-dev tutorial on first day.
[ except hsql related, which I took the latest from hsql.org ] .

here is the test method I am invoking from a view class of another plugin ..

public String testAddBook(){
final String dataStoreName = "LibraryDataStore";
final Session session = StoreController.getInstance().getSession();
final Transaction tx = session.getTransaction();
session.beginTransaction();
//Create and populate Library
Library library = LibraryFactory.eINSTANCE.createLibrary();
library.setName("My Library");
// Make it persistent.
session.save(library);
// Create a writer...
Writer writer = LibraryFactory.eINSTANCE.createWriter();
writer.setName("JRR Tolkien");
// ...and one of his books.
Book book = LibraryFactory.eINSTANCE.createBook();
book.setAuthor(writer);
book.setPages(305);
book.setTitle("The Hobbit");
book.setCategory(BookCategory.SCIENCE_FICTION);
// Add the Writer and Book to the Library. They are made
// persistent automatically because the Library is itself
// already persistent.
library.getWriters().add(writer);
library.getBooks().add(book);
//Commit Transaction and close Session
//The Library is not stored in the database until you commit the
Transaction:
session.getTransaction().commit();
session.close();
}

During database schema update call, I am getting the following error .

Could not determine type for:
org.eclipse.emf.teneo.hibernate.mapping.ENumUserType, at table: book, for
columns: [org.hibernate.mapping.Column(category)]
org.hibernate.MappingException: Could not determine type for:
org.eclipse.emf.teneo.hibernate.mapping.ENumUserType, at table: book, for
columns: [org.hibernate.mapping.Column(category)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:2 69)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:2 53)
at org.hibernate.mapping.Property.isValid(Property.java:185)
at org.hibernate.mapping.PersistentClass.validate(PersistentCla ss.java:440)
at org.hibernate.mapping.RootClass.validate(RootClass.java:192)
at org.hibernate.cfg.Configuration.validate(Configuration.java: 1108)
at
org.hibernate.cfg.Configuration.buildSessionFactory(Configur ation.java:1293)
at
org.eclipse.emf.teneo.hibernate.HbSessionDataStore.buildSess ionFactory(HbSessionDataStore.java:172)
at
org.eclipse.emf.teneo.hibernate.HbSessionDataStore.initializ e(HbSessionDataStore.java:86)
at test.StoreController.initializeDataStore(StoreController.jav a:65)
at test.StoreController.getDataStore(StoreController.java:31)
at test.StoreController.getSession(StoreController.java:26)
at test.TestTeneo.testAddBook(TestTeneo.java:46)

What am I missing ?

Appreciate your help
Thanks
Prasad


  • Attachment: library.xsd
    (Size: 1.54KB, Downloaded 225 times)
Previous Topic:[CDO] DanglingHREFException after putEPackage()
Next Topic:[Teneo] newbee question .. MappingException: Could not determine type for:
Goto Forum:
  


Current Time: Thu Apr 25 08:58:19 GMT 2024

Powered by FUDForum. Page generated in 0.03307 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top