#1900 closed defect (duplicate)
Raw data importer fails: A handler with ID '1728751927' is already registered
Reported by: | Nicklas Nordborg | Owned by: | everyone |
---|---|---|---|
Priority: | minor | Milestone: | BASE 3.4 |
Component: | coreplugins | Version: | |
Keywords: | Cc: |
Description (last modified by )
There have been a couple of cases on the production server when the raw data importer fails with:
net.sf.basedb.core.signal.SignalException: A handler with ID '1728751927' is already registered: net.sf.basedb.core.signal.DelegatingSignalHandler@670aa937 at net.sf.basedb.core.signal.AbstractSignalReceiver.registerSignalHandler(AbstractSignalReceiver.java:173) at net.sf.basedb.core.PluginExecutionRequest.invoke(PluginExecutionRequest.java:109) at net.sf.basedb.core.InternalJobQueue$JobRunner.run(InternalJobQueue.java:571) at java.lang.Thread.run(Thread.java:745)
Restarting the import usually resolves the problem.
Change History (4)
comment:1 by , 10 years ago
Description: | modified (diff) |
---|
comment:2 by , 10 years ago
comment:3 by , 10 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Will be fixed as part of #1901.
comment:4 by , 10 years ago
Note:
See TracTickets
for help on using tickets.
Investigating the code this seems like a strange error at first. The code in
PluginExecutionRequest
is creating a new instance ofDelegatingSignalHandler
each time it is called, so the only possible cause is that there is already another instance with the same ID. The ID is calculated based on theSystem.identityHashCode()
. Typically the hash code has been calculated by the JRE based on the memory location of the object instance and the assumption has been that it is a unique value.However, a quick search on the internet, this seems like a false assumption that may have been valid only a long time ago. In the current JRE there is no such guarantee.
So, we really need to use something else as the ID and it must be something that is unique and can be derived from a given object instance.