Comments (7)
Thanks for figuring out the source of the problem!
I've already updated our code, but I cannot yet test the fix above as I now get a different issue when trying to reopen saved PeptideShaker projects. The below error occurs both with ZooDB 0.5.2 and 0.6.0.
Basically, we have the following HashMap
HashMap<String, HashSet<Long>> proteinMap = new HashMap<>();
which can be added to our ZooDB database without any issues (of course with content added first), but when trying to extract the map from the database (after saving the PeptideShaker project) I get the following error:
java.lang.RuntimeException: Field: class java.util.HashMap proteinMap
at org.zoodb.internal.DataDeSerializer.deserializeFields2(DataDeSerializer.java:417)
at org.zoodb.internal.DataDeSerializer.readObjPrivate(DataDeSerializer.java:304)
at org.zoodb.internal.DataDeSerializer.readObject(DataDeSerializer.java:182)
at org.zoodb.internal.server.index.ObjectPosIterator.findNext(ObjectPosIterator.java:64)
at org.zoodb.internal.server.index.ObjectPosIterator.<init>(ObjectPosIterator.java:46)
at org.zoodb.internal.server.DiskAccessOneFile.readAllObjects(DiskAccessOneFile.java:284)
at org.zoodb.internal.model1p.Node1P.loadAllInstances(Node1P.java:136)
at org.zoodb.internal.Session.loadAllInstances(Session.java:472)
at org.zoodb.internal.Session.loadAllInstances(Session.java:477)
at org.zoodb.internal.Session.loadAllInstances(Session.java:477)
at org.zoodb.internal.Session.loadAllInstances(Session.java:455)
at org.zoodb.internal.query.ClassExtent.iterator(ClassExtent.java:113)
at org.zoodb.internal.query.QueryExecutor.applyQueryOnExtentV3(QueryExecutor.java:490)
at org.zoodb.internal.query.QueryExecutor.runQueryV3(QueryExecutor.java:148)
at org.zoodb.internal.query.QueryExecutor.runQuery(QueryExecutor.java:122)
at org.zoodb.jdo.impl.QueryImpl.runQuery(QueryImpl.java:549)
at org.zoodb.jdo.impl.QueryImpl.execute(QueryImpl.java:535)
at com.compomics.util.db.object.ObjectsDB.establishConnection(ObjectsDB.java:916)
at com.compomics.util.db.object.ObjectsDB.establishConnection(ObjectsDB.java:883)
at com.compomics.util.db.object.ObjectsDB.<init>(ObjectsDB.java:131)
at eu.isas.peptideshaker.utils.PsdbParent.loadPsdbFile(PsdbParent.java:220)
at eu.isas.peptideshaker.gui.PeptideShakerGUI$104.run(PeptideShakerGUI.java:6563)
Caused by: java.lang.IllegalArgumentException: Can not set final java.util.HashMap field com.compomics.util.experiment.identification.IdentificationKeys.proteinMap to java.lang.Long
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
at sun.reflect.UnsafeQualifiedObjectFieldAccessorImpl.set(UnsafeQualifiedObjectFieldAccessorImpl.java:83)
at java.lang.reflect.Field.set(Field.java:764)
at org.zoodb.internal.DataDeSerializer.deserializeFields2(DataDeSerializer.java:412)
... 21 more
Do you have any idea what would cause such an issue? I have confirmed that the content of the map (upon database insertion) is correct.
If it can help to look at the PeptideShaker and utilities code please see the branches called new_backend, i.e. https://github.com/compomics/peptide-shaker/tree/new_backend and https://github.com/compomics/compomics-utilities/tree/new_backend.
I can of course also send you the data required to reproduce the error if that would help.
Thanks in advance!
from zoodb.
Hi, sorry, I only saw the issue today. I could import, save and load a large database fine with the version of new_backend that I checked out in February. May have something changed since then that affect this? I will try to have a look tomorrow and retry with the latest version.
from zoodb.
Thanks! Yes, it is most likely something that changed in our code, as I can no longer even reopen small projects. But I simply cannot figure out what change would result in the above IllegalArgumentException? Especially given that the object added to the database seems to be fine and the error only occurs when I later try to extract it?
from zoodb.
I checked out the latest version on new_branch, but I cannot reproduce the problem, instead the program just hangs at 8% when importing my example. Maybe you could send me a more recent example file(s)?
Having said that, it looks like a problem in ZooDB, I will have a look, maybe it is easy to find.
from zoodb.
Maybe you could send me a more recent example file(s)?
Of course, here's the SearchGUI output I've used in my recent testing: http://vedlegg.uib.no/?id=c3dfb40f94fe14ca2fa0b3cc49c8cff2
from zoodb.
I created a new issue for this: #128
Also, I added a question to the new Issue.
from zoodb.
I can confirm that (if loading with one thread, as suggested in #128) the "Page type mismatch" issue is resolved when reopening large saved PeptideShaker projets.
In other words, the issue was indeed due to the error in copying files larger 2GB. You may therefore close this issue. Thanks again for the help!
from zoodb.
Related Issues (20)
- PersistenceManagerFactory getPersistenceManager() hangs up in case there is active transaction. HOT 5
- verboseToLog in DBLogger.java HOT 2
- Improve collection storage
- DB file format changes
- "Page type mismatch" after removing index HOT 7
- Removing index does sometimes not work HOT 1
- (De-)Serializing an PC object should make it DETACHED
- Detached object should not get a new OID when reattached
- java.lang.RuntimeException: Class has not been fully evolved HOT 8
- Concurrent sessions may lead DB using wrong 'head' on start-up
- Implement tool to display database file format version
- Performance decrease wrongly HOT 5
- Improve byte array/buffer handling when reading from storage
- Concurrent use of the same Query instance is not always threadsafe
- IllegalArgumentException: Can not set final [..].HashMap field [..].IdentificationKeys.proteinMap to java.lang.Long HOT 24
- Query on auto-created (and uncommitted) schema causes exception
- Investigate Java 18 (and 9) security implications
- Check whether Java 17 removal of RMI Activation (JEP 407) affects unit tests.
- multithreaded commit() may hang after updating schema HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zoodb.