[
https://issues.apache.org/jira/browse/DAEMON-358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15694172#comment-15694172
]
Gustavo Romero commented on DAEMON-358:
---------------------------------------
Hi Mark,
I just compiled the trunk HEAD (which contains the fix you pointed out):
Path: unix
URL: http://svn.apache.org/repos/asf/commons/proper/daemon/trunk/src/native/unix
Relative URL: ^/commons/proper/daemon/trunk/src/native/unix
Repository Root: http://svn.apache.org/repos/asf
Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
Revision: 1771220
Node Kind: directory
Last Changed Author: markt
Last Changed Rev: 1768609
Last Changed Date: 2016-11-07 18:23:18 -0500 (Mon, 07 Nov 2016)
but the path is not correct also there:
$ ./jsvc -debug -user gromero -java-home
/usr/lib/jvm/java-1.8.0-openjdk-ppc64el -cp
/usr/share/java/apache-commons-daemon.jar:/root/my.jar MyClass -start
+-- DUMPING PARSED COMMAND LINE ARGUMENTS --------------
| Detach: True
| Show Version: No
| Show Help: No
| Check Only: Disabled
| Stop: False
| Wait: 0
| Run as service: No
| Install service: No
| Remove service: No
| JVM Name: "null"
| Java Home: "/usr/lib/jvm/java-1.8.0-openjdk-ppc64el"
| PID File: "/var/run/jsvc.pid"
| User Name: "gromero"
| Extra Options: 1
| "-Djava.class.path=/usr/share/java/apache-commons-daemon.jar:/root/my.jar"
| Class Invoked: "MyClass"
| Class Arguments: 1
| "-start"
+-------------------------------------------------------
Cannot set supplement group list for user 'gromero'
No need to change user to 'gromero'!
User 'gromero' validated
Attempting to locate Java Home in /usr/lib/jvm/java-1.8.0-openjdk-ppc64el
Attempting to locate VM configuration file
/usr/lib/jvm/java-1.8.0-openjdk-ppc64el/jre/lib/jvm.cfg
Attempting to locate VM configuration file
/usr/lib/jvm/java-1.8.0-openjdk-ppc64el/lib/jvm.cfg
Attempting to locate VM configuration file
/usr/lib/jvm/java-1.8.0-openjdk-ppc64el/jre/lib/powerpc64le/jvm.cfg
Attempting to locate VM configuration file
/usr/lib/jvm/java-1.8.0-openjdk-ppc64el/lib/powerpc64le/jvm.cfg
VM configuration file not found
Attempting to locate VM library
/usr/lib/jvm/java-1.8.0-openjdk-ppc64el/jre/lib/powerpc64le/classic/libjvm.so
Attempting to locate VM library
/usr/lib/jvm/java-1.8.0-openjdk-ppc64el/jre/lib/powerpc64le/server/libjvm.so
Attempting to locate VM library
/usr/lib/jvm/java-1.8.0-openjdk-ppc64el/jre/lib/powerpc64le/client/libjvm.so
Attempting to locate VM library
/usr/lib/jvm/java-1.8.0-openjdk-ppc64el/jre/lib/powerpc64le/libjvm.so
...
So it's still looking for $JAVA_HOME/*/powerpc64le which is wrong.
Could you please verify that again?
I can test it on a Power machine if it makes sense for you.
Thanks
> PPC64: jsvc fails to find JVM jvm.cfg file and shared objects due to wrong
> path
> -------------------------------------------------------------------------------
>
> Key: DAEMON-358
> URL: https://issues.apache.org/jira/browse/DAEMON-358
> Project: Commons Daemon
> Issue Type: Bug
> Components: Jsvc
> Affects Versions: 1.0.13
> Reporter: Gustavo Romero
> Attachments: jvsc-ppc64.patch
>
> Original Estimate: 0.75h
> Remaining Estimate: 0.75h
>
> On ppc64 and ppc64le archs jsvc looks for jvm.cfg and JVM shared objects in
> the wrong path. Be it used with IBM Java or OpenJDK (where the problem was
> first encountered), there is no dir called power64 or power64le. Instead
> ppc64 and ppc64le are used. In doing so, it fails with "Cannot find any VM in
> Java Home"
>
> Contact Information = [email protected]
>
> uname output:
> Linux gromero18 3.10.0-505.el7.ppc64le #1 SMP Tue Sep 6 11:09:32 EDT 2016
> ppc64le ppc64le ppc64le GNU/Linux
>
> Machine Type = pKVM
>
> Debugger:
> A debugger is not configured
>
> Steps to Reproduce:
> yum install apache-commons-daemon-jsvc
> # cat MyClass.java
> public class MyClass {
> public void init(String[] args) {
> System.out.println("Init...");
> }
> public void start() {
> System.out.println("Start...");
> }
> public void stop() {
> System.out.println("Stop...");
> }
> public void destroy() {
> System.out.println("Destroy...");
> }
> }
> # javac MyClass.java
> # jar cvf my.jar MyClass.class
> # /bin/jsvc -debug -user root -java-home
> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.ppc64le -cp
> /usr/share/java/apache-commons-daemon.jar:/root/my.jar MyClass -start
> Then:
> Attempting to locate Java Home in
> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.ppc64le
> Attempting to locate VM configuration file
> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.ppc64le/jre/lib/jvm.cfg
> Attempting to locate VM configuration file
> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.ppc64le/lib/jvm.cfg
> Attempting to locate VM configuration file
> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.ppc64le/jre/lib/powerpc64le/jvm.cfg
> Attempting to locate VM configuration file
> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.ppc64le/lib/powerpc64le/jvm.cfg
> VM configuration file not found
> ...
>
> Java Version: openjdk version "1.8.0_111" OpenJDK Runtime Environment (build
> 1.8.0_111-b15) OpenJDK 64-Bit Server VM (build 25.111-b15, mixed mode)
> Userspace rpm:
> apache-commons-daemon-jsvc-1.0.13-6.el7.ppc64le.rpm
> The userspace tool has the following bit modes: 64-bit
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)