Bug 918110 - Library commons-daemon-1.0.13.jar is missing in native packages
Summary: Library commons-daemon-1.0.13.jar is missing in native packages
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: unspecified
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ER3
: EAP 6.1.0
Assignee: Vaclav Tunka
QA Contact: Jan Stefl
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-05 13:54 UTC by Jan Stefl
Modified: 2013-09-09 15:59 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-23 18:37:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patched daemon .jar file (23.73 KB, application/x-java-archive)
2013-03-05 16:10 UTC, Mladen Turk
no flags Details

Description Jan Stefl 2013-03-05 13:54:59 UTC
There are following problems
1. Library commons-daemon-1.0.13.jar is not present, it could be built from jboss-eap-native-6.1.0.ER1-RHEL-src and copied into JBOSS_HOME/bin.
2. There is no class implementing interface org.apache.commons.daemon.Daemon so execution of jsvc command finishes with "java.lang.NoSuchMethodException: org.jboss.modules.Main.init([Ljava.lang.String;)", see below.


I tried to run EAP with JSVC.
./jsvc  -debug -cp `pwd`/jboss-modules.jar:`pwd`/commons-daemon-1.0.13.jar -outfile `pwd`/jboss.out -errfile `pwd`/jboss.err -pidfile `pwd`/jboss.pid org.jboss.modules.Main

content of jboss.out:
--------------------------------------------------------
Switching umask back to 002 from 077
Using default JVM in /home/jstefl/Dropbox/Private/dev/tools/java/jre/lib/amd64/server/libjvm.so
Attemtping to load library /home/jstefl/Dropbox/Private/dev/tools/java/jre/lib/amd64/server/libjvm.so
JVM library /home/jstefl/Dropbox/Private/dev/tools/java/jre/lib/amd64/server/libjvm.so loaded
JVM library entry point found (0x6C24BB40)
+-- DUMPING JAVA VM CREATION ARGUMENTS -----------------
| Version:                       0x010004
| Ignore Unrecognized Arguments: False
| Extra options:                 1
|   "-Djava.class.path=/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/jboss-modules.jar:/media/sf_Dev/eap/6.1.0.ER1/jboss-eap-6.1/bin/commons-daemon-1.0.13.jar" (0x00000000)
+-------------------------------------------------------
| Internal options:              4
|   "-Dcommons.daemon.process.id=6140" (0x00000000)
|   "-Dcommons.daemon.process.parent=6139" (0x00000000)
|   "-Dcommons.daemon.version=1.0.13" (0x00000000)
|   "abort" (0x00406990)
+-------------------------------------------------------
Java VM created successfully
Class org/apache/commons/daemon/support/DaemonLoader found
Native methods registered
java_init done
Daemon loading...
java.lang.NoSuchMethodException: org.jboss.modules.Main.init([Ljava.lang.String;)
	at java.lang.Class.getMethod(Class.java:1622)
	at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:176)
Cannot load daemon
java_load failed
Service exit with a return value of 3
--------------------------------------------------------

Comment 1 Jan Stefl 2013-03-05 15:41:01 UTC
Actual state
1. commons-daemon-1.0.13.jar will be build prod. team
2. jsvc command above is wrong, investigation is under progress, but it looks like now, that it should fix problem

Comment 2 Mladen Turk 2013-03-05 16:10:10 UTC
Created attachment 705535 [details]
Patched daemon .jar file

Comment 3 Jan Stefl 2013-03-05 17:02:43 UTC
It's almost working.

Command
./jsvc  -debug \
-cp /home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/jboss-modules.jar:`pwd`/commons-daemon-1.0.13a.jar \
-outfile `pwd`/jboss.out \
-errfile `pwd`/jboss.err \
-pidfile `pwd`/jboss.pid \
-Djboss.home.dir=/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1 \
-Djboss.server.base.dir=/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/standalone \
-D[Standalone] -XX:+UseCompressedOops -Xms1303m -Xmx1303m -XX:MaxPermSize=256m \
-Djava.net.preferIPv4Stack=true \
-Djboss.modules.system.pkgs=org.jboss.byteman \
-Djava.awt.headless=true  \
-Dorg.jboss.boot.log.file=/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/standalone/log/server.log \
-Dlogging.configuration=file:/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/standalone/configuration/logging.properties \  @org.jboss.modules.Main \
-start-method main \
-mp /home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/modules \
-jaxpmodule javax.xml.jaxp-provider


produces
+-- 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:       "null"
| PID File:        "/media/sf_Dev/eap/6.1.0.ER1/jboss-eap-6.1/bin/jboss.pid"
| User Name:       "null"
| Extra Options:   13
|   "-Djava.class.path=/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/jboss-modules.jar:/media/sf_Dev/eap/6.1.0.ER1/jboss-eap-6.1/bin/commons-daemon-1.0.13a.jar"
|   "-Djboss.home.dir=/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1"
|   "-Djboss.server.base.dir=/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/standalone"
|   "-D[Standalone]"
|   "-XX:+UseCompressedOops"
|   "-Xms1303m"
|   "-Xmx1303m"
|   "-XX:MaxPermSize=256m"
|   "-Djava.net.preferIPv4Stack=true"
|   "-Djboss.modules.system.pkgs=org.jboss.byteman"
|   "-Djava.awt.headless=true"
|   "-Dorg.jboss.boot.log.file=/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/standalone/log/server.log"
|   "-Dlogging.configuration=file:/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/standalone/configuration/logging.properties"
| Class Invoked:   "@org.jboss.modules.Main"
| Class Arguments: 6
|   "-start-method"
|   "main"
|   "-mp"
|   "/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/modules"
|   "-jaxpmodule"
|   "javax.xml.jaxp-provider"
+-------------------------------------------------------


+-- DUMPING JAVA VM CREATION ARGUMENTS -----------------
| Version:                       0x010004
| Ignore Unrecognized Arguments: False
| Extra options:                 13
|   "-Djava.class.path=/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/jboss-modules.jar:/media/sf_Dev/eap/6.1.0.ER1/jboss-eap-6.1/bin/commons-daemon-1.0.13a.jar" (0x00000000)
|   "-Djboss.home.dir=/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1" (0x00000000)
|   "-Djboss.server.base.dir=/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/standalone" (0x00000000)
|   "-D[Standalone]" (0x00000000)
|   "-XX:+UseCompressedOops" (0x00000000)
|   "-Xms1303m" (0x00000000)
|   "-Xmx1303m" (0x00000000)
|   "-XX:MaxPermSize=256m" (0x00000000)
|   "-Djava.net.preferIPv4Stack=true" (0x00000000)
|   "-Djboss.modules.system.pkgs=org.jboss.byteman" (0x00000000)
|   "-Djava.awt.headless=true" (0x00000000)
|   "-Dorg.jboss.boot.log.file=/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/standalone/log/server.log" (0x00000000)
|   "-Dlogging.configuration=file:/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/standalone/configuration/logging.properties" (0x00000000)
+-------------------------------------------------------
| Internal options:              4
|   "-Dcommons.daemon.process.id=7923" (0x00000000)
|   "-Dcommons.daemon.process.parent=7922" (0x00000000)
|   "-Dcommons.daemon.version=1.0.13" (0x00000000)
|   "abort" (0x00406990)
+-------------------------------------------------------
Java VM created successfully
Class org/apache/commons/daemon/support/DaemonLoader found
Native methods registered
java_init done
Daemon loading...
Daemon loaded successfully
java_load done
No module specified
Service exit with a return value of 1




Any ideas how to handle -mp and -jaxpmodule arguments?

Comment 4 Jan Stefl 2013-03-05 17:21:43 UTC
For fixies in commons-deamons.X.Y.Z.jar I created new issue: https://bugzilla.redhat.com/show_bug.cgi?id=918199

This remains as issue for productization.

Comment 5 Mladen Turk 2013-03-05 17:27:06 UTC
Think you need to add org.jboss.as.standalone after -jaxpmodule javax.xml.jaxp-provider.

Comment 6 Jan Stefl 2013-03-05 17:49:08 UTC
It works!

./jsvc  -debug \
-cp /home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/jboss-modules.jar:`pwd`/commons-daemon-1.0.13a.jar \
-outfile `pwd`/jboss.out \
-errfile `pwd`/jboss.err \
-pidfile `pwd`/jboss.pid \
-Djboss.home.dir=/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1 \
-Djboss.server.base.dir=/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/standalone \
-D[Standalone] -XX:+UseCompressedOops -Xms1303m -Xmx1303m -XX:MaxPermSize=256m \
-Djava.net.preferIPv4Stack=true \
-Djboss.modules.system.pkgs=org.jboss.byteman \
-Djava.awt.headless=true  \
-Dorg.jboss.boot.log.file=/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/standalone/log/server.log \
-Dlogging.configuration=file:/home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/standalone/configuration/logging.properties \  @org.jboss.modules.Main \
-start-method main \
-mp /home/jstefl/Dev/eap/6.1.0.ER1/jboss-eap-6.1/modules \
-jaxpmodule javax.xml.jaxp-provider
org.jboss.as.standalone

So commons-daemons could be incorporated into next builds with Mladen fixies.

Comment 8 Vaclav Tunka 2013-03-06 17:14:20 UTC
The title of this issue is little bit misleading. jakarta-commons-daemon 1.0.3 was present in the distribution from ER1.

https://brewweb.devel.redhat.com/archiveinfo?archiveID=327936
http://www.qa.jboss.com/xbuildroot/packages/jboss-eap-native-utils/6.1.0/2.sun10/i386/build.log

At least for Windows and Solaris platforms.

You are probably referring to apache-commons-daemon-eap6. We will include the patches for ER3 build, moving discussion to Bug 918199.

Comment 9 Vaclav Tunka 2013-03-06 17:16:26 UTC
apache-commons-daemon-jsvc-eap6-1.0.13-1.redhat_1.ep6.*
https://brewweb.devel.redhat.com/buildinfo?buildID=256743
https://brewweb.devel.redhat.com/buildinfo?buildID=256753

Comment 10 Jan Stefl 2013-03-07 09:32:44 UTC
Ok, I am not 100% about jar name (because it is missing), but package what I need could be build from commons-daemon-1.0.13-src which is located jboss-eap-native-6.1.0.ER1-{RHEL,sun,win}.src.zip.

Comment 11 Jan Stefl 2013-03-07 09:34:32 UTC
And name of the package after build is "commons-daemon-1.0.13.jar", so I mentioned it in title.

Comment 12 Vaclav Tunka 2013-03-08 14:15:45 UTC
You are right, the maintainer of the java part of commons-daemon forgot to update to 1.0.13, natives were already at that level. This will be fixed for ER3.

Comment 13 Permaine Cheung 2013-03-08 14:46:39 UTC
The native jsvc is already in the zip, but the jar is missing from the -utils zip, I have built it in Brew for RHEL and will add it at jboss-eap-6.1/bin/commons-daemon.jar for ER3.

When I talked to Mladen, he said that the jar should be added to jboss-eap-6.1/sbin/ for Solaris and Windows.

Comment 14 Permaine Cheung 2013-03-08 14:47:59 UTC
The RHEL builds that contains the jar are jboss-eap-native-utils-6.1.0-4.ep6.el6 jboss-eap-native-utils-6.1.0-4.ep6.el5.
Vaclav, please make sure these are included for the next handoff. Thanks!

Comment 15 Vaclav Tunka 2013-03-12 10:09:23 UTC
I added the commons-daemon jar to sbin for Windows and Solaris.
Please refer to BZ 918199 to see latest builds that are going to be included with  EAP 6.1.0.ER3

Comment 17 Jan Stefl 2013-03-22 09:01:55 UTC
commons-daemon.jar is part of the EAP 6.1.0.ER3


Note You need to log in before you can comment on or make changes to this bug.