Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 03 May 2001 21:31:01 +0200
From:      Michel Otte <FreeBSD-Java@scoop.demon.nl>
To:        Pascal Echevest <pascal.echevest@experian-scorex.com>
Cc:        FreeBSD-Java@freebsd.org
Subject:   Re: Tomcat's mod_jk initialization error 
Message-ID:  <200105031928.VAA01425@scoop.demon.nl>
In-Reply-To: <3AF15C4C.7E5A5701@experian-scorex.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello,


Yes I've found the solution to this problem after a lot of searching in the
tomcat-users mailing list archives. The problem is as follows: The Makefile
for FreeBSD (Makefile.freebsd) does simply not compile all the objects
which are needed for the shared object to link correctly. In detail, the
Makefile only compiles the object mod_jk.o and only links that object into
the mod_jk.so Apache shared object. You can reconstruct the Makefile to
compile and link the other objects from the ../jk directory, or just
compile the shared object by hand with the "apxs" tool. How you should do
this, is explained in the - not very detailed - "mod_jk HOWTO" from the
tomcat distribution. You should execute the following from the directory
tomcat-3.2.1-src/src/native/apache1.3 :

$APACHE_HOME/bin/apxs -c -I$JAVA_HOME/include 
-I$JAVA_HOME/include/freebsd -DFREEBSD -I$APACHE_HOME/include 
-I../jk mod_jk.c ../jk/*.c

"$APACHE_HOME" should be the path to where you have your Apache is
installed,  for example /usr/local/apache.
You should set $JAVA_HOME or replace it with the path to where your JDK
version is installed, probably /usr/local/jdk1.2.

I executed it as follows:

/usr/local/apache/bin/apxs -c -I/usr/local/jdk1.2/include 
-I/usr/local/jdk1.2/include/freebsd -DFREEBSD -I/usr/local/apache/include 
-I../jk mod_jk.c ../jk/*.c

The Makefile only executed:

/usr/local/apache/bin/apxs -c -I/usr/local/jdk1.2/include 
-I/usr/local/jdk1.2/include/freebsd -DFREEBSD -I/usr/local/apache/include 
-I../jk mod_jk.c

which produces a 18073 bytes mod_jk.so which is NOT usable.

I MUST say I had tried this before and it failed, just because I didn't
compile Apache with the options --enable-rule=SHARED_CORE. Stupid enough I
hadn't tried this _after_ compiling Apache with a SHARED_CORE enabled. So
please be sure to compile Apache with --enable-module=so and
--enable-rule=SHARED_CORE, otherwise the compile with apxs will definitely
fail.

I hope this helps you and others.


Kind regards,

Michel Otte.

At 15:25 3-5-01 +0200, you wrote:
>Hi,
>
>I've just seen your message below and I would like
>to ask you if you finally found a solution to this
>problem. I've exactly the same problem and I cannot 
>solve it.
>
>Thanks and regards,
>Pascal


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105031928.VAA01425>