Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nullpointer exception #2656

Closed
bernhard-kleine opened this issue Mar 17, 2017 · 10 comments
Closed

nullpointer exception #2656

bernhard-kleine opened this issue Mar 17, 2017 · 10 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs groups status: waiting-for-feedback The submitter or other users need to provide more information about the issue

Comments

@bernhard-kleine
Copy link

bernhard-kleine commented Mar 17, 2017

JabRef 3.8.2
windows 7 6.1 amd64
Java 1.8.0_121

I have no idea what went wrong, either the standard version not the snapshot show any data, the program is running, however. Maybe you can make sense of it.

using
java -jar JabRef-3.8.2.jar --debug -b
the program starts correctly. A test.bib consisting of one entry could be loaded. The files which I have been working on lately, however, could not be loaded.
Files can be made available.

13:53:26.168 [JabRef CachedThreadPool] ERROR net.sf.jabref.FallbackExceptionHandler - Uncaught exception Occurred in Thread[JabRef CachedThreadPool,6,main]
java.lang.NullPointerException: null
	at java.util.Objects.requireNonNull(Unknown Source) ~[?:1.8.0_121]
	at net.sf.jabref.model.groups.GroupTreeNode.<init>(GroupTreeNode.java:29) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.model.groups.GroupTreeNode.fromGroup(GroupTreeNode.java:33) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.logic.importer.util.GroupsParser.importGroups(GroupsParser.java:43) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.logic.importer.util.MetaDataParser.parse(MetaDataParser.java:63) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.logic.importer.util.MetaDataParser.parse(MetaDataParser.java:33) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.logic.importer.fileformat.BibtexParser.parseFileContent(BibtexParser.java:218) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.logic.importer.fileformat.BibtexParser.parse(BibtexParser.java:150) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.logic.importer.fileformat.BibtexImporter.importDatabase(BibtexImporter.java:70) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.logic.importer.Importer.importDatabase(Importer.java:65) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.logic.importer.fileformat.BibtexImporter.importDatabase(BibtexImporter.java:62) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.logic.importer.OpenDatabase.loadDatabase(OpenDatabase.java:64) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.gui.importer.actions.OpenDatabaseAction.openTheFile(OpenDatabaseAction.java:212) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.gui.importer.actions.OpenDatabaseAction.lambda$openFiles$0(OpenDatabaseAction.java:152) ~[JabRef-3.8.2.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:1.8.0_121]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_121]
13:55:02.488 [JabRef CachedThreadPool] ERROR net.sf.jabref.FallbackExceptionHandler - Uncaught exception Occurred in Thread[JabRef CachedThreadPool,6,main]
java.lang.NullPointerException: null
	at java.util.Objects.requireNonNull(Unknown Source) ~[?:1.8.0_121]
	at net.sf.jabref.model.groups.GroupTreeNode.<init>(GroupTreeNode.java:29) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.model.groups.GroupTreeNode.fromGroup(GroupTreeNode.java:33) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.logic.importer.util.GroupsParser.importGroups(GroupsParser.java:43) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.logic.importer.util.MetaDataParser.parse(MetaDataParser.java:63) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.logic.importer.util.MetaDataParser.parse(MetaDataParser.java:33) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.logic.importer.fileformat.BibtexParser.parseFileContent(BibtexParser.java:218) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.logic.importer.fileformat.BibtexParser.parse(BibtexParser.java:150) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.logic.importer.fileformat.BibtexImporter.importDatabase(BibtexImporter.java:70) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.logic.importer.Importer.importDatabase(Importer.java:65) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.logic.importer.fileformat.BibtexImporter.importDatabase(BibtexImporter.java:62) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.logic.importer.OpenDatabase.loadDatabase(OpenDatabase.java:64) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.gui.importer.actions.OpenDatabaseAction.openTheFile(OpenDatabaseAction.java:212) ~[JabRef-3.8.2.jar:?]
	at net.sf.jabref.gui.importer.actions.OpenDatabaseAction.lambda$openFiles$0(OpenDatabaseAction.java:152) ~[JabRef-3.8.2.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:1.8.0_121]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_121]

@stefan-kolb stefan-kolb added groups bug Confirmed bugs or reports that are very likely to be bugs labels Mar 17, 2017
@bernhard-kleine
Copy link
Author

The file could be loaded when removing the group tree in texstudio.

@Comment{jabref-meta: groupstree:
0 AllEntriesGroup:;
1 StaticGroup:metabolism\;0\;1\;\;\;\;;
1 StaticGroup:brownAdiposeTissue\;0\;1\;\;\;\;;
1 StaticGroup:whiteAdiposeTissue\;0\;1\;\;\;\;;
1 StaticGroup:Thyroid hormone\;0\;1\;\;\;\;;
1 StaticGroup:CircadianRegulation\;0\;1\;\;\;\;;
1 StaticGroup:EpigeneticRegulation\;0\;1\;\;\;\;;
1 StaticGroup:PPAR\;0\;1\;\;\;\;;
1 StaticGroup:adrenegicControl\;0\;1\;\;\;\;;
1 StaticGroup:Insulin\;0\;1\;\;\;\;;
1 StaticGroup:UCP1\;0\;1\;\;\;\;;
1 StaticGroup:bile\;0\;1\;\;\;\;;
1 StaticGroup:miRNA\;0\;1\;\;\;\;;
1 StaticGroup:sexual dimorphism\;0\;1\;\;\;\;;
1 StaticGroup:exercise\;0\;1\;\;\;\;;
1 StaticGroup:PCSK9\;0\;1\;\;\;\;;
1 StaticGroup:numbers according Lipidstffwechsel_scheme2\;0\;1\;\;\;\;;
2 StaticGroup:1 Fatty Acids\;0\;0\;\;\;\;;
3 StaticGroup:oxidation\;0\;1\;\;\;\;;
4 StaticGroup:beta oxidation\;0\;1\;\;\;\;;
4 StaticGroup:omega oxidation\;0\;1\;\;\;\;;
2 StaticGroup:2 Lipids\;0\;0\;\;\;\;;
3 StaticGroup:lipogenesis\;0\;1\;\;\;\;;
3 StaticGroup:lipolysis\;0\;1\;\;\;\;;
3 StaticGroup:lipid storage\;0\;1\;\;\;\;;
3 StaticGroup:lipoproteins\;0\;1\;\;\;\;;
3 StaticGroup:lipid sensing\;0\;1\;\;\;\;;
3 StaticGroup:lipid droplets\;0\;1\;\;\;\;;
3 StaticGroup:Lipase\;0\;1\;\;\;\;;
2 StaticGroup:3 cells\;0\;1\;\;\;\;;
2 StaticGroup:4 Organs\;0\;1\;\;\;\;;
2 StaticGroup:5 hormones\;0\;1\;\;\;\;;
3 StaticGroup:Adiponectin\;0\;1\;\;\;\;;
3 StaticGroup:ANP et al.\;0\;1\;\;\;\;;
3 StaticGroup:apelin\;2\;1\;\;\;\;;
4 StaticGroup:Apelin\;0\;1\;\;\;\;;
3 StaticGroup:bileAcid\;0\;1\;\;\;\;;
3 StaticGroup:BMP\;0\;1\;\;\;\;;
3 StaticGroup:Ceramides\;0\;1\;\;\;\;;
3 StaticGroup:Endocannabinoid\;0\;1\;\;\;\;;
3 StaticGroup:FGF19\;0\;1\;\;\;\;;
3 StaticGroup:FGF21\;0\;1\;\;\;\;;
3 StaticGroup:GLP\;0\;1\;\;\;\;;
3 StaticGroup:hormone receptors\;0\;1\;\;\;\;;
4 StaticGroup:FXR\;0\;1\;\;\;\;;
3 StaticGroup:Incretin\;0\;1\;\;\;\;;
3 StaticGroup:Irisin/FNDC5\;0\;1\;\;\;\;;
3 StaticGroup:leptin\;0\;1\;\;\;\;;
3 StaticGroup:NatriureticProteins\;0\;1\;\;\;\;;
3 StaticGroup:Thyroid hormone\;0\;1\;\;\;\;;
3 StaticGroup:Ghrelin/obestatin\;0\;1\;\;\;\;;
3 StaticGroup:steroids\;0\;1\;\;\;\;;
3 StaticGroup:GH\;0\;1\;\;\;\;;
2 StaticGroup:6 Lipid Metabolism\;0\;0\;\;\;\;;
3 StaticGroup:cholesterol metabolism\;0\;1\;\;\;\;;
2 StaticGroup:7 Energy metabolism\;0\;1\;\;\;\;;
2 StaticGroup:8 White adipose tissue\;0\;1\;\;\;\;;
2 StaticGroup:9 Beige adipose tissue\;0\;1\;\;\;\;;
2 StaticGroup:10 Brown adipose tissue\;0\;1\;\;\;\;;
2 StaticGroup:11 Paracrine regulators\;0\;1\;\;\;\;;
2 StaticGroup:12 Carbohydrate metabolism\;0\;1\;\;\;\;;
2 StaticGroup:13 Protein metabolism\;0\;1\;\;\;\;;
2 StaticGroup:14 Feeding\;0\;1\;\;\;\;;
2 StaticGroup:15 Satiety\;0\;1\;\;\;\;;
2 StaticGroup:16 Enzymes\;0\;1\;\;\;\;;
}

@tobiasdiez
Copy link
Member

tobiasdiez commented Mar 17, 2017

The latest development version does not have any problems with this group tree. Can you please try the build from http://builds.jabref.org/master/. Note, that the serialized group data is not compatible with older versions (i.e. bib files created using the new version are not expected to work in versions prior to 4.0).

@tobiasdiez tobiasdiez added the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Mar 17, 2017
@bernhard-kleine
Copy link
Author

Worked in the latest snapshot from today but not from yesterday???
What has changed?
Did I understand you well that 3.8.2 will not open the files which were saved with the latest snapshot? This would mean that changes to the group tree (order, hierarchy) can no longer be performed. Until now one could change to 3.8.2 to work on the groups tree.

@tobiasdiez
Copy link
Member

There were quite a few changes in the past days (see https://github.com/JabRef/jabref/commits/master).

Yes, the groups tree written with the new version is incompatible with JabRef 3.8. and thus the older version will not be able to open the file / parse the groups tree. With the recent changes to 4.0 you can now reorder the groups by drag and drop. Note also that 4.0 not yet even released as an alpha version, so missing features and/or exceptions are expected (although we of course appreciate early testers and their feedback!).

@bernhard-kleine
Copy link
Author

bernhard-kleine commented Mar 17, 2017

I would like to remind you that in a complex tree simply dragging an entry to a position only puts this in hierarchy below the entry just above. What is missing to move this entry between two entries. This seems not yet(?) be possible.

@Siedlerchr
Copy link
Member

@bernhard-kleine Could you give an example please? Drag and Drop from entries to groups works also in the latest version.
Not sure if I understand you correct, you want to move Entry A in the group X above/below entry B in the group?
Well, that still depends on your Sort-Order in the entry table

@bernhard-kleine
Copy link
Author

bernhard-kleine commented Mar 17, 2017

I would like to sort the entries below "5 hormones" according to the alphabet. This involves at the moment dragging the entries individually in the alphabetical order to "5 hormones". Otherwise it is not possible so far. It would be easy if one could drag e.g. adiponectin to a place between 5 hormones and bileAcid.

grafik

@Siedlerchr
Copy link
Member

@bernhard-kleine Ah thanks for the information. Now it is more clear. Could you please open a new issue for that problem/enhanchement?

@bernhard-kleine
Copy link
Author

Crazy! You removed the whole manipulation on the groups tree and want each issue to be separately raised? Why not put it back in its entire scope without being begged for single chunks?

@tobiasdiez
Copy link
Member

Yes, we would kindly ask you to raise new problems in new issues (or leave a comment in #2599 for smaller things). It is just more convenient and in this way we make sure not to loose a good suggestion because it is buried deep in a closed and unrelated issue.

I think you have a good point and we should improve the drag and drop behavior (I believe the resorting feature you suggested is not present in <= 3.8). Thus I added it to #2599.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs groups status: waiting-for-feedback The submitter or other users need to provide more information about the issue
Projects
None yet
Development

No branches or pull requests

4 participants