FS#41639 - [java-common] java-common-wrapper: No such file or directory
Attached to Project:
Arch Linux
Opened by mitsu (mitsu) - Wednesday, 20 August 2014, 22:49 GMT
Last edited by Guillaume ALAUX (galaux) - Monday, 08 September 2014, 20:07 GMT
Opened by mitsu (mitsu) - Wednesday, 20 August 2014, 22:49 GMT
Last edited by Guillaume ALAUX (galaux) - Monday, 08 September 2014, 20:07 GMT
|
Details
After upgrade to java-common 1-5 released yesterday, I
noticed some Java applications don't start up (notably:
Freenet daemon).
Logs show the following: /usr/lib/java-common-wrapper: line 2: /usr/lib/jvm/java-default-runtime/bin/java-common-wrapper: No such file or directory /usr/lib/java-common-wrapper line 2 is: exec "${JAVA_HOME:-/usr/lib/jvm/java-default-runtime}/bin/${0##*/}" "$@" I randomly tried changing this line into: exec "${JAVA_HOME:-/usr/lib/jvm/java-default-runtime}/bin/java" "$@" And this was enough to make the wrapper start just fine. I didn't do intensive tests though. Maybe a missing symlink in the package or am I doing it wrong ? (I have no experience in Java) |
This task depends upon
Closed by Guillaume ALAUX (galaux)
Monday, 08 September 2014, 20:07 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed with icedtea-web 1.5.1-3 + java-common 1-6
Monday, 08 September 2014, 20:07 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed with icedtea-web 1.5.1-3 + java-common 1-6
java-7-openjdk/jre (default)
/usr/lib/jvm/java-default-runtime
Note: just installed java-8-openjdk, changed it as default, doing `archlinux-java fix`, without effect
When you open a bug report, please provide some more detail on how to reproduce:
- Which package did you install? I *guess* this is "freenet" from AUR?
- What script do you run to get the error? I also guess this is "/opt/freenet/run.sh start"?
If the previous are right then you could set the following in "/opt/freenet/wrapper.conf" (watch out: it seems this file is "ASCII text, with CRLF, LF line terminators". Do not mess with it.)
wrapper.java.command=/usr/lib/jvm/java-default-runtime/bin/java
Changed:
wrapper.java.command=java
Into:
wrapper.java.command=/usr/lib/jvm/java-default-runtime/bin/java
And the wrapper started up successfully. Needs to be corrected upstream by Freenet Project, thanks for the help and sorry for the trouble!
Well I think upstream should not try to figure out where the JVM is installed in the first place. Still if it really needs to know then it could rely on JAVA_HOME instead of trying to guess.
Aug 22 16:18:40 arch [14854]: IcedTea-Web c-plugin - for more info see itweb-settings debug options or console...
Aug 22 16:18:40 arch [14854]: IcedTea-Web c-plugin error manual log:
Aug 22 16:18:40 arch [14854]: Failed to spawn applet viewer Kindprozess »/usr/lib/jvm/java-default-runtime/jre/bin/java« konnte nicht ausgeführt werden (Datei oder Verzeichnis nicht gefunden)
Aug 22 16:18:40 arch [14854]: IcedTea-Web c-plugin - for more info see itweb-settings debug options or console....
Aug 22 16:18:40 arch [14854]: IcedTea-Web c-plugin error manual log:
Aug 22 16:18:40 arch [14854]: Unable to find java executable /usr/lib/jvm/java-default-runtime/jre/bin/java
So the Problem is the Path of the Symlink '/usr/lib/jvm/java-default-runtime/'
the Symlinks includes the Fullpath /usr/lib/jvm/java-default-runtime/jre/ but it should be just /usr/lib/jvm/java-default-runtime/ (without the folder jre).
If i correct the Symlink with:
sudo rm -r /usr/lib/jvm/java-default-runtime
sudo ln -s /usr/lib/jvm/java-8-openjdk /usr/lib/jvm/java-default-runtime
...no problems and it worked like a charm.
If I use the script again with:
sudo archlinux-java fix
...the manualy repaired Symlink was deleted and a new Symlink with the wrong Path in it, was created again. So the Program was unable to find java executable again.
So I think the Script should generate a Symlink just to "/usr/lib/jvm/java-8-openjdk" and NOT to "/usr/lib/jvm/java-8-openjdk/jre"....
- What JVM package are installed among official/unofficial ones listed here [0]?
- What command did you issue to have this error?
- On what "java web-App" do you try this?
- I see you have icedtea-web installed: is this the very last version (called icedtea-web) or the previous one (called icedtea-web-java7)?
Anyway, touching the symlink by hand will **not** update links available in /usr/bin. So please instead of doing so, run "archlinux-java fix".
[0] https://wiki.archlinux.org/index.php/Java#Installation
> sudo archlinux-java fix
> ...the manualy repaired Symlink was deleted and a new Symlink with the wrong Path in it, was created again. So the Program was unable to find java executable again.
Are you sure you have a JDK installed?
$ pacman -Qs java-environment
$ archlinux-java status
The official ones via extra
[gero@arch ~]$ archlinux-java status
Available Java environments:
java-8-openjdk/jre (default)
- What command did you issue to have this error?
Install the latest Icedtea (icedtea-web) from extra, start Firefox an go to https://www.java.com/de/download/installed.jsp
- On what "java web-App" do you try this?
See above
- I see you have icedtea-web installed: is this the very last version (called icedtea-web) or the previous one (called icedtea-web-java7)?
The latest "icedtea-web"
Are you sure you have a JDK installed?
No, I have installed icedtea-web with the dependencies:
local/ca-certificates-java 20140324-3
Common CA certificates (JKS keystore)
local/gjs 1.40.1-1
Javascript Bindings for GNOME
local/icedtea-web 1.5.1-1
Free web browser plugin to run applets written in Java and an implementation of Java Web Start
local/java-common 1-5
Common files for Java Environments
local/jre8-openjdk 8.u20-1
OpenJDK Java 8 full runtime environment
local/jre8-openjdk-headless 8.u20-1
OpenJDK Java 8 headless runtime environment
local/js 24.2.0-1
JavaScript interpreter and libraries
local/js17 17.0.0-1
JavaScript interpreter and libraries (legacy)
local/libreoffice-common 4.2.5-1 (libreoffice)
Common files for LibreOffice - a productivity suite that is compatible with other major office suites
local/qt5-declarative 5.3.1-1 (qt qt5)
Classes for QML and JavaScript languages
Do I need to install the whole JDK? I think the JRE is enough für IcedTea...
Do the following return an error?
# archlinux-java fix
$ java -version
(The java plugin test page you link works for me with jre8-openjdk + icedtea-web)
[gero@arch ~]$ sudo archlinux-java fix
[gero@arch ~]$ java -version
openjdk version "1.8.0_20"
OpenJDK Runtime Environment (build 1.8.0_20-b23)
OpenJDK 64-Bit Server VM (build 25.20-b22, mixed mode)
(The java plugin test page you link works for me with jre8-openjdk + icedtea-web)
With the whole JDK installed (jre8-openjdk + jdk8-openjdk + IcedTea) it works.
If I try it after "sudo pacman -Rcns jdk8-openjdk" just with jre8-openjdk + IcedTea it stops working again:
Aug 22 17:23:03 arch [15701]: Unable to find java executable /usr/lib/jvm/java-default-runtime/jre/bin/java
Aug 22 17:23:03 arch firefox.desktop[15630]: Unable to find java executable /usr/lib/jvm/java-default-runtime/jre/bin/java
What is JAVA_HOME set to?
/usr/lib/jvm/java-default-runtime
In this Symlink-Folder there is:
/usr/lib/jvm/java-default-runtime/bin
/usr/lib/jvm/java-default-runtime/lib
but the IcedTea is searching for
/usr/lib/jvm/java-default-runtime/jre/bin/java
So you think there is a Problem with IcedTea?
In the files:
/usr/share/icedtea-web/bin/itweb-settings
/usr/share/icedtea-web/bin/javaws
/usr/share/icedtea-web/bin/policyeditor
the path is set for:
JAVA=/usr/lib/jvm/java-default-runtime/jre/bin/java
...
CP=/usr/lib/jvm/java-default-runtime/jre/lib/rt.jar
...
thats wrong because with the script 'archlinux-java fix' the folder /usr/lib/jvm/java-default-runtime/ points direct to /usr/lib/jvm/java-8-openjdk/jre/ so in /usr/lib/jvm/java-default-runtime/ are only /bin and /lib and NOT /jre/bin and /jre/lib
If i fix the paths in this IcedTea-Files from
JAVA=/usr/lib/jvm/java-default-runtime/jre/bin/java
...
CP=/usr/lib/jvm/java-default-runtime/jre/lib/rt.jar
to
JAVA=/usr/lib/jvm/java-default-runtime/bin/java
...
CP=/usr/lib/jvm/java-default-runtime/lib/rt.jar
its working like it should.
So either the skript archlinux-java is wrong and should (with the JRE Package installed) point to /usr/lib/jvm/java-8-openjdk (without the folder /jre), or there is a bug in IcedTea with the paths of /usr/lib/jvm/java-default-runtime/ with just the JRE-Package installed.
should I open a new bug in IcedTea? You are the maintainer of both packages....
with just:
icedtea-web 1.5.1-2
jre8-openjdk 8.u20-1
jre8-openjdk-headless 8.u20-1
installed, the firefox plugin doesn't work at the java test page.
It works again when I install:
jdk8-openjdk 8.u20-1
Aug 31 13:05:27 arch firefox.desktop[926]: Failed to spawn applet viewer Kindprozess »/usr/lib/jvm/java-default-runtime/jre/bin/java« konnte nicht ausgeführt werden (Datei oder Verzeichnis nicht gefunden)
Aug 31 13:05:27 arch [1021]: IcedTea-Web c-plugin - for more info see itweb-settings debug options or console. See http://icedtea.classpath.org/wiki/IcedTea-Web#Filing_bugs for help.
Aug 31 13:05:27 arch [1021]: IcedTea-Web c-plugin error manual log:
Aug 31 13:05:27 arch [1021]: Failed to spawn applet viewer Kindprozess »/usr/lib/jvm/java-default-runtime/jre/bin/java« konnte nicht ausgeführt werden (Datei oder Verzeichnis nicht gefunden)
Aug 31 13:05:27 arch [1021]: IcedTea-Web c-plugin - for more info see itweb-settings debug options or console. See http://icedtea.classpath.org/wiki/IcedTea-Web#Filing_bugs for help.
Aug 31 13:05:27 arch [1021]: IcedTea-Web c-plugin error manual log:
Aug 31 13:05:27 arch [1021]: Unable to find java executable /usr/lib/jvm/java-default-runtime/jre/bin/java
Packages installed:
java-common-1-5
jre8-openjdk-8.u20-1
jre8-openjdk-headless-8.u20-1
icedtea-web-1.5.1-2
Ok, so Icedtea-web ABSOLUTELY NEEDS to know whether the current JVM is a jdk or a jre as it hardcodes paths to jars and binaries! So I'm thinking about adding a "jre" link to java-common. That's how Fedora does it. Debian… well they have 2 packages one for OpenJDK 8 and the other for OpenJDK 7.
icedtea-web 1.5.1-2 -> 1.5.1-3
java-common 1-5 -> 1-6
the java test page works in Firefox using the jre8 packages only.
Thanks.