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

XStream, conseq. Alphabet store et al. cease to work on java 16.0.1.hs-adpt #256

Open
simlei opened this issue Apr 19, 2022 · 0 comments
Open
Assignees

Comments

@simlei
Copy link
Member

simlei commented Apr 19, 2022

In my local Eclipse RCP dev environment, java 16.0.1 from formerly AdoptOpenJDK, now Temurin (see https://sdkman.io/jdks), installed via sdkman, I get the following exception from the alphabet store which relies on xstream (which we ship in v1.3.1):

!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.ExceptionInInitializerError: Cannot access defaults field of Properties
	at com.thoughtworks.xstream.converters.collections.PropertiesConverter.<clinit>(PropertiesConverter.java:46)
	at com.thoughtworks.xstream.XStream.setupConverters(XStream.java:647)
	at com.thoughtworks.xstream.XStream.<init>(XStream.java:445)
	at com.thoughtworks.xstream.XStream.<init>(XStream.java:385)
	at com.thoughtworks.xstream.XStream.<init>(XStream.java:342)
	at org.jcryptool.crypto.classic.alphabets.tools.AlphabetPersistence.saveAlphabetsToXML(AlphabetPersistence.java:40)
	at org.jcryptool.crypto.classic.alphabets.tools.AlphabetStore.storeAlphabets(AlphabetStore.java:379)
	at org.jcryptool.crypto.classic.alphabets.tools.AlphabetStore.processAlphabetsCreation(AlphabetStore.java:201)
	at org.jcryptool.crypto.classic.alphabets.tools.AlphabetStore.init(AlphabetStore.java:180)
	at org.jcryptool.core.operations.alphabets.AlphabetsManager.<init>(AlphabetsManager.java:53)
	at org.jcryptool.core.operations.alphabets.AlphabetsManager.getInstance(AlphabetsManager.java:64)
	at org.jcryptool.crypto.classic.alphabets.preferences.AlphabetsPreferencePage.prepare(AlphabetsPreferencePage.java:120)
	at org.jcryptool.crypto.classic.alphabets.preferences.AlphabetsPreferencePage.createContents(AlphabetsPreferencePage.java:99)

(appears e.g. when opening the "Cryptography" > "Alphabets" subsection in the Preferences window)

Switching to Java 11.0.14 "fixes" this. As it seems now, just installing a JDK / JRE that works with xstream sufficiently covers all of our dev workflow without this issue getting in the way. Still, xstream is used quite often in our plugins, so this issue can't be ignored forever.

Further investigation needed:

  • whether this affects the release (should really not since we ship a working JRE for Win and Linux)
  • on which JVMs this appears also
  • whether xstream will be a problem in the future (newest, v1.4.1, seems binary incompatible to 1.3.1!)
@simlei simlei self-assigned this Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant