Comments (6)
That is a crazy coincidence, I usually don't work with java at all. But the two last tasks in my Work, and here are all related to the exact same thing :P
Anyway this workaround worked perfectly:
/usr/bin/printf '\xfe\xed\xfe\xed\x00\x00\x00\x02\x00\x00\x00\x00\xe2\x68\x6e\x45\xfb\x43\xdf\xa4\xd9\x92\xdd\x41\xce\xb6\xb2\x1c\x63\x30\xd7\x92' > /etc/ssl/certs/java/cacerts /var/lib/dpkg/info/ca-certificates-java.postinst configure
But this workaround is bad for anything that is not a test machine since it overwrites the cacerts file.
From what I understand from the second link and from my limited knowledge on the cacerts file, all you need to change is for the relevant code to either run with:
-Djavax.net.ssl.trustStorePassword=changeit
or inside the code itself do:
System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
at the very beginning.
This should work for both old and new java versions.
from ijava.
This looks like an issue with the openjdk installation. I feel like I've seen similar things around certificates and openjdk while learning about getting all the docker stuff setup for the Binder repo.
Potentially related is docker-library/openjdk#145. See also https://github.com/mikaelhg/broken-docker-jdk9-cacerts for a more detailed explanation and some potential fixes (please let me know if you try any that work for you). That repository I linked also explicitly mentions Ubuntu 18.04 and says that the problem exists from >=jdk9.
I would like to leave this open even if you find a workaround that works in case others come across the problem. Thanks for the report!
```
P.S. For multi-line code blocks, use an opening and closing triple backtick each on their own line
or indent the whole block with 4 spaces. :)
```
from ijava.
Yes it is not the nicest workaround. I believe what is going on now is just waiting for a version bump in the debian package as it is only a problem on openjdk for linux x64 (https://bugs.java.com/view_bug.do?bug_id=8189357). There was a pretty quick EOL for java 9 and we are on 10 currently but it looks like 11 is the planned long term support release (along with 8 as it was before jigsaw). I've had luck with 10 so far which maybe I should include in the readme in case users are only installing a newer jdk to try the project.
Thanks for the update!
from ijava.
I really think you should add -Djavax.net.ssl.trustStorePassword=changeit to the build since it should still solve the issue, and if changeit is set to a var that a user can change it will also allow people with custom java stores to be able to work with IJava as well.
If I will have time I will try to check this option and submit a fix.
from ijava.
A quick fix I did (I assume that is not the proper way to do it, so I am just showing this as a proof of concept, or another potential workaround)
git diff
diff --git a/gradlew b/gradlew
old mode 100644
new mode 100755
index cccdd3d..0ff933c
--- a/gradlew
+++ b/gradlew
@@ -28,7 +28,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
+DEFAULT_JVM_OPTS="-Djavax.net.ssl.trustStorePassword=changeit"
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Right now it fails due to a new issue (maybe its something temporary) but it fails with the previous workaround as well so its unrelated:
./gradlew installKernel
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
FAILURE: Build failed with an exception.
* Where:
Build file '/home/ubuntu/IJava/build.gradle' line: 4
* What went wrong:
Error resolving plugin [id: 'com.github.hierynomus.license', version: '0.14.0']
> Could not resolve all dependencies for configuration 'detachedConfiguration1'.
> Could not determine artifacts for com.github.hierynomus.license:com.github.hierynomus.license.gradle.plugin:0.14.0
> Could not get resource 'https://plugins.gradle.org/m2/com/github/hierynomus/license/com.github.hierynomus.license.gradle.plugin/0.14.0/com.github.hierynomus.license.gradle.plugin-0.14.0.jar'.
> Could not HEAD 'https://plugins.gradle.org/m2/com/github/hierynomus/license/com.github.hierynomus.license.gradle.plugin/0.14.0/com.github.hierynomus.license.gradle.plugin-0.14.0.jar'.
> Read timed out
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 40s
from ijava.
I solved this problem by switching the operating system to Ubuntu 18.10.
If you'r in a container just change the dockerfile to: FROM ubuntu:18.10
Ubuntu 18.04 seems like have a problem with java certificates just like said in
https://stackoverflow.com/questions/6784463/error-trustanchors-parameter-must-be-non-empty/25188331#25188331
from ijava.
Related Issues (20)
- Google Colab IJava Notebook stuck at "Connecting..." HOT 2
- The %%loadFromPOM seems to fail when importing BOMs HOT 2
- Interested in IJava
- How to import custom script ? HOT 4
- Code-inspection does not work.
- No colored or user-friendly error message displayed
- How to programatically generate Markdown HOT 1
- java kenrnel reflecting for only admin not reflecting to students
- executing java cell programmatically
- Error loading binder HOT 2
- ./gradlew installkernel not working
- maintenance status == discountinued? HOT 1
- idea: possible to add debugger to IJava on Google Colab? HOT 3
- how to use %classpath magic correctly? HOT 2
- Is there a magic command to set java.library.path?
- is it possible to limit which java packages require no import statements? HOT 2
- When I run `python3 install.py --sys-prefix`, I encounter ModuleNotFoundError: No module named ‘jupyter_client’? HOT 1
- %%loadFromPOM doesn't work for tika-parsers-standard-package after the kernel restart HOT 2
- %classpath and %jars doen't work in Windows
- Supported version of iJava
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ijava.