You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Jason Britton <jb...@gmail.com> on 2010/09/30 06:37:22 UTC

jsvc - Cannot register native methods error

Would greatly appreciate insights into "Cannot register native methods"
error below encountered while trying to start tomcat 6.0.29 using jsvc on 64
bit RHEL 5.5.  Suggestions to fix this problem in the past have involved
making sure commons-daemon.jar was in class path, this does not appear to be
my issue in this particular case.  Downloaded and built jsvc from src.  I've
included debug output below from jsvc.  Thanks so much for any suggestions
-- Jason


29/09/2010 21:27:29 5278 jsvc.exec debug: increased capability set.
29/09/2010 21:27:29 5278 jsvc.exec debug: user changed to 'apache'
29/09/2010 21:27:29 5278 jsvc.exec debug: decreased capability set to min
required.
29/09/2010 21:27:29 5278 jsvc.exec debug: Using default JVM in
/usr/java/jdk1.6.0_21/jre/lib/amd64/server/libjvm.so
29/09/2010 21:27:29 5278 jsvc.exec debug: Attemtping to load library
/usr/java/jdk1.6.0_21/jre/lib/amd64/server/libjvm.so
29/09/2010 21:27:29 5278 jsvc.exec debug: JVM library
/usr/java/jdk1.6.0_21/jre/lib/amd64/server/libjvm.so loaded
29/09/2010 21:27:29 5278 jsvc.exec debug: JVM library entry point found
(0x4EEA4F50)
29/09/2010 21:27:29 5278 jsvc.exec debug: +-- DUMPING JAVA VM CREATION
ARGUMENTS -----------------
29/09/2010 21:27:29 5278 jsvc.exec debug: | Version:
0x010004
29/09/2010 21:27:29 5278 jsvc.exec debug: | Ignore Unrecognized Arguments:
False
29/09/2010 21:27:29 5278 jsvc.exec debug: | Extra options:                 7
29/09/2010 21:27:29 5278 jsvc.exec debug: |
"-Dcatalina.home=/apps/web/apache-tomcat-6.0.29" (0x00000000)
29/09/2010 21:27:29 5278 jsvc.exec debug: |
"-Dcatalina.base=/apps/web/apache-tomcat-6.0.29" (0x00000000)
29/09/2010 21:27:29 5278 jsvc.exec debug: |
"-Djava.io.tmpdir=/var/tmp/tomcat" (0x00000000)
29/09/2010 21:27:29 5278 jsvc.exec debug: |   "-XX:MaxPermSize=512M"
(0x00000000)
29/09/2010 21:27:29 5278 jsvc.exec debug: |   "-Xmx2048M" (0x00000000)
29/09/2010 21:27:29 5278 jsvc.exec debug: |
"-Djava.class.path=/usr/java/jdk1.6.0_21/lib/tools.jar:/apps/web/apache-tomcat-6.0.29/bin/commons-daemon.jar:/apps/web/apache-tomcat-6.0.29/bin/bootstrap.jar"
(0x00000000)
29/09/2010 21:27:29 5278 jsvc.exec debug:
+-------------------------------------------------------
29/09/2010 21:27:29 5278 jsvc.exec debug: Java VM created successfully
29/09/2010 21:27:29 5278 jsvc.exec debug: Class
org/apache/commons/daemon/support/DaemonLoader found
29/09/2010 21:27:29 5278 jsvc.exec error: Cannot register native methods
29/09/2010 21:27:29 5278 jsvc.exec debug: java_init failed
29/09/2010 21:27:29 5277 jsvc.exec error: Service exit with a return value
of 1

Re: jsvc - Cannot register native methods error

Posted by Jason Britton <jb...@gmail.com>.
Problem solved - thanks for your response.  I had built native portion of
JSVC but failed to build the java portion (ant dist) commons-daemon-1.0.3
jar.  My script was using the commons-daemon.jar found in the apache tomcat
6.0.29 bin directory when I should have updated it with
commons-daemon-1.0.3.jar instead.  Updating the jar to match built binary
version did the trick.  Thanks again,

Jason


On Thu, Sep 30, 2010 at 5:32 AM, Mladen Turk <mt...@apache.org> wrote:

> On 09/30/2010 06:37 AM, Jason Britton wrote:
>
>> Would greatly appreciate insights into "Cannot register native methods"
>> error below encountered while trying to start tomcat 6.0.29 using jsvc on
>> 64
>> bit RHEL 5.5.  Suggestions to fix this problem in the past have involved
>> making sure commons-daemon.jar was in class path, this does not appear to
>> be
>> my issue in this particular case.  Downloaded and built jsvc from src.
>>  I've
>> included debug output below from jsvc.  Thanks so much for any suggestions
>>
>
>
> I suppose you have done what README says:
> $ export CFLAGS=-m64
> $ export LDFLAGS=-m64
> $ ./configure
> $ make
>
> If you have compiled jsvc from the
> commons-daemon-native that comes with 6.0.29
> you will need to (some trash left in distro)
>
> $ make clean
> and the repeat the upper export; configure; make procedure
>
> However I'd suggest to use 1.0.3 binaries
> http://www.apache.org/dist/commons/daemon/binaries/1.0.3/linux/
> (They were compiled on RHEL5, so should work)
>
>
> Regards
> --
> ^TM
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Re: jsvc - Cannot register native methods error

Posted by Mladen Turk <mt...@apache.org>.
On 09/30/2010 06:37 AM, Jason Britton wrote:
> Would greatly appreciate insights into "Cannot register native methods"
> error below encountered while trying to start tomcat 6.0.29 using jsvc on 64
> bit RHEL 5.5.  Suggestions to fix this problem in the past have involved
> making sure commons-daemon.jar was in class path, this does not appear to be
> my issue in this particular case.  Downloaded and built jsvc from src.  I've
> included debug output below from jsvc.  Thanks so much for any suggestions


I suppose you have done what README says:
$ export CFLAGS=-m64
$ export LDFLAGS=-m64
$ ./configure
$ make

If you have compiled jsvc from the
commons-daemon-native that comes with 6.0.29
you will need to (some trash left in distro)

$ make clean
and the repeat the upper export; configure; make procedure

However I'd suggest to use 1.0.3 binaries
http://www.apache.org/dist/commons/daemon/binaries/1.0.3/linux/
(They were compiled on RHEL5, so should work)


Regards
-- 
^TM

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org