Giter Club home page Giter Club logo

Comments (7)

hbarsnes avatar hbarsnes commented on July 18, 2024

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.

tzaeschke avatar tzaeschke commented on July 18, 2024

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.

hbarsnes avatar hbarsnes commented on July 18, 2024

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.

tzaeschke avatar tzaeschke commented on July 18, 2024

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.

hbarsnes avatar hbarsnes commented on July 18, 2024

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.

tzaeschke avatar tzaeschke commented on July 18, 2024

I created a new issue for this: #128

Also, I added a question to the new Issue.

from zoodb.

hbarsnes avatar hbarsnes commented on July 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.