Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] QueryBasedValueHolder cannot be cast to UnitOfWorkValueHolder

Thanks for the reply, James.

There wasn't more stack. What I found out by now is that it seems to be a mapping problem: I have an embeddable with a ManyToMany-relationship.
If I change it to FetchType.EAGER it all works well...
Strange. Is this a bug?


Best regards,
Andreas


James Sutherland wrote:
Most of the stack is your app or spring, the EclipseLink part is only at the
end, but seems to be missing the caused by, is there more to the stack?

Also please describe exactly what you are doing to get this error, ideally
your code for your commit.

Caused by: javax.persistence.RollbackException:
java.lang.ClassCastException:
org.eclipse.persistence.internal.indirection.QueryBasedValueHolder
cannot be cast to
org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder
        at
org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:102)
        at
org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:63)
        at
org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:456)
... 105 more

Andreas König-2 wrote:
Hey Folks!

In certain cases I get this error and I don't find out why. Its definitely reproducable.


!!!Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: java.lang.ClassCastException: org.eclipse.persistence.internal.indirection.QueryBasedValueHolder cannot be cast to org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder

Situation is the following:

What happens is that the object, that i change during a transactional context is updated in the database. There seem to be another transaction, which I don't see...

Any idea??

Thx for Help.


Andreas König


Stacktrace:

009-03-31 20:04:01,483 WARN [CommonsLoggingOutput] --Erroring: batchId[17] message[org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: java.lang.ClassCastException: org.eclipse.persistence.internal.indirection.QueryBasedValueHolder cannot be cast to org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder] 2009-03-31 20:06:13,283 WARN [CommonsLoggingOutput] Method execution failed: org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: java.lang.ClassCastException: org.eclipse.persistence.internal.indirection.QueryBasedValueHolder cannot be cast to org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:465) at ...
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
Caused by: javax.persistence.RollbackException: java.lang.ClassCastException: org.eclipse.persistence.internal.indirection.QueryBasedValueHolder cannot be cast to org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:102) at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:63) at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:456)
	... 105 more



--
Andreas König
Developer

andreas.koenig@xxxxxxxxxx

www.serie-a.de



-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink Wiki: http://wiki.eclipse.org/EclipseLink EclipseLink , http://wiki.oracle.com/page/TopLink TopLink Forums: http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , http://www.nabble.com/EclipseLink-f26430.html EclipseLink Book: http://en.wikibooks.org/wiki/Java_Persistence Java Persistence


--
Andreas König
Developer

andreas.koenig@xxxxxxxxxx

serie a logistics solutions AG
Hülchrather Straße 15
D-50670 Köln

T +49 221 500 60 7-21
F +49 221 500 60 7-07

Vorstand: Axel Löhr, Erwin Soldo
Aufsichtsrat: Adam Musialik (Vors.), Fritz Pleitgen, Hans Jörg Klofat

Amtsgericht Köln HRB 61725

www.serie-a.de




Back to the top