Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] StoreValidationException
[Teneo] StoreValidationException [message #608877] Tue, 24 July 2007 13:14
Eclipse UserFriend
Originally posted by: fc_supercanard.yahoo.fr

Hello,

I wrote a simple class to create tables using DB2.
Then I would like to fulfill tables from an xml file.

So I take what I want from the file, into an EList, and I make this :
eListDatabase.addAll(eListFile)
This 'modus operandi' works well for different xml files, but it throws
a StoreValidationException for another one.

Exception in thread "main"
org.eclipse.emf.teneo.StoreValidationException: Diagnosis of
package.impl.ClassNameImpl1@77407740{jpox://?dsname=MyPMF&am p;query1=select
from package.impl.ClassNameImpl2#package.ClassNamePortlets}
The required feature 'title' of
' package.impl.ClassNameImpl1@77407740{jpox://?dsname=MyPMF&am p;query1=select
from package.impl.ClassName2#package.ISCAdminPortlets}' must be set
at
org.eclipse.emf.teneo.resource.StoreResource.validateContent s(StoreResource.java:426)
at
org.eclipse.emf.teneo.resource.StoreResource.save(StoreResou rce.java:360)
at DatastoreInstall.importModule(DatastoreInstall.java:280)
at DatastoreInstall.importContents(DatastoreInstall.java:128)
at DatastoreInstall.init(DatastoreInstall.java:55)
at DatastoreInstall.main(DatastoreInstall.java:320)


This 'title' is an element which is in a sequence of ClassNameImpl1 type
in the XML schema. But I do not understand why it is considered as a
'required feature' by Teneo.
In DB2, there is a Nullable=yes field TEXT_TITLE in the corresponding table.


Furthermore, if I add this title element in the XML file, it throws this
other Exception :

Exception in thread "main" javax.jdo.JDOFatalUserException: An object of
class "package.impl.TextImpl" uses SingleFieldIdentity using the field
"uniqueName" yet this field has not had its value set! Either set the
field manually, or set a value-strategy for that field.
at org.jpox.state.StateManagerImpl.setIdentity(StateManagerImpl .java:874)
at org.jpox.state.StateManagerImpl.<init>(StateManagerImpl.java:625)
at
org.jpox.state.StateManagerFactory.newStateManager(StateMana gerFactory.java:105)
at
org.jpox.AbstractPersistenceManager.internalMakePersistent(A bstractPersistenceManager.java:1205)
at
org.jpox.AbstractPersistenceManager.makePersistentInternal(A bstractPersistenceManager.java:1259)
at org.jpox.store.mapping.MultiMapping.setObject(MultiMapping.j ava:181)
at
org.jpox.store.rdbms.fieldmanager.ParameterSetter.storeObjec tField(ParameterSetter.java:144)
at
org.jpox.state.StateManagerImpl.providedObjectField(StateMan agerImpl.java:2771)
at
com.ibm.isclite.wccm.portletentities.impl.ApplicationDefinit ionImpl.jdoProvideField(ApplicationDefinitionImpl.java)
at
com.ibm.isclite.wccm.portletentities.impl.ApplicationDefinit ionImpl.jdoProvideFields(ApplicationDefinitionImpl.java)
at
org.jpox.state.StateManagerImpl.provideFields(StateManagerIm pl.java:3115)
at
org.jpox.store.rdbms.request.InsertRequest.execute(InsertReq uest.java:252)
at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java :2519)
at org.jpox.store.StoreManager.insert(StoreManager.java:938)
at
org.jpox.state.StateManagerImpl.internalMakePersistent(State ManagerImpl.java:3667)
at
org.jpox.state.StateManagerImpl.makePersistent(StateManagerI mpl.java:3646)
at
org.jpox.AbstractPersistenceManager.internalMakePersistent(A bstractPersistenceManager.java:1206)
at
org.jpox.AbstractPersistenceManager.makePersistentInternal(A bstractPersistenceManager.java:1259)
at
org.jpox.store.rdbms.scostore.FKListStore.validateElementFor Writing(FKListStore.java:1231)
at
org.jpox.store.rdbms.scostore.FKListStore.internalAdd(FKList Store.java:772)
at
org.jpox.store.rdbms.scostore.AbstractListStore.add(Abstract ListStore.java:352)
at org.jpox.sco.ArrayList.add(ArrayList.java:780)
at
org.eclipse.emf.teneo.jpox.elist.EListWrapper.didAdd(EListWr apper.java:594)
at
org.eclipse.emf.common.util.DelegatingEList.addAllUnique(Del egatingEList.java:652)
at
org.eclipse.emf.common.notify.impl.DelegatingNotifyingListIm pl.doAddAllUnique(DelegatingNotifyingListImpl.java:486)
at
org.eclipse.emf.common.notify.impl.DelegatingNotifyingListIm pl.addAllUnique(DelegatingNotifyingListImpl.java:459)
at
org.eclipse.emf.common.notify.impl.DelegatingNotifyingListIm pl.addAllUnique(DelegatingNotifyingListImpl.java:388)
at
org.eclipse.emf.common.util.DelegatingEList.addAll(Delegatin gEList.java:573)
at DatastoreInstall.importModule(DatastoreInstall.java:275)
at DatastoreInstall.importContents(DatastoreInstall.java:128)
at DatastoreInstall.init(DatastoreInstall.java:55)
at DatastoreInstall.main(DatastoreInstall.java:320)


In the XML schema, the "uniqueName" attribute of module is :
<xs:attribute name="uniqueName" type="xs:ID" use="optional"/> (it is an
attribute of Text type which is a table also).
It is required because in DB2 database, uniqueName is the primary key of
the Text table so it can not be null. But why this attribute is the
primary key of the table ? How could I change it ?

Note : everything works well if I add manually title elements with
uniqueName attribute in the XML file.

Regards,

Quentin
Previous Topic:[EMF Compare]ConnectorEnds have changes in "false"
Next Topic:Writing a DiffModel as .uml
Goto Forum:
  


Current Time: Fri Aug 12 12:34:34 GMT 2022

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

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

Back to the top