Closed csnyulas closed 7 years ago
Might it have something to do with this?
http://stackoverflow.com/questions/23960451/java-system-preferences-under-different-users-in-linux
(I don't believe this is Protege specific)
I start to remember that last time I debugged this problem it turned out that is related to long path names on encrypted file systems. Here is one hint to this: http://stackoverflow.com/questions/13846960/java-util-prefs-filesystempreferences-trys-to-open-broken-path
After reinstalling Ubuntu on my machine, I am not getting these issues any more, which gave me an idea for what may have caused it. In my earlier Ubuntu installation I had "double encryption", i.e. I had a system level hard drive encryption, and on top of that I also allowed Ubuntu to encrypt my home folder. The second encryption did not make too much sense in my case, as I am not sharing my laptop with other users, but I guess I did not think twice about it when the Ubuntu installer offered me this option, so I just accepted it. Seemingly, the problem was caused by the two encryption software on top of each other not being able to encrypt the very long obfuscated path names that the Java preferences created.
Now, when I have only the full disk encryption (without the home folder encryption on top of it) everything works fine.
I think that it would be nice if we would take a look into some real solution for this problem (for example to save preferences in a manner that does not interfere with the encryption software) at some point, but I will close this issue for now.
Re-opening this issue, as it is reported on the mailing list again.
Also related to #624
-- Report from mailing list --
I am having trouble with the preferences disappearing between sessions. I am using a fresh download of Protege-5.1 from today, with no plugins or extensions, and whenever I restart Protege, any changes I have dont to preferences are removed. They remain in effect during the protege session, but when I exit and restart they are gone. I am running on a ubuntu/linux machine, and I have tried deleting the .protege and .Protege folders to no effect.
-- I tried all the different ways of deleting all preferences, and they do not help. I paste the console output from a Protege session below, where I only open protege, reset preferences, and then exit. .protege/logs is attached. I think the relevant error is this:
An error occurred whilst saving the list of recent items
java.util.pref
s.BackingStoreException:
/home/dag/.java/.userPrefs/_!&!!`g">!&@![@"(!%`!|w"@!&)![@"'!%`!`g"&!%4
!@w"&!&:=/_!%k!^g"'!%`!`g"&!%4!@w"&!&8!`!"]!%`![g"^!&8!`w"&!&@=/_!'8!cg
"n!#4!c!"y!'8!d!"l!'c!~@!u!'`!~!"p!(@!bw"y!#4!bw"3!'w!.g"t!'8!~!"l!'w!.
g"p!'4!~g"l!()!~@"u!':!~@!u!&)!~@"h!(:!bw"u!'`!cg"@!()!~@"m!'`!cg"l!'4!
}w"l!(:= create failed.
I don't know why it tries to create the preferences with such a strange folder name?
Console log:
dag@dagsjobblaptop:~/Nedlastingar/Protege-5.1.0$ ./run.sh
CompilerOracle: exclude javax/swing/text/GlyphView.getBreakSpot
***********************************************************************
*********
** Protege
**
***********************************************************************
*********
----------------- Initialising and Starting the OSGi Framework --------
---------
FrameworkFactory Class: org.apache.felix.framework.FrameworkFactory
The OSGi framework has been initialised
------------------------------- Starting Bundles ----------------------
---------
Starting bundle org.protege.common
Starting bundle org.eclipse.equinox.common
Starting bundle org.eclipse.equinox.supplement
Starting bundle org.eclipse.equinox.registry
Starting bundle org.protege.editor.core.application
Starting bundle jul.to.slf4j
Starting bundle ch.qos.logback.core
Starting bundle org.eclipse.equinox.registry
Starting bundle org.apache.servicemix.bundles.aopalliance
Starting bundle com.google.inject
Starting bundle org.semanticweb.owl.owlapi
Starting bundle org.apache.servicemix.bundles.javax-inject
Starting bundle org.jsr-305
Starting bundle log4j.over.slf4j
Starting bundle org.protege.common
Starting bundle ch.qos.logback.classic
Not starting bundle com.google.inject.multibindings explicitly because
it is a fragment bundle.
Starting bundle slf4j.api
Not starting bundle com.google.inject.assistedinject explicitly because
it is a fragment bundle.
Starting bundle org.eclipse.equinox.common
Starting bundle org.apache.commons.io
Starting bundle org.protege.editor.core.application
Starting bundle org.protege.editor.owl
Starting bundle org.eclipse.equinox.supplement
Starting bundle com.google.guava
Starting bundle org.protege.ontograf
Starting bundle org.coode.dlquery
Starting bundle org.coode.owlviz
Starting bundle swrltab-plugin
Starting bundle org.coode.browser
Starting bundle uk.ac.manchester.cs.owl.explanation
Starting bundle org.protege.owl.rdf
Starting bundle existentialquery
Starting bundle cellfie
Starting bundle org.protege.editor.owl.rdf
Starting bundle code-generation
Starting bundle org.semanticweb.hermit
The OSGi framework has been started
------------------------------------ Protege --------------------------
---------
Protege Desktop
Version 5.1.0, Build
----------------------------------- Platform --------------------------
---------
Java: JVM 1.8.0_40-b26 Memory: 466M
Language: nb, Country: NO
Framework: Apache Software Foundation (1.7)
OS: linux (4.4.0-66-generic)
Processor: x86-64
------------------------------------ Plugins --------------------------
---------
Plugin: OntoGraf (2.0.3)
Plugin: DL Query (4.0.1)
Plugin: OWLViz (5.0.3)
Plugin: SWRLTab Protege 5.0+ Plugin (1.0.3)
Plugin: Browser View (OWLDoc) (3.0.3)
Plugin: Explanation Workbench (3.0.0)
Plugin: OWLAPI RDF Library (2.0.2)
Plugin: Existential Query (2.0.0)
Plugin: Cellfie Protege 5.0+ Plugin (2.1.0)
Plugin: Protege SPARQL Plugin (2.0.1)
Plugin: OWL Code Generation Plug-in (2.0.0)
Plugin: HermiT (1.3.8.413)
Creating and setting up empty (default) editor kit
OWL API Version: 4.2.6.20160910-2108
Cannot generate ontology catalog for ontology at http://www.semanticweb
.org/dag/ontologies/2017/2/untitled-ontology-2
------------------------------- Auto-update Check -------------------
-----------
Auto-update last performed: Thu Jan 01 01:00:00 CET 1970
Auto-update has not been performed today. Running it.
### Excluding compile: javax.swing.text.GlyphView::getBreakSpot
------------------------------ Running Auto-update --------------------
---------
--- Searching for plugins ---
Checking https://raw.githubusercontent.com/protegeproject/autoupdate/ma
ster/update-info/5.0.0/plugins.repository
Processing https://raw.githubusercontent.com/protegeproject/autoupd
ate/master/update-info/5.0.0/plugins.repository as a plugin registry
Cannot open remote plugin registry at raw.githubusercontent.com
(Unknown Host)
---------------------------- Disposing of Workspace -----------------
-----------
Saved tab state for 'Active Ontology' tab
Saved tab state for 'Entities' tab
Saved tab state for 'DL Query' tab
Saved tab state for 'Individuals by class' tab
Saved workspace
Disposed of 'Active Ontology' tab
Disposed of 'Entities' tab
Disposed of 'DL Query' tab
Disposed of 'Individuals by class' tab
Disposed of workspace
An error occurred whilst saving the list of recent items
java.util.prefs.BackingStoreException:
/home/dag/.java/.userPrefs/_!&!!`g">!&@![@"(!%`!|w"@!&)![@"'!%`!`g"&!%4
!@w"&!&:=/_!%k!^g"'!%`!`g"&!%4!@w"&!&8!`!"]!%`![g"^!&8!`w"&!&@=/_!'8!cg
"n!#4!c!"y!'8!d!"l!'c!~@!u!'`!~!"p!(@!bw"y!#4!bw"3!'w!.g"t!'8!~!"l!'w!.
g"p!'4!~g"l!()!~@"u!':!~@!u!&)!~@"h!(:!bw"u!'`!cg"@!()!~@"m!'`!cg"l!'4!
}w"l!(:= create failed.
at
java.util.prefs.FileSystemPreferences$7.run(FileSystemPreferences.java:
619) ~[na:1.8.0_40]
at
java.util.prefs.FileSystemPreferences$7.run(FileSystemPreferences.java:
615) ~[na:1.8.0_40]
at java.security.AccessController.doPrivileged(Native Method)
~[na:1.8.0_40]
at
java.util.prefs.FileSystemPreferences.writeBackCache(FileSystemPreferen
ces.java:614) ~[na:1.8.0_40]
at
java.util.prefs.FileSystemPreferences.syncSpiPrivileged(FileSystemPrefe
rences.java:801) ~[na:1.8.0_40]
at
java.util.prefs.FileSystemPreferences.access$2300(FileSystemPreferences
.java:50) ~[na:1.8.0_40]
at
java.util.prefs.FileSystemPreferences$12.run(FileSystemPreferences.java
:771) ~[na:1.8.0_40]
at
java.util.prefs.FileSystemPreferences$12.run(FileSystemPreferences.java
:769) ~[na:1.8.0_40]
at java.security.AccessController.doPrivileged(Native Method)
~[na:1.8.0_40]
at
java.util.prefs.FileSystemPreferences.syncSpi(FileSystemPreferences.jav
a:768) ~[na:1.8.0_40]
at
java.util.prefs.AbstractPreferences.sync2(AbstractPreferences.java:1338
) ~[na:1.8.0_40]
at
java.util.prefs.AbstractPreferences.sync2(AbstractPreferences.java:1343
) ~[na:1.8.0_40]
at
java.util.prefs.AbstractPreferences.sync2(AbstractPreferences.java:1343
) ~[na:1.8.0_40]
at
java.util.prefs.AbstractPreferences.sync2(AbstractPreferences.java:1343
) ~[na:1.8.0_40]
at
java.util.prefs.AbstractPreferences.sync(AbstractPreferences.java:1329)
~[na:1.8.0_40]
at
java.util.prefs.FileSystemPreferences.sync(FileSystemPreferences.java:7
47) ~[na:1.8.0_40]
at
java.util.prefs.FileSystemPreferences.flush(FileSystemPreferences.java:
824) ~[na:1.8.0_40]
at
org.protege.editor.core.editorkit.RecentEditorKitManager.save(RecentEdi
torKitManager.java:123) ~[protege-editor-core.jar:na]
at
org.protege.editor.core.ProtegeApplication.stop(ProtegeApplication.java
:121) [protege-editor-core.jar:na]
at
org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction
.java:667) [org.apache.felix.main.jar:na]
at org.apache.felix.framework.Felix.stopBundle(Felix.java:2538)
[org.apache.felix.main.jar:na]
at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1317)
[org.apache.felix.main.jar:na]
at
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLe
velImpl.java:304) [org.apache.felix.main.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40]
----------------------- Shutting down Protege -----------------------
Cleaning up temporary directories
dag@dagsjobblaptop:~/Nedlastingar/Protege-5.1.0$
This isn't Protege specific is it?
Closing the issue. The problem seems to be caused by the "double-encryption" in Ubuntu (http://stackoverflow.com/questions/13846960/java-util-prefs-filesystempreferences-trys-to-open-broken-path), and there is no Protege-specific solution.
Some users were successful by using only one layer of encryption (e.g., using full disk encryption vs. full disk encryption+home folder encryption). See comments in the issue.
This is still an issue for me. I've got the default software based home directory encryption in Ubuntu with no full-drive encryption.
I also have the same problem with only home directory encryption.
I (kinda) solved the problem by moving ~/.java/.userPrefs/_!\&!!... into another directory, outside my encrypted home, and created a symbolic link to this directory inside ~/.java/.userPrefs (with the same name).
Interesting solution @pchampin . Thanks for sharing. That should work for also for @jvstein .
FYI: I modified my earlier comment to remove the final inaccurate sentence.
Once I start Protege, every 30 seconds I get the following warning messages on the Protege console (which is annoying because it fills my console with useless information):
WARNING: Couldn't flush user prefs: java.util.prefs.BackingStoreException: /home/csnyulas/.java/.userPrefs/_!&!!`g">!&@![@"(!%`!|w"@!&)![@"'!%`!`g"&!%4!@w"&!&:=/_!%k!^g"'!%`!`g"&!%4!@w"&!&8!`!"]!%`![g"^!&8!`w"&!&@=/_!'8!cg"n!#4!c!"y!'8!d!"l!'c!~@!u!'`!~!"p!(@!bw"y!#4!bw"3!'w!.g"t!'8!~!"l!'w!.g"p!'4!~g"l!()!~@"u!':!~@!u!&)!~@"h!(:!bw"u!'`!cg"@!()!~@"m!'`!cg"l!'4!}w"l!(:= create failed. Sep 12, 2015 1:52:22 PM java.util.prefs.FileSystemPreferences syncWorld
OS: Ubuntu 14.04 LTS
Running it with the Java 8 delivered with Protege bundle: java version "1.8.0_40" Java(TM) SE Runtime Environment (build 1.8.0_40-b26) Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)