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

DietPi-Software | Java: Switch from OracleJDK to OpenJDK #1405

Merged
merged 2 commits into from
Jan 18, 2018

Conversation

MichaIng
Copy link
Owner

https://github.com/Fourdee/DietPi/issues/1401

ToDo:

+ Switch from OracleJDK to OpenJDK
@MichaIng MichaIng added this to the v6.0 milestone Jan 18, 2018
@MichaIng MichaIng self-assigned this Jan 18, 2018
@MichaIng MichaIng requested a review from Fourdee January 18, 2018 16:49
+ Fix package pinning does not force dependency installation.
+ On upgrade this should work/include dependencies, though keeping an eye on it.
@MichaIng
Copy link
Owner Author

MichaIng commented Jan 18, 2018

Testing on Jessie VM:
🈯️ SubSonic 6 installation + web ui
🈯️ SubSonic 5 installation + web ui
🈯️ MineOS installation + web ui
🈯️ Tomcat8 installation + web ui
🈺 Nukkit: Missing on http://dietpi.com/phpbb/viewtopic.php?f=8&t=5, how to test access? 😆 But installation works well!
🈺 YaCy: installation and web ui works well, but warning/error message in between:

DietPi-Software
─────────────────────────────────────────────────────
Mode: Configuring YaCy: decentralized open source search engine

grep: ../DATA/SETTINGS/yacy.conf: Datei oder Verzeichnis nicht gefunden
grep: ../DATA/SETTINGS/yacy.conf: Datei oder Verzeichnis nicht gefunden
grep: ../DATA/SETTINGS/yacy.conf: Datei oder Verzeichnis nicht gefunden
  • 😆 Still germen locale from testing, have to switch back. "didn't find file/folder". No idea what runs this grep, maybe systemctl daemon-reload?

🈺 Blynk: See https://github.com/Fourdee/DietPi/pull/1405#issuecomment-358740228
Following errors are fixed by Blynk Java 8 version: https://github.com/blynkkk/blynk-server/releases

gyp WARN EACCES user "root" does not have permission to access the dev dir "/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/9.4.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp"
  • Bizarre as root of course has full root permissions... However manual npm install -g onoff worked well and allowed me to finish installation afterwards. But after reboot, blynk does not start due to too low java version, if I understand right:
Jan 18 17:23:06 DietPi systemd[1]: Starting Blynk Server...
Jan 18 17:23:06 DietPi systemd[1]: Started Blynk Server.
Jan 18 17:23:07 DietPi java[2518]: Error: A JNI error has occurred, please check your installation and try again
Jan 18 17:23:07 DietPi java[2518]: Exception in thread "main" java.lang.UnsupportedClassVersionError: cc/blynk/server/launcher/ServerLauncher has been compiled by a more recent version of the Java Runtime (class file version 53.0), this
version of the Java Runtime only recognizes class file versions up to 52.0
Jan 18 17:23:07 DietPi java[2518]: at java.lang.ClassLoader.defineClass1(Native Method)
Jan 18 17:23:07 DietPi java[2518]: at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
Jan 18 17:23:07 DietPi java[2518]: at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
Jan 18 17:23:07 DietPi java[2518]: at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
Jan 18 17:23:07 DietPi java[2518]: at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
Jan 18 17:23:07 DietPi java[2518]: at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
Jan 18 17:23:07 DietPi java[2518]: at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
Jan 18 17:23:07 DietPi java[2518]: at java.security.AccessController.doPrivileged(Native Method)
Jan 18 17:23:07 DietPi java[2518]: at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
Jan 18 17:23:07 DietPi java[2518]: at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
Jan 18 17:23:07 DietPi java[2518]: at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
Jan 18 17:23:07 DietPi java[2518]: at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Jan 18 17:23:07 DietPi java[2518]: at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
Jan 18 17:23:07 DietPi systemd[1]: blynkserver.service: main process exited, code=exited, status=1/FAILURE
Jan 18 17:23:07 DietPi systemd[1]: Unit blynkserver.service entered failed state.

@Fourdee
Copy link
Collaborator

Fourdee commented Jan 18, 2018

@MichaIng

Nukkit: Missing on http://dietpi.com/phpbb/viewtopic.php?f=8&t=5, how to test access? 😆 But installation works well!

Needs adding :)

@Fourdee Fourdee merged commit 8e9ca7f into testing Jan 18, 2018
@Fourdee
Copy link
Collaborator

Fourdee commented Jan 18, 2018

@MichaIng

Many thanks 👍

@MichaIng
Copy link
Owner Author

@Fourdee
I really have to mark my PRs, if they are already finished/tested 😆.

But so far it looks good, just Blynk needs a never Java version. I do some research how to handle it best, if it is really just this one software title.

@Fourdee
Copy link
Collaborator

Fourdee commented Jan 18, 2018

@MichaIng

I really have to mark my PRs, if they are already finished/tested

It shows up at top "XXX has requested your review for this PR". Did you assign me to review? If so, probably best to only select me for review when its completed 😃

@MichaIng
Copy link
Owner Author

MichaIng commented Jan 18, 2018

@Fourdee
Ah yes also a solution. Not too big problem here. Just finished testing and it works on all java dependant software besides Blynk.

€: Found it: https://community.blynk.cc/t/new-blynk-server-release/17865/11
It is not about Java 8u131 vs. 8u151, but about Java 9. With recent Blynk version bump it requires Java 9. But after some people asked, there is a Java 8 version available now: https://github.com/blynkkk/blynk-server/releases
Will test it.

€€: Installation works flawlessly, web ui starts up at https://192.168.178.28:9443/admin (note: https, not http!, would need change in forum: http://dietpi.com/phpbb/viewtopic.php?f=8&t=5&start=90#p5901)
But web ui is moreless empty, no entries besides users. Config page open attempt fails with error message: State change error: undefined
But I have no idea about how to use/preconfigure Blynk, so someone with related Blynk projects would need to test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants