Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] org.jpox.sco.exceptions.NullsNotAllowedException on resource.save()
[Teneo] org.jpox.sco.exceptions.NullsNotAllowedException on resource.save() [message #616157] Wed, 09 April 2008 17:31
Vladimir Nikolov is currently offline Vladimir NikolovFriend
Messages: 10
Registered: July 2009
Junior Member
Hello Martin,

I've experienced a problem when trying to save a detached resource. Here
is the stack trace:

Exception in thread "main"
org.jpox.sco.exceptions.NullsNotAllowedException: Nulls are not allowed
for field writers: class = org.eclipse.example.library.impl.LibraryImpl,
field = writers
at org.jpox.sco.ArrayList.add(ArrayList.java:768)
at
org.eclipse.emf.teneo.jpox.JpoxUtil.updateListWithListElemen ts(JpoxUtil.java:155)
at
org.eclipse.emf.teneo.jpox.elist.EListWrapper.attachCopy(ELi stWrapper.java:494)
at
org.jpox.state.AttachFieldManager.storeObjectField(AttachFie ldManager.java:157)
at
org.jpox.state.StateManagerImpl.providedObjectField(StateMan agerImpl.java:2771)
at
org.eclipse.example.library.impl.LibraryImpl.jdoProvideField (LibraryImpl.java)
at
org.eclipse.example.library.impl.LibraryImpl.jdoProvideField s(LibraryImpl.java)
at
org.jpox.state.StateManagerImpl.provideFields(StateManagerIm pl.java:3115)
at
org.jpox.state.StateManagerImpl.internalAttachCopy(StateMana gerImpl.java:4389)
at org.jpox.state.StateManagerImpl.attachCopy(StateManagerImpl. java:4331)
at
org.jpox.AbstractPersistenceManager.attachCopy(AbstractPersi stenceManager.java:1431)
at
org.jpox.AbstractPersistenceManager.internalMakePersistent(A bstractPersistenceManager.java:1161)
at
org.jpox.AbstractPersistenceManager.makePersistent(AbstractP ersistenceManager.java:1277)
at
org.eclipse.emf.teneo.jpox.resource.JPOXResource.saveResourc e(JPOXResource.java:381)
at
org.eclipse.emf.teneo.resource.StoreResource.save(StoreResou rce.java:348)
at package1.MainClass.main(MainClass.java:111)



While detached - when I add an element to the end of an EList and then
call resource.save() - it works fine. If I try to add an element in the
middle of an EList and call resource.save() - the exception above is
thrown. What I have observed is when attachedList.add(newpos, obj) fails
the INDEX column in the respective table in the DB gets inconsistent.
Do you have any ideas? Is there something I'm missing?


I have prepared a small testcase which I'm going to send it to you via mail.

I'm using Teneo v0.8.0.

Thank you,
Vladimir
Previous Topic:[CDO] 0.8 Multiplr Inheritence Wrong featureID
Next Topic:[Compare] Problem with getting RemoteRemoveModelElement vs. RemoteAddModelElement with 3 way compare
Goto Forum:
  


Current Time: Mon Aug 02 07:18:24 GMT 2021

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

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

Back to the top