Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » upgrading to 1.1.1.: IdentityWeakHashMap does not support null as a key or value
upgrading to 1.1.1.: IdentityWeakHashMap does not support null as a key or value [message #389710] Mon, 22 June 2009 13:20 Go to next message
Tom Eugelink is currently offline Tom Eugelink
Messages: 807
Registered: July 2009
Senior Member
I've upgraded to EclipseLink 1.1.1 and am getting this exception. Has something changed? How does a null value end up in this map?


javax.persistence.RollbackException: java.lang.IllegalArgumentException: The Ide
ntityWeakHashMap does not support null as a key or value.
at org.eclipse.persistence.internal.jpa.transaction.EntityTrans actionImp
l.commitInternal(EntityTransactionImpl.java:102)
at org.eclipse.persistence.internal.jpa.transaction.EntityTrans actionImp
l.commit(EntityTransactionImpl.java:63)
at sun.reflect.GeneratedMethodAccessor280.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.tbee.util.jpa.EntityTransactionExtender.invoke(EntityTra nsactionE
xtender.java:106)
at $Proxy35.commit(Unknown Source)
at com.ovsoftware.oid.OVS_OID_Handler_1.store(OVS_OID_Handler_1 .java:214
6)
at com.ovsoftware.oid.OVS_OID_Handler_1.actionPerformed(OVS_OID _Handler_
1.java:475)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unk nown Sour
ce)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at org.tbee.swing.EventQueue.dispatchEvent(EventQueue.java:83)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

==== cause:
java.lang.IllegalArgumentException: The IdentityWeakHashMap does not support nul
l as a key or value.
at org.eclipse.persistence.internal.helper.IdentityWeakHashMap. containsK
ey(IdentityWeakHashMap.java:187)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.isO bjectRegi
stered(UnitOfWorkImpl.java:2963)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.isO bjectNew(
UnitOfWorkImpl.java:2947)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.cal culateCha
nges(UnitOfWorkImpl.java:575)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.com mitToData
baseWithChangeSet(UnitOfWorkImpl.java:1386)
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:1059)
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)
at sun.reflect.GeneratedMethodAccessor280.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.tbee.util.jpa.EntityTransactionExtender.invoke(EntityTra nsactionE
xtender.java:106)
at $Proxy35.commit(Unknown Source)
at com.ovsoftware.oid.OVS_OID_Handler_1.store(OVS_OID_Handler_1 .java:214
6)
at com.ovsoftware.oid.OVS_OID_Handler_1.actionPerformed(OVS_OID _Handler_
1.java:475)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unk nown Sour
ce)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at org.tbee.swing.EventQueue.dispatchEvent(EventQueue.java:83)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Re: upgrading to 1.1.1.: IdentityWeakHashMap does not support null as a key or value [message #389716 is a reply to message #389710] Mon, 22 June 2009 19:43 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

That is odd, what version are you upgrading from?

What are you doing to get the error?

It seems like it may be related to the clone being null for new objects,
which is something that changed at some point, although I'm not sure how
it could trigger this issue. I believe there was a fix made for this, so
you may wish to try the latest 1.1 build, or the latest 2.0 build to see
if the issue still occurs.

---
James
http://www.nabble.com/EclipseLink---Users-f26658.html


James : Wiki : Book : Blog : Twitter
Re: upgrading to 1.1.1.: IdentityWeakHashMap does not support null as a key or value [message #389718 is a reply to message #389716] Mon, 22 June 2009 19:54 Go to previous messageGo to next message
Tom Eugelink is currently offline Tom Eugelink
Messages: 807
Registered: July 2009
Senior Member
> That is odd, what version are you upgrading from?

I came from 1.0.2. I delayed upgrading because in 1.1 there was an issue with weak identify map not working at all and I thought; well, let's give 1.1.1 a try again :-)


> What are you doing to get the error?

I suspect specifying WeakIdentityCache in the persistence.xml. I have disabled that for now (it was added to see if it solved memory leaks and stayed in), so I can tell in a day or two if that indeed is the culprit. But 99% sure it is.


> It seems like it may be related to the clone being null for new objects,
> which is something that changed at some point, although I'm not sure how
> it could trigger this issue. I believe there was a fix made for this,
> so you may wish to try the latest 1.1 build, or the latest 2.0 build to
> see if the issue still occurs.

Hm. I do not have the problem reproducable on DEV yet, although it is frequent (like 2x a day per user). So I'm a bit reluctant to go yet a step further in PRD.

Tom
Re: upgrading to 1.1.1.: IdentityWeakHashMap does not support null as a key or value [message #389722 is a reply to message #389718] Tue, 23 June 2009 18:06 Go to previous messageGo to next message
Gordon Yorke is currently offline Gordon Yorke
Messages: 77
Registered: July 2009
Member
unset the Persistence Unit property
"eclipselink.persistence-context.reference-mode" it seems there may be an
issue with a reference being garbage collected during the commit process.
Please file a bug.
--Gordon
Re: upgrading to 1.1.1.: IdentityWeakHashMap does not support null as a key or value [message #389726 is a reply to message #389722] Wed, 24 June 2009 07:43 Go to previous message
Tom Eugelink is currently offline Tom Eugelink
Messages: 807
Registered: July 2009
Senior Member
Gordon Yorke wrote:
> unset the Persistence Unit property
> "eclipselink.persistence-context.reference-mode" it seems there may be
> an issue with a reference being garbage collected during the commit
> process.
> Please file a bug.


Indeed disabling the setting in the persistence.xml makes the exception go away. ATM the application is running fine for the rest, and I do not have any reported memory problems. So I do not have a need to revert back to 1.0.2. I would prefer not to roll in a less tested version of Eclipselink.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=281314

Thanks for the work, guys. Greatly appreciated.

Tom
Previous Topic:MySQL Autoinc FK
Next Topic:Derby: no suitable driver found
Goto Forum:
  


Current Time: Sat Sep 20 06:13:06 GMT 2014

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

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