Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Eclipselink 1.1: java.lang.ClassCast,Exception: org.eclipse.persistence.internal.helper.IdentityWeak
Eclipselink 1.1: java.lang.ClassCast,Exception: org.eclipse.persistence.internal.helper.IdentityWeak [message #386059] Mon, 23 March 2009 14:01 Go to next message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 817
Registered: July 2009
Senior Member
Just upgraded from 1.0.2 to 1.1 and got this exception:

[EL Warning]: 2009-03-23 14:39:11.862--UnitOfWork(19102345)--java.lang.ClassCast
Exception: org.eclipse.persistence.internal.helper.IdentityWeakHashMap cannot be
cast to java.util.IdentityHashMap
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.com mitToData
baseWithChangeSet(UnitOfWorkImpl.java:1361)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUni tOfWork.c
ommitRootUnitOfWork(RepeatableWriteUnitOfWork.java:160)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.com mitAndRes
ume(UnitOfWorkImpl.java:1038)
at org.eclipse.persistence.internal.jpa.transaction.EntityTrans actionImp
l.commitInternal(EntityTransactionImpl.java:84)
at org.eclipse.persistence.internal.jpa.transaction.EntityTrans actionImp
l.commit(EntityTransactionImpl.java:63)
....



I run Eclipelink with this option in the persistence.xml

...
<properties>
<property name="eclipselink.persistence-context.reference-mode" value="WEAK"/>
</properties>
</persistence-unit>
</persistence>
Re: Eclipselink 1.1: java.lang.ClassCast,Exception: org.eclipse.persistence.internal.helper.Identity [message #386063 is a reply to message #386059] Mon, 23 March 2009 17:48 Go to previous messageGo to next message
Gordon Yorke is currently offline Gordon YorkeFriend
Messages: 78
Registered: July 2009
Member
Can you verify that all older version of EclipseLink have been removed
from your class path?
--Gordon
Re: Eclipselink 1.1: java.lang.ClassCast,Exception: org.eclipse.persistence.internal.helper.Identity [message #386066 is a reply to message #386063] Wed, 25 March 2009 15:48 Go to previous messageGo to next message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 817
Registered: July 2009
Senior Member
I'm pretty sure I have it setup ok, although the funny thing is that I only have the problem if I run the application from the shell. If I run it from within Eclipse it does not have the exception.



Gordon Yorke wrote:
> Can you verify that all older version of EclipseLink have been removed
> from your class path?
> --Gordon
>
Re: Eclipselink 1.1: java.lang.ClassCast,Exception: org.eclipse.persistence.internal.helper.Identity [message #386067 is a reply to message #386063] Wed, 25 March 2009 16:09 Go to previous messageGo to next message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 817
Registered: July 2009
Senior Member
Gordon Yorke wrote:
> Can you verify that all older version of EclipseLink have been removed
> from your class path?
> --Gordon
>

Yes. Now I have the behavior also in Eclipse (a 1.0.2 was lurking in one of the included projects). All older version are removed from the classpath.

If I remove the properties part from the persistence.xml, the exception goes away.

<properties>
<property name="eclipselink.persistence-context.reference-mode" value="WEAK"/>
</properties>
Re: Eclipselink 1.1: java.lang.ClassCast,Exception: org.eclipse.persistence.internal.helper.Identity [message #386574 is a reply to message #386067] Wed, 01 April 2009 20:00 Go to previous message
Gordon Yorke is currently offline Gordon YorkeFriend
Messages: 78
Registered: July 2009
Member
This issue is being fixed through bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=270413
--Gordon
Previous Topic:Getting an exception that is hanging my application with EclipseLink 1.1.0
Next Topic:hsqldb
Goto Forum:
  


Current Time: Fri Apr 19 15:46:59 GMT 2024

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

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

Back to the top