You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mark Eggers <it...@yahoo.com> on 2003/04/22 21:02:25 UTC

mod_jk2 from source - brief HOW TO

Folks,

I've seen a lot of questions concerning this, so I
finally had a go at compilation and installation.

This was done on a Redhat Linux (release 9.0) box, but
it should be pretty generic and useful for most
UNIX-type OS's.

I did not use rpm's for either the apache web server
(2.0.45 - compiled from source) or tomcat (4.1.24 -
installed from binary tarball).

I've only tested the network socket connection (ie.,
port 8009), but I don't see why the other
configurations wouldn't work as well.

>From a cursory glance at build.xml, it appears that
both the tomcat side and the web server side are being
built.  The first problem appears to happen when Ant
looks for tomcat-coyote.jar and can't find it.  Even
after that is corrected, Ant goes off and looks for
other things.

I'm just learning Ant at this point, so I'm not sure
what a good fix would be.

1. Download
jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz from
  
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0.2/src/

2. Uncompress it and extract the tar file.

3. cd to
jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2

4. chmod u+x configure

5. Run configure with:

   ./configure \
    --with-apxs2=<apache-root-directory>/bin/apxs \
    --with-tomcat41=<tomcat-root-directory> \
    --with-java-home=<java-root-directory> \
    --with-jni \
    --with-pcre

For example:

  ./configure --with-apxs2=/home/apache/bin/apxs \
	      --with-tomcat41=/home/tomcat \
	      --with-java-home=/usr/java \
	      --with-jni \
	      --with-pcre

6. Run make

7. The two .so files (mod_jk2.so and jkjni.so) will be
in:
  
jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apache2

8. Copy those to files to
<apache-root-directory>/modules with the
   proper permissions.

9. Configure Apache and Tomcat

10. Restart and enjoy

As always, I'm not a member of the Apache Software
Organization, but just a happy
user/developer/sysadmin.

Hmmm . . . . a happy sysadmin - now there's an
oxymoron.

HTH
/mde/
just my two cents . . . .

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com

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


Re: mod_jk2 from source - brief HOW TO

Posted by Kelly Kleinfelder <ke...@unboundmedicine.com>.
You rule!!!!!

I've been struggling with getting JK2 build for a few days. Your
instructions are perfect!

Kelly
----- Original Message -----
From: "Mark Eggers" <it...@yahoo.com>
To: <to...@jakarta.apache.org>
Sent: Tuesday, April 22, 2003 3:02 PM
Subject: mod_jk2 from source - brief HOW TO


> Folks,
>
> I've seen a lot of questions concerning this, so I
> finally had a go at compilation and installation.
>
> This was done on a Redhat Linux (release 9.0) box, but
> it should be pretty generic and useful for most
> UNIX-type OS's.
>
> I did not use rpm's for either the apache web server
> (2.0.45 - compiled from source) or tomcat (4.1.24 -
> installed from binary tarball).
>
> I've only tested the network socket connection (ie.,
> port 8009), but I don't see why the other
> configurations wouldn't work as well.
>
> From a cursory glance at build.xml, it appears that
> both the tomcat side and the web server side are being
> built.  The first problem appears to happen when Ant
> looks for tomcat-coyote.jar and can't find it.  Even
> after that is corrected, Ant goes off and looks for
> other things.
>
> I'm just learning Ant at this point, so I'm not sure
> what a good fix would be.
>
> 1. Download
> jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz from
>
>
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0.
2/src/
>
> 2. Uncompress it and extract the tar file.
>
> 3. cd to
> jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2
>
> 4. chmod u+x configure
>
> 5. Run configure with:
>
>    ./configure \
>     --with-apxs2=<apache-root-directory>/bin/apxs \
>     --with-tomcat41=<tomcat-root-directory> \
>     --with-java-home=<java-root-directory> \
>     --with-jni \
>     --with-pcre
>
> For example:
>
>   ./configure --with-apxs2=/home/apache/bin/apxs \
>       --with-tomcat41=/home/tomcat \
>       --with-java-home=/usr/java \
>       --with-jni \
>       --with-pcre
>
> 6. Run make
>
> 7. The two .so files (mod_jk2.so and jkjni.so) will be
> in:
>
> jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apache2
>
> 8. Copy those to files to
> <apache-root-directory>/modules with the
>    proper permissions.
>
> 9. Configure Apache and Tomcat
>
> 10. Restart and enjoy
>
> As always, I'm not a member of the Apache Software
> Organization, but just a happy
> user/developer/sysadmin.
>
> Hmmm . . . . a happy sysadmin - now there's an
> oxymoron.
>
> HTH
> /mde/
> just my two cents . . . .
>
> __________________________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo
> http://search.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>



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


Re: mod_jk2 from source - brief HOW TO (fixed problem with FreeBSD 4.8 build)

Posted by Jacob Kjome <ho...@visi.com>.
You should post your fix to http://issues.apache.org/bugzilla/ as an 
enhancement, otherwise this will get lost in all the email traffic here.

Jake

At 02:41 PM 4/24/2003 -0400, you wrote:
>On 04/24/03 01:51 PM, Louis LeBlanc sat at the `puter and typed:
> > Hey Mark.  Thanks a million for putting this together.  I ran through
> > your steps without incident until I got to 7.
> >
> > Small problem - there is no jkjni.so in that directory.  mod_jk2.so
> > exists, and there is a jkjni.a and jkjni.la, but no jkjni.so.
> >
> > The build output is too long for me to toss it all out here, but here
> > is the warning output that might shed some light:
> >
> > *** Warning: This library needs some functionality provided by -lapr-0.
> > *** I have the capability to make that library automatically link in when
> > *** you link to this library.  But I can only do this if you have a
> > *** shared version of the library, which you do not appear to have.
> >
> > *** Warning: libtool could not satisfy all declared inter-library
> > *** dependencies of module jkjni.  Therefore, libtool will create
> > *** a static module, that should work as long as the dlopening
> > *** application is linked with the -dlopen flag.
> >
> > I am building against Tomcat 4.1.24 and Apache 2.0.45 on FreeBSD 4.8.
> >
> > The configuration command I used is:
> >
> > ./configure \
> >     --with-apxs2=/usr/local/sbin/apxs \
> >     --with-tomcat41=/usr/local/jakarta-tomcat4.1 \
> >     --with-java-home=/usr/local/jdk1.4.1 \
> >     --with-apr-include=/usr/local/include/apache2 \
> >     --with-apr-lib=/usr/local/lib/apache2 \
> >     --with-jni \
> >     --with-pcre
>
>Problem solved.  Required a few modifications to the
>jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2/server/apache2/Makefile.in
>file:
>
># diff -c2 Makefile.in.orig Makefile.in
>*** Makefile.in.orig    Thu Apr 24 14:23:43 2003
>--- Makefile.in Thu Apr 24 14:31:59 2003
>***************
>*** 9,12 ****
>--- 9,13 ----
>   APACHE2_LIBDIR=@APACHE2_HOME@/lib
>   APR_INCL=@APR_CFLAGS@
>+ APR_LIBDIR=@APACHE2_HOME@/lib/apache2
>   EXTRA_CFLAGS=@APXS2_CFLAGS@
>   EXTRA_CPPFLAGS=@APXS2_CPPFLAGS@
>***************
>*** 26,30 ****
>   #include ../../../build.properties
>
>! LIBTOOL=${APACHE2_HOME}/build/libtool
>
>   # It doesn't hurt if we include all
>--- 27,31 ----
>   #include ../../../build.properties
>
>! LIBTOOL=${APACHE2_HOME}/bin/libtool
>
>   # It doesn't hurt if we include all
>***************
>*** 35,39 ****
>
>   JK_CFLAGS=-DCHUNK_SIZE=4096 -DUSE_APACHE_MD5 -DHAS_APR @HAVE_JNI@ 
> @HAS_PCRE@
>! JK_LDFLAGS=-L${APACHE2_LIBDIR} -lcrypt -lapr-0 @PCRE_LIBS@
>
>   ###### Based on rules.mk ##########################################
>--- 36,40 ----
>
>   JK_CFLAGS=-DCHUNK_SIZE=4096 -DUSE_APACHE_MD5 -DHAS_APR @HAVE_JNI@ 
> @HAS_PCRE@
>! JK_LDFLAGS=-L${APACHE2_LIBDIR} -L${APR_LIBDIR} -lcrypt -lapr -0 @PCRE_LIBS@
>
>   ###### Based on rules.mk ##########################################
>
>Hope this helps someone else in the future . . .
>
>Maybe these changes will help make this make file more portable too.
>
>Lou
>--
>Louis LeBlanc               leblanc@keyslapper.org
>Fully Funded Hobbyist, KeySlapper Extrordinaire :)
>http://www.keyslapper.org                     Ô¿Ô¬
>
>Knebel's Law:
>   It is now proved beyond doubt that smoking is one of the leading
>   causes of statistics.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

Re: mod_jk2 from source - brief HOW TO (fixed problem with FreeBSD 4.8 build)

Posted by Louis LeBlanc <le...@keyslapper.org>.
On 04/24/03 09:30 PM, Mladen Turk sat at the `puter and typed:
> 
> 
> > -----Original Message-----
> > From: Louis LeBlanc
> > 
> > # diff -c2 Makefile.in.orig Makefile.in
> 
> Could you run it using diff -u3 ?
> 
> > *** Makefile.in.orig    Thu Apr 24 14:23:43 2003
> > --- Makefile.in Thu Apr 24 14:31:59 2003
> > ***************
> > *** 9,12 ****
> > --- 9,13 ----
> >   APACHE2_LIBDIR=@APACHE2_HOME@/lib
> >   APR_INCL=@APR_CFLAGS@ 
> > + APR_LIBDIR=@APACHE2_HOME@/lib/apache2
> 
> @APACHE2_HOME@/lib/apache2 is freebsd specific apr libdir, or you did
> some tweaking?

This is the location of all the apr libs when Apache 2.0.45 is
installed from the ports, so I assume it is the FreeBSD specific apr
dir.

> And please forward to either bugzilla or tomcat-dev.

Will do.

--- Makefile.in.orig    Thu Apr 24 14:23:43 2003
+++ Makefile.in Thu Apr 24 14:31:59 2003
@@ -8,6 +8,7 @@
 APACHE2_LIBEXEC=@APACHE2_LIBEXEC@
 APACHE2_LIBDIR=@APACHE2_HOME@/lib
 APR_INCL=@APR_CFLAGS@ 
+APR_LIBDIR=@APACHE2_HOME@/lib/apache2
 EXTRA_CFLAGS=@APXS2_CFLAGS@
 EXTRA_CPPFLAGS=@APXS2_CPPFLAGS@
 CC=@CC@
@@ -25,7 +26,7 @@
 # Yes, we use the same properties file as ant
 #include ../../../build.properties
 
-LIBTOOL=${APACHE2_HOME}/build/libtool 
+LIBTOOL=${APACHE2_HOME}/bin/libtool 
 
 # It doesn't hurt if we include all
 INCLUDES= -I${JK_DIR}/include \
@@ -34,7 +35,7 @@
           ${JAVA_INCL}
 
 JK_CFLAGS=-DCHUNK_SIZE=4096 -DUSE_APACHE_MD5 -DHAS_APR @HAVE_JNI@ @HAS_PCRE@
-JK_LDFLAGS=-L${APACHE2_LIBDIR} -lcrypt -lapr-0 @PCRE_LIBS@
+JK_LDFLAGS=-L${APACHE2_LIBDIR} -L${APR_LIBDIR} -lcrypt -lapr -0 @PCRE_LIBS@
 
 ###### Based on rules.mk ##########################################
 ALL_CFLAGS   = $(EXTRA_CFLAGS) $(NOTEST_CFLAGS) $(CFLAGS)


-- 
Louis LeBlanc               leblanc@keyslapper.org
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
http://www.keyslapper.org                     ԿԬ

The universe is an island, surrounded by whatever it is that surrounds
universes.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: mod_jk2 Apache2/Tomcat4.1 on FreeBSD [was Re: mod_jk2 from source - brief HOW TO]

Posted by Louis LeBlanc <le...@keyslapper.org>.
On 04/24/03 11:00 PM, Mladen Turk sat at the `puter and typed:
> 
> 
> > -----Original Message-----
> > From: Louis LeBlanc
> > 
> > I've posted the fix as requested to tomcat-dev.  I hope it helps.
> > 
> > In the meantime, I found another problem.
> > 
> > The apache configuration doesn't like something:
> > Syntax error on line 223 of /usr/local/etc/apache2/httpd.conf:
> > Cannot load /usr/local/libexec/apache2/mod_jk2.so into server:
> > /usr/local/libexec/apache2/mod_jk2.so: Undefined symbol 
> > "pthread_mutex_unlock"
> >
> 
> FreeBSD 4 and pthreads? I think they don't like each other. At least
> that was what some of the guys from apache-dev reported as taboo ;).
> 
> > I vaguely remembered reading something about loading the 
> > thread lib for something, and I found it.  The solution was 
> > in the jk2/installhowto.html page, and said to add this to 
> > the httpd.conf:
> > 
> > LoadFile /usr/lib/pthread.so
> > 
> > Unfortunately, /usr/lib/pthread.so doesn't exist as a native 
> > FreeBSD library, since the Posix thread implementation is in 
> > libc_r.so.  So I changed that line to:
> > 
> > LoadFile /usr/lib/libc_r.so
> > 
> > And the config seems better, but Apache dumps core 
> > immediately when I try to start it.
> >
> 
> Yep, switch to 5.0, it should solve the thread issues (but I've never
> been able even to install the bugger on the x86).

I made an aborted attempt recently myself.  Had to go with 4.8.

> Also you may try to recompile the apache and apr without threads
> support. The jk2 can cope with that, cause all thread calls are enclosed
> with APR_HAS_THREADS directive.

Would I be better off (in terms of ease of setup) to just go with
Apache 1.3 and mod_jk?  I had a pretty complex configuration with 1.3
before trying 2.0, and I haven't quite worked my 2.0 config out to
cover all the bases yet.

Thanks for your help!

Lou
-- 
Louis LeBlanc               leblanc@keyslapper.org
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
http://www.keyslapper.org                     ԿԬ

Boob's Law:
  You always find something in the last place you look.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


RE: mod_jk2 Apache2/Tomcat4.1 on FreeBSD [was Re: mod_jk2 from source - brief HOW TO]

Posted by Mladen Turk <mt...@inet.hr>.

> -----Original Message-----
> From: Louis LeBlanc
> 
> I've posted the fix as requested to tomcat-dev.  I hope it helps.
> 
> In the meantime, I found another problem.
> 
> The apache configuration doesn't like something:
> Syntax error on line 223 of /usr/local/etc/apache2/httpd.conf:
> Cannot load /usr/local/libexec/apache2/mod_jk2.so into server:
> /usr/local/libexec/apache2/mod_jk2.so: Undefined symbol 
> "pthread_mutex_unlock"
>

FreeBSD 4 and pthreads? I think they don't like each other. At least
that was what some of the guys from apache-dev reported as taboo ;).

> I vaguely remembered reading something about loading the 
> thread lib for something, and I found it.  The solution was 
> in the jk2/installhowto.html page, and said to add this to 
> the httpd.conf:
> 
> LoadFile /usr/lib/pthread.so
> 
> Unfortunately, /usr/lib/pthread.so doesn't exist as a native 
> FreeBSD library, since the Posix thread implementation is in 
> libc_r.so.  So I changed that line to:
> 
> LoadFile /usr/lib/libc_r.so
> 
> And the config seems better, but Apache dumps core 
> immediately when I try to start it.
>

Yep, switch to 5.0, it should solve the thread issues (but I've never
been able even to install the bugger on the x86).
 
Also you may try to recompile the apache and apr without threads
support. The jk2 can cope with that, cause all thread calls are enclosed
with APR_HAS_THREADS directive.

MT.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


mod_jk2 Apache2/Tomcat4.1 on FreeBSD [was Re: mod_jk2 from source - brief HOW TO]

Posted by Louis LeBlanc <le...@keyslapper.org>.
On 04/24/03 09:30 PM, Mladen Turk sat at the `puter and typed:
> > -----Original Message-----
> > From: Louis LeBlanc
> > 
> > # diff -c2 Makefile.in.orig Makefile.in
> 
> Could you run it using diff -u3 ?
> 
> > *** Makefile.in.orig    Thu Apr 24 14:23:43 2003
> > --- Makefile.in Thu Apr 24 14:31:59 2003
> > ***************
> > *** 9,12 ****
> > --- 9,13 ----
> >   APACHE2_LIBDIR=@APACHE2_HOME@/lib
> >   APR_INCL=@APR_CFLAGS@ 
> > + APR_LIBDIR=@APACHE2_HOME@/lib/apache2
> 
> @APACHE2_HOME@/lib/apache2 is freebsd specific apr libdir, or you did
> some tweaking?
> 
> And please forward to either bugzilla or tomcat-dev.
> 

I've posted the fix as requested to tomcat-dev.  I hope it helps.

In the meantime, I found another problem.

The apache configuration doesn't like something:
Syntax error on line 223 of /usr/local/etc/apache2/httpd.conf:
Cannot load /usr/local/libexec/apache2/mod_jk2.so into server:
/usr/local/libexec/apache2/mod_jk2.so: Undefined symbol "pthread_mutex_unlock"

I vaguely remembered reading something about loading the thread lib for
something, and I found it.  The solution was in the
jk2/installhowto.html page, and said to add this to the httpd.conf:

LoadFile /usr/lib/pthread.so

Unfortunately, /usr/lib/pthread.so doesn't exist as a native FreeBSD
library, since the Posix thread implementation is in libc_r.so.  So I
changed that line to:

LoadFile /usr/lib/libc_r.so

And the config seems better, but Apache dumps core immediately when I
try to start it.

The library interface must be different, the gdb backtrace looks like
this:

#0  0x282d0aac in .cerror () from /usr/lib/libc.so.4
#1  0x28349765 in _thread_fd_table_init () from /usr/lib/libc_r.so
#2  0x28347f95 in _thread_init () from /usr/lib/libc_r.so
#3  0x2837e148 in _thread_init_invoker::_thread_init_invoker ()
   from /usr/lib/libc_r.so
#4  0x2837e181 in _thread_init_invoker::_thread_init_invoker ()
   from /usr/lib/libc_r.so
#5  0x2837e1aa in _thread_init_invoker::_thread_init_invoker ()
   from /usr/lib/libc_r.so
#6  0x2837e1d8 in _thread_init_invoker::_thread_init_invoker ()
   from /usr/lib/libc_r.so
#7  0x283044ae in _init () from /usr/lib/libc_r.so
#8  0x2808e3ef in dlopen () from /usr/libexec/ld-elf.so.1
#9  0x2822011c in apr_dso_load () from
/usr/local/lib/apache2/libapr.so.9
#10 0x8061887 in load_file ()
#11 0x8064459 in invoke_cmd ()
#12 0x8064f73 in execute_now ()
#13 0x80647c0 in ap_build_config_sub ()
#14 0x8064bfd in ap_build_config ()
#15 0x8065462 in ap_process_resource_config ()
#16 0x8065b60 in ap_read_config ()
#17 0x806792c in main ()
#18 0x805c7de in _start ()

I don't know much about Java and Apache modules at this point, but I
hope this info will help those of you who do.

I wish I had the time to keep working on this, but I don't.  If any
ideas to solve this problem come up, I will try them at my earliest
opportunity and provide feedback.

Thanks folks.

Lou
-- 
Louis LeBlanc               leblanc@keyslapper.org
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
http://www.keyslapper.org                     ԿԬ

enhance, v.:
  To tamper with an image, usually to its detriment.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


RE: mod_jk2 from source - brief HOW TO (fixed problem with FreeBSD 4.8 build)

Posted by Mladen Turk <mt...@inet.hr>.

> -----Original Message-----
> From: Louis LeBlanc
> 
> # diff -c2 Makefile.in.orig Makefile.in

Could you run it using diff -u3 ?

> *** Makefile.in.orig    Thu Apr 24 14:23:43 2003
> --- Makefile.in Thu Apr 24 14:31:59 2003
> ***************
> *** 9,12 ****
> --- 9,13 ----
>   APACHE2_LIBDIR=@APACHE2_HOME@/lib
>   APR_INCL=@APR_CFLAGS@ 
> + APR_LIBDIR=@APACHE2_HOME@/lib/apache2

@APACHE2_HOME@/lib/apache2 is freebsd specific apr libdir, or you did
some tweaking?

And please forward to either bugzilla or tomcat-dev.

Thx.
MT.


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


Re: mod_jk2 from source - brief HOW TO (fixed problem with FreeBSD 4.8 build)

Posted by Louis LeBlanc <le...@keyslapper.org>.
On 04/24/03 01:51 PM, Louis LeBlanc sat at the `puter and typed:
> Hey Mark.  Thanks a million for putting this together.  I ran through
> your steps without incident until I got to 7.
> 
> Small problem - there is no jkjni.so in that directory.  mod_jk2.so
> exists, and there is a jkjni.a and jkjni.la, but no jkjni.so.
> 
> The build output is too long for me to toss it all out here, but here
> is the warning output that might shed some light:
> 
> *** Warning: This library needs some functionality provided by -lapr-0.
> *** I have the capability to make that library automatically link in when
> *** you link to this library.  But I can only do this if you have a
> *** shared version of the library, which you do not appear to have.
> 
> *** Warning: libtool could not satisfy all declared inter-library
> *** dependencies of module jkjni.  Therefore, libtool will create
> *** a static module, that should work as long as the dlopening
> *** application is linked with the -dlopen flag.
> 
> I am building against Tomcat 4.1.24 and Apache 2.0.45 on FreeBSD 4.8.
> 
> The configuration command I used is:
> 
> ./configure \
>     --with-apxs2=/usr/local/sbin/apxs \
>     --with-tomcat41=/usr/local/jakarta-tomcat4.1 \
>     --with-java-home=/usr/local/jdk1.4.1 \
>     --with-apr-include=/usr/local/include/apache2 \
>     --with-apr-lib=/usr/local/lib/apache2 \
>     --with-jni \
>     --with-pcre

Problem solved.  Required a few modifications to the
jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2/server/apache2/Makefile.in
file:

# diff -c2 Makefile.in.orig Makefile.in
*** Makefile.in.orig    Thu Apr 24 14:23:43 2003
--- Makefile.in Thu Apr 24 14:31:59 2003
***************
*** 9,12 ****
--- 9,13 ----
  APACHE2_LIBDIR=@APACHE2_HOME@/lib
  APR_INCL=@APR_CFLAGS@ 
+ APR_LIBDIR=@APACHE2_HOME@/lib/apache2
  EXTRA_CFLAGS=@APXS2_CFLAGS@
  EXTRA_CPPFLAGS=@APXS2_CPPFLAGS@
***************
*** 26,30 ****
  #include ../../../build.properties
  
! LIBTOOL=${APACHE2_HOME}/build/libtool 
  
  # It doesn't hurt if we include all
--- 27,31 ----
  #include ../../../build.properties
  
! LIBTOOL=${APACHE2_HOME}/bin/libtool 
  
  # It doesn't hurt if we include all
***************
*** 35,39 ****
  
  JK_CFLAGS=-DCHUNK_SIZE=4096 -DUSE_APACHE_MD5 -DHAS_APR @HAVE_JNI@ @HAS_PCRE@
! JK_LDFLAGS=-L${APACHE2_LIBDIR} -lcrypt -lapr-0 @PCRE_LIBS@
  
  ###### Based on rules.mk ##########################################
--- 36,40 ----
  
  JK_CFLAGS=-DCHUNK_SIZE=4096 -DUSE_APACHE_MD5 -DHAS_APR @HAVE_JNI@ @HAS_PCRE@
! JK_LDFLAGS=-L${APACHE2_LIBDIR} -L${APR_LIBDIR} -lcrypt -lapr -0 @PCRE_LIBS@
  
  ###### Based on rules.mk ##########################################

Hope this helps someone else in the future . . .

Maybe these changes will help make this make file more portable too.

Lou
-- 
Louis LeBlanc               leblanc@keyslapper.org
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
http://www.keyslapper.org                     ԿԬ

Knebel's Law:
  It is now proved beyond doubt that smoking is one of the leading
  causes of statistics.

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


Re: mod_jk2 from source - brief HOW TO

Posted by Mark Eggers <it...@yahoo.com>.
Peter,

There was a reported issue running on freebsd. Check
out the following link to see if that helps.

http://marc.theaimsgroup.com/?l=tomcat-user&m=105121021710073&w=2

I don't have a freebsd box to work on right now, so
I'm not sure what could be happening.

This looks like a shell issue.  What shell are you
running the make under?

/mde/
just my two cents . . . .


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

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


Re: mod_jk2 from source - brief HOW TO

Posted by Peter Choe <ch...@mindspring.com>.
i tried to follow the instruction and was able to configure, but when i 
tried to do make i got the following message:

list=' server/apache2';  for i in $list; do  echo "Making $target in 
$i";  if test "$i" != "."; then  (cd $i && make) || exit 1;  fi;  done;
Making  in server/apache2
Error expanding embedded variable.
*** Error code 1

Stop in /usr/home/peter/jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2.

i am trying to do this on freebsd 4.6.  anyone have an idea what is 
wrong with the make file?

Peter Choe

Mark Eggers wrote:

>Louis,
>
>./configure \
>    --with-apxs2=/usr/local/sbin/apxs \
>    --with-tomcat41=/usr/local/jakarta-tomcat4.1 \
>    --with-java-home=/usr/local/jdk1.4.1 \
>    --with-apr-include=/usr/local/include/apache2 \
>    --with-apr-lib=/usr/local/lib/apache2 \
>    --with-jni \
>    --with-pcre
>
>Interesting that using --with-apxs2 didn't resolve all
>of your issues so you wouldn't have to use
>--with-apr-include and --with-apr-lib.
>
>It looks like the configure script really doesn't pick
>up the locations very well.
>
>I had a similar issue with the layout maps when I
>built Apache 2.0.45 from scratch.
>
>I added my layout to the layout file and configure did
>not pick it up.  I just modified the default layout to
>get configure to put things where I thought was
>reasonable.
>
>I agree - sending this to bugzilla would be good.  I
>wonder if it could be fixed in rules.mk?
>
>/mde/
>just my two cents . . .
>
>__________________________________________________
>Do you Yahoo!?
>The New Yahoo! Search - Faster. Easier. Bingo
>http://search.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>  
>




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


Re: mod_jk2 from source - brief HOW TO

Posted by Mark Eggers <it...@yahoo.com>.
Louis,

./configure \
    --with-apxs2=/usr/local/sbin/apxs \
    --with-tomcat41=/usr/local/jakarta-tomcat4.1 \
    --with-java-home=/usr/local/jdk1.4.1 \
    --with-apr-include=/usr/local/include/apache2 \
    --with-apr-lib=/usr/local/lib/apache2 \
    --with-jni \
    --with-pcre

Interesting that using --with-apxs2 didn't resolve all
of your issues so you wouldn't have to use
--with-apr-include and --with-apr-lib.

It looks like the configure script really doesn't pick
up the locations very well.

I had a similar issue with the layout maps when I
built Apache 2.0.45 from scratch.

I added my layout to the layout file and configure did
not pick it up.  I just modified the default layout to
get configure to put things where I thought was
reasonable.

I agree - sending this to bugzilla would be good.  I
wonder if it could be fixed in rules.mk?

/mde/
just my two cents . . .

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com

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


Re: mod_jk2 from source - brief HOW TO

Posted by Louis LeBlanc <le...@keyslapper.org>.
On 04/22/03 12:02 PM, Mark Eggers sat at the `puter and typed:
> Folks,
> 
> I've seen a lot of questions concerning this, so I
> finally had a go at compilation and installation.
> 
> This was done on a Redhat Linux (release 9.0) box, but
> it should be pretty generic and useful for most
> UNIX-type OS's.
> 
> I did not use rpm's for either the apache web server
> (2.0.45 - compiled from source) or tomcat (4.1.24 -
> installed from binary tarball).
> 
> I've only tested the network socket connection (ie.,
> port 8009), but I don't see why the other
> configurations wouldn't work as well.
> 
> From a cursory glance at build.xml, it appears that
> both the tomcat side and the web server side are being
> built.  The first problem appears to happen when Ant
> looks for tomcat-coyote.jar and can't find it.  Even
> after that is corrected, Ant goes off and looks for
> other things.
> 
> I'm just learning Ant at this point, so I'm not sure
> what a good fix would be.
> 
> 1. Download
> jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz from
>   
> http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0.2/src/
> 
> 2. Uncompress it and extract the tar file.
> 
> 3. cd to
> jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2
> 
> 4. chmod u+x configure
> 
> 5. Run configure with:
> 
>    ./configure \
>     --with-apxs2=<apache-root-directory>/bin/apxs \
>     --with-tomcat41=<tomcat-root-directory> \
>     --with-java-home=<java-root-directory> \
>     --with-jni \
>     --with-pcre
> 
> For example:
> 
>   ./configure --with-apxs2=/home/apache/bin/apxs \
> 	      --with-tomcat41=/home/tomcat \
> 	      --with-java-home=/usr/java \
> 	      --with-jni \
> 	      --with-pcre
> 
> 6. Run make
> 
> 7. The two .so files (mod_jk2.so and jkjni.so) will be
> in:
>   
> jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apache2
> 
> 8. Copy those to files to
> <apache-root-directory>/modules with the
>    proper permissions.
> 
> 9. Configure Apache and Tomcat
> 
> 10. Restart and enjoy

Hey Mark.  Thanks a million for putting this together.  I ran through
your steps without incident until I got to 7.

Small problem - there is no jkjni.so in that directory.  mod_jk2.so
exists, and there is a jkjni.a and jkjni.la, but no jkjni.so.

The build output is too long for me to toss it all out here, but here
is the warning output that might shed some light:

*** Warning: This library needs some functionality provided by -lapr-0.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.

*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module jkjni.  Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.

I am building against Tomcat 4.1.24 and Apache 2.0.45 on FreeBSD 4.8.

The configuration command I used is:

./configure \
    --with-apxs2=/usr/local/sbin/apxs \
    --with-tomcat41=/usr/local/jakarta-tomcat4.1 \
    --with-java-home=/usr/local/jdk1.4.1 \
    --with-apr-include=/usr/local/include/apache2 \
    --with-apr-lib=/usr/local/lib/apache2 \
    --with-jni \
    --with-pcre

Any suggestions?

TIA
Lou
-- 
Louis LeBlanc               leblanc@keyslapper.org
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
http://www.keyslapper.org                     ԿԬ

No one may kill a man.  Not for any purpose.  It cannot be condoned.
    -- Kirk, "Spock's Brain", stardate 5431.6

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


Re: mod_jk2 from source - brief HOW TO

Posted by John Turner <to...@johnturner.com>.
Thanks!

John

On Tue, 22 Apr 2003 12:02:25 -0700 (PDT), Mark Eggers 
<it...@yahoo.com> wrote:

> Folks,
>
> I've seen a lot of questions concerning this, so I
> finally had a go at compilation and installation.
>
> This was done on a Redhat Linux (release 9.0) box, but
> it should be pretty generic and useful for most
> UNIX-type OS's.
>
> I did not use rpm's for either the apache web server
> (2.0.45 - compiled from source) or tomcat (4.1.24 -
> installed from binary tarball).
>
> I've only tested the network socket connection (ie.,
> port 8009), but I don't see why the other
> configurations wouldn't work as well.
>
>> From a cursory glance at build.xml, it appears that
> both the tomcat side and the web server side are being
> built.  The first problem appears to happen when Ant
> looks for tomcat-coyote.jar and can't find it.  Even
> after that is corrected, Ant goes off and looks for
> other things.
>
> I'm just learning Ant at this point, so I'm not sure
> what a good fix would be.
>
> 1. Download
> jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz from
> http://jakarta.apache.org/builds/jakarta-tomcat- 
> connectors/jk2/release/v2.0.2/src/
>
> 2. Uncompress it and extract the tar file.
>
> 3. cd to
> jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2
>
> 4. chmod u+x configure
>
> 5. Run configure with:
>
> ./configure \
> --with-apxs2=<apache-root-directory>/bin/apxs \
> --with-tomcat41=<tomcat-root-directory> \
> --with-java-home=<java-root-directory> \
> --with-jni \
> --with-pcre
>
> For example:
>
> ./configure --with-apxs2=/home/apache/bin/apxs \
> 	      --with-tomcat41=/home/tomcat \
> 	      --with-java-home=/usr/java \
> 	      --with-jni \
> 	      --with-pcre
>
> 6. Run make
>
> 7. The two .so files (mod_jk2.so and jkjni.so) will be
> in:
> jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apache2
>
> 8. Copy those to files to
> <apache-root-directory>/modules with the
> proper permissions.
>
> 9. Configure Apache and Tomcat
>
> 10. Restart and enjoy
>
> As always, I'm not a member of the Apache Software
> Organization, but just a happy
> user/developer/sysadmin.
>
> Hmmm . . . . a happy sysadmin - now there's an
> oxymoron.
>
> HTH
> /mde/
> just my two cents . . . .
>
> __________________________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo
> http://search.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

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


Re: mod_jk2 from source - brief HOW TO

Posted by John Turner <to...@johnturner.com>.
You're going to have problems using RH's Apache...it is a non-standard 
distribution.  Most HOWTO documents assume that you are building your 
Apache from source, and that everything Apache-related is in one spot.  
RH's RPMS shove Apache files into several different locations.  You'll have 
to determine which file it wants, where it is (where the RPM put it), and 
how to tell configure where that file is.

John

On Tue, 06 May 2003 18:27:05 +0200, Boris Folgmann <mi...@folgmann.com> 
wrote:

> Mark Eggers schrieb:
>
>> This was done on a Redhat Linux (release 9.0) box, but
>> it should be pretty generic and useful for most
>> UNIX-type OS's.
>
> I didn't manage to compile it on Redhat 8.0 for some weeks now.
>
>> I did not use rpm's for either the apache web server
>> (2.0.45 - compiled from source) or tomcat (4.1.24 -
>> installed from binary tarball).
>
> I use the original RPMs from RedHat:
> httpd-2.0.40-11.3
> httpd-devel-2.0.40-11.3
>
>> 5. Run configure with:
>>
>> ./configure \
>> --with-apxs2=<apache-root-directory>/bin/apxs \
>> --with-tomcat41=<tomcat-root-directory> \
>> --with-java-home=<java-root-directory> \
>> --with-jni \
>> --with-pcre
>
> That doesn't work for me!
> I used:
> ./configure --with-apxs2=/usr/sbin/apxs --with-tomcat41=/var/tomcat4/
> --with-java-home=/usr/java/j2sdk1.4.1_02/ --with-jni --with-pcre
>
> And I get:
> [...]
> checking for sed... /bin/sed
> checking for cp... /bin/cp
> checking for mkdir... /bin/mkdir
> no apxs given
> XMLDoc parsing falseXMLDoc unable to open file false
>
> XMLDoc dump:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> XMLDoc writing "dump.xml".
> XMLDoc creating file in memory: 0 bytes.
> XMLDoc parsing memory file. no element found at line 1
>
> XMLDoc dump memory file:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> freeing memfile.
> creating empty XMLDoc object
> adding new data to XMLDoc object
>
> XMLDoc dump created XMLDoc:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> <elem1><name>Element1</name>
> <class>NoSense</class>
> </elem1>
> <elem2 long="yes" sense="non" >
> this is a longer text
> to show that it works aswell.
> </elem2>
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> deleting XMLDoc objects.
> finished.
> need to check for Perl first, apxs depends on it...
> checking for perl... /usr/bin/perl
> XMLDoc parsing falseXMLDoc unable to open file false
>
> XMLDoc dump:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> XMLDoc writing "dump.xml".
> XMLDoc creating file in memory: 0 bytes.
> XMLDoc parsing memory file. no element found at line 1
>
> XMLDoc dump memory file:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> freeing memfile.
> creating empty XMLDoc object
> adding new data to XMLDoc object
>
> XMLDoc dump created XMLDoc:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> <elem1><name>Element1</name>
> <class>NoSense</class>
> </elem1>
> <elem2 long="yes" sense="non" >
> this is a longer text
> to show that it works aswell.
> </elem2>
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> deleting XMLDoc objects.
> finished.
> Error: no input file given.
> Error: no input file given.
> configure: error: Invalid location for apxs: '/usr/sbin/apxs'
>
> Does anybody know what that means?
>
> cu,
> 	boris
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

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


Re: mod_jk2 from source - brief HOW TO

Posted by Mark Eggers <it...@yahoo.com>.
Boris,

I don't think that finding apxs was the real problem. 
I think that apxs couldn't find the apache-dev rpm.

I think that if you run the same command as an
ordinary user, but add where the Apache libraries,
include directories, and apr libraries are located,
then you will get the same results.

I think the primary issue in this instance is the fact
that the implementation (apache rpm) is separate from
the development (apache-dev rpm).

For me, the easiest way to solve the problem has been
to uninstall the two rpms, and then install apache
2.0.45 from source.

It's good that you found another work-around . . .

/mde/
just my two cents . . . .

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

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


Re: mod_jk2 from source - brief HOW TO

Posted by Boris Folgmann <mi...@folgmann.com>.
Mark Eggers schrieb:

> Another guess . . . . is apxs a link in /usr/sbin?  If

No, it's the file itself.

> so, you might try pointing the apxs2= option to the
> actual location.
> 
> I realize that this is not much information, but since
> I'm not a fan of Redhat's packaging of the Apache web
> server, I can't be of much more help.

I tried the explanation at
http://nagoya.apache.org/wiki/apachewiki.cgi?TomcatFAQ/ModJK2OnRedHat
but same problem.

As a last resort I tried running CFLAGS="-Os -mcpu=pentium3 -pipe"
./configure  --with-apxs2=/usr/sbin/apxs --with-apache2-lib=/usr/lib
--with-tomcat41=/var/tomcat4/ --with-apr-lib=/usr/lib  --with-jni
as root and it works!

[...]
checking for cp... /bin/cp
checking for mkdir... /bin/mkdir
no apxs given
need to check for Perl first, apxs depends on it...
checking for perl... /usr/bin/perl
building connector for "apache-2.0"
apache2_LIB
checking for tomcat33 location... not provided
checking for tomcat40 location... not provided
checking for tomcat41 location... /var/tomcat4/
checking for JDK location (please wait)... /usr/java/j2sdk1.4.1_02 from
environment
checking Java platform... checking Java platform...
checking os_type directory...  linux
configure: creating ./config.status
config.status: creating Makefile
config.status: creating server/apache13/Makefile
config.status: creating server/apache13/Makefile.apxs
config.status: creating server/apache2/Makefile
config.status: creating server/apache2/Makefile.apxs
config.status: creating ../build.properties
config.status: creating scripts/build/unix/dummy
config.status: executing depfiles commands

So what's the problem? /usr/sbin/apxs is not in the PATH of ordinary users,
but in root's path. But since I used --with-apxs2=/usr/sbin/apxs it should
be no problem. The file is executable by all users.

Is it a bug in configure.in? It shouldn't be necessary to run it as root.

cu,
	boris

-- 
Dipl.-Inf. Boris Folgmann   mailto:boris@folgmann.de
TeamForge GmbH i.G.         http://www.folgmann.de


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


Re: mod_jk2 from source - brief HOW TO

Posted by Mark Eggers <it...@yahoo.com>.
Boris,

I'm not sure, but one of the issues that I have is
that Redhat RPMs scatter the Apache installation all
over the file system.  As a result, apxs may not know
where everything is.

Another guess . . . . is apxs a link in /usr/sbin?  If
so, you might try pointing the apxs2= option to the
actual location.

I realize that this is not much information, but since
I'm not a fan of Redhat's packaging of the Apache web
server, I can't be of much more help.

HTH

/mde/


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

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


Re: Problem with webapp

Posted by Tim Funk <fu...@joedog.org>.
Google!

http://www.google.com/search?num=30&hl=en&lr=&ie=UTF-8&oe=UTF-8&q=windows+%22Too+many+open+files%22&btnG=Google+Search


-Tim

Cemil Oeruem - Skillworks AG wrote:
> Hello there,
> 
> I have a problem with a JSP-Application running under Tomcat 4 and I
> have no idea how to solve the following problem:
> 
> The application runs fine for a while. When logging in, the users name
> and the current time is logged in a log file. 
> The user is redirected to a main page where a menu is generated by a
> DOM-Tree, which is transformed with XSL:
> 
> public void render(Writer out) {
>     TransformerFactory transFac = TransformerFactory.newInstance();
>     Transformer transformer= transFac.newTransformer(new
> StreamSource(stylesheet));
>     transformer.transform(new DOMSource(doc),
>     new StreamResult(out));
> }
> 
> This all works for a while, until the stdout of tomcat prints the
> following error:
> 
> java.io.FileNotFoundException:
> c:\Programme\ApacheTomcat_4_1\webapps\intranet\log\info.05-05-2003.txt
> (Too many open files)
> 
>>>From this time on this txt-file cannot be accessed by the application.
> Neither other log-files can.
> At the main page, where the menu should be generated, a
> NullPointerException is thrown by the render-method above and nobody can
> login any more. 
> 
> Another problem is, that restarting the tomcat does not solve the
> problem. 
> Only by installing the webapp by the .war-file lets the application run
> again. Until it crashes again...
> 
> Does anybody have an idea where the problem might be ?
> 
> Thanks a lot,
> 
> Cemil
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


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


Problem with webapp

Posted by Cemil Oeruem - Skillworks AG <ma...@cemil.de>.
Hello there,

I have a problem with a JSP-Application running under Tomcat 4 and I
have no idea how to solve the following problem:

The application runs fine for a while. When logging in, the users name
and the current time is logged in a log file. 
The user is redirected to a main page where a menu is generated by a
DOM-Tree, which is transformed with XSL:

public void render(Writer out) {
    TransformerFactory transFac = TransformerFactory.newInstance();
    Transformer transformer= transFac.newTransformer(new
StreamSource(stylesheet));
    transformer.transform(new DOMSource(doc),
    new StreamResult(out));
}

This all works for a while, until the stdout of tomcat prints the
following error:

java.io.FileNotFoundException:
c:\Programme\ApacheTomcat_4_1\webapps\intranet\log\info.05-05-2003.txt
(Too many open files)

>From this time on this txt-file cannot be accessed by the application.
Neither other log-files can.
At the main page, where the menu should be generated, a
NullPointerException is thrown by the render-method above and nobody can
login any more. 

Another problem is, that restarting the tomcat does not solve the
problem. 
Only by installing the webapp by the .war-file lets the application run
again. Until it crashes again...

Does anybody have an idea where the problem might be ?

Thanks a lot,

Cemil


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


Re: mod_jk2 from source - brief HOW TO

Posted by Boris Folgmann <mi...@folgmann.com>.
Mark Eggers schrieb:

> This was done on a Redhat Linux (release 9.0) box, but
> it should be pretty generic and useful for most
> UNIX-type OS's.

I didn't manage to compile it on Redhat 8.0 for some weeks now.

> I did not use rpm's for either the apache web server
> (2.0.45 - compiled from source) or tomcat (4.1.24 -
> installed from binary tarball).

I use the original RPMs from RedHat:
httpd-2.0.40-11.3
httpd-devel-2.0.40-11.3

> 5. Run configure with:
> 
>    ./configure \
>     --with-apxs2=<apache-root-directory>/bin/apxs \
>     --with-tomcat41=<tomcat-root-directory> \
>     --with-java-home=<java-root-directory> \
>     --with-jni \
>     --with-pcre

That doesn't work for me!
I used:
./configure --with-apxs2=/usr/sbin/apxs --with-tomcat41=/var/tomcat4/
--with-java-home=/usr/java/j2sdk1.4.1_02/ --with-jni --with-pcre

And I get:
[...]
checking for sed... /bin/sed
checking for cp... /bin/cp
checking for mkdir... /bin/mkdir
no apxs given
XMLDoc parsing falseXMLDoc unable to open file false

XMLDoc dump:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
XMLDoc writing "dump.xml".
XMLDoc creating file in memory: 0 bytes.
XMLDoc parsing memory file. no element found at line 1

XMLDoc dump memory file:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
freeing memfile.
creating empty XMLDoc object
adding new data to XMLDoc object

XMLDoc dump created XMLDoc:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<elem1><name>Element1</name>
<class>NoSense</class>
</elem1>
<elem2 long="yes" sense="non" >
this is a longer text
 to show that it works aswell.
</elem2>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
deleting XMLDoc objects.
finished.
need to check for Perl first, apxs depends on it...
checking for perl... /usr/bin/perl
XMLDoc parsing falseXMLDoc unable to open file false

XMLDoc dump:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
XMLDoc writing "dump.xml".
XMLDoc creating file in memory: 0 bytes.
XMLDoc parsing memory file. no element found at line 1

XMLDoc dump memory file:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
freeing memfile.
creating empty XMLDoc object
adding new data to XMLDoc object

XMLDoc dump created XMLDoc:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<elem1><name>Element1</name>
<class>NoSense</class>
</elem1>
<elem2 long="yes" sense="non" >
this is a longer text
 to show that it works aswell.
</elem2>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
deleting XMLDoc objects.
finished.
Error: no input file given.
Error: no input file given.
configure: error: Invalid location for apxs: '/usr/sbin/apxs'

Does anybody know what that means?

cu,
	boris

-- 
Dipl.-Inf. Boris Folgmann   mailto:boris@folgmann.de
TeamForge GmbH i.G.         http://www.folgmann.de


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