Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » ClassCastExeption with Elistwrapper
ClassCastExeption with Elistwrapper [message #604756] Mon, 16 April 2007 16:12
daniel is currently offline danielFriend
Messages: 17
Registered: July 2009
Junior Member
I get an error when I try to update a record in the database (but no problem
to add a new one ?)
Data access failure: Could not invoke JDO makePersistent(Object) method;
nested exception is java.lang.ClassCastException:
org.springframework.dao.InvalidDataAccessResourceUsageExcept ion: Could not
invoke JDO makePersistent(Object) method; nested exception is
org.eclipse.emf.teneo.jpox.elist.EListWrapper$1 at
at org.MyClassImpl.jdoProvideField( at....

the error is a ClassCastException thrown from the spring webcontainer method
public class JdoTemplate extends JdoAccessor implements JdoOperations {
public void makePersistent(final Object entity) throws DataAccessException {
execute(new JdoCallback() {
public Object doInJdo(PersistenceManager pm) throws JDOException {
try {
return makePersistentMethod.invoke(pm, new Object[] {entity});
catch (InvocationTargetException ex) {
throw new InvalidDataAccessResourceUsageException(
"Could not invoke JDO makePersistent(Object) method",

and the eclipse debugger seems to say that there is a nullPointerException
in the EListWrapper attachCopy method execution :
public class EListWrapper<E> extends PersistableEList<E> implements SCO,
Queryable, SCOList {
public void attachCopy(Object value) {
// if not loaded then nothing changed so nothing to attach
assert (value instanceof PersistableEList);
if (!((PersistableEList) value).isLoaded())
because "binding error on value"... which is null ("binding ==null for

but the call, from the org.jpox.state.StateManager to the teneo sco class
(ElistWapper) seems to be good
public class AttachFieldManager extends AbstractFieldManager
public void storeObjectField(int fieldNumber, Object value)
sco and value are ElistWapper$1, empty but not null

the teneo log seems to be good :
15:53:55,625 (http-8080-Processor23) DEBUG
[org.eclipse.emf.teneo.mapping.elist.PersistableEList] - Loading EList of
type: org.eclipse.emf.teneo.jpox.elist.EListWrapper of member myField (that
cause the error) owned by MyClass with delegate list java.util.ArrayList
I use Eclipse3.2, EMF 2.2.2, teneo : emft-teneo-SDK-I200703301643, Jpox1.3
(to stay compatible withe Spring 1.2.X for syntax reason), Spring 1.2.8.
I've tried with Eclipse3.3, EMF 2.3, teneo : emft-teneo-SDK-I200703301643
etc... and that's the same

To be able to send you an example to reproduce to problem, I'tried to shrink
my webapp to the 3 or 4 classes with the field which cause the error... but
in this case, I have no error...?
I don't know where to search the error

Previous Topic:Problem mapping many-to-many relationship
Next Topic:[Teneo] Multivalued EAttributes of EDataTypes do not have the correct Hibernate mapping
Goto Forum:

Current Time: Sat Nov 28 18:00:26 GMT 2020

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

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

Back to the top