tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: JNI broken in jk2 - due to jk2_channel_jni_open()
Date Wed, 12 Feb 2003 07:07:53 GMT

> -----Original Message-----
> From: Rahul Bhargava []
> Sent: 11. veljańća 2003 20:34
> To:
> Subject: JNI broken in jk2 - due to jk2_channel_jni_open()
> There is no way in hell JNI can ever work with JK2.
> jk_channel_jni.c::jk2_channel_jni_open invokes
> the java static method createJavaContext() which in turns tries to
> a registered JkHandler for
> Jni (ChannelJni) from the underlying hashtable. However when the in-
> process mode is enabled, there
> is nobody registering any handlers! As a result null is trurned into c
> land from Java when createJavaContext
> returns causing the JNI invocation to fail.

The jni channel is initialized from inside AprImpl. That is where all
the java-native stuff is done and initialized.
Also that imposes some problems, and one of them is missing LogFactory
class from commons-logging.
All you have to do is to add the commons-logging to the TC's startup

Here is the snippet from the _original_


So, you'll need both classes preloaded to be able to use the JNI.

> This convince me that JNI mode never really worked with JK2. If you
> at the tomcat-user archive
> you can see people falling on their faces trying to get this to
> nobody has succedded now
> I know why.

Just follow the:

You have the minimum JNI configuration section there, except that you
should replace the classpath directive with the above two lines.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message