I have compile the mod_jk2 at windows Setup a catalina.base for integration a Tomct 5.0.19 with Apache 2.0.48 But, nothing work right ! :-( I can startup the vm inside Apache and can access the application with a http connector. One strange thing is, that JSP can't compile. After I add the tools jar at my worker2.properties the probleme are not fixed. My last stable JNI Version is JK2.0.2, Apache 2.0.48 with Tomcat 4.1.27. I add my jk2.properties and worker2.properties . Peter PS: Also testet with the current CVS Head!
Created attachment 10497 [details] Apache 2.0.48 worker2.properties (JNI for Tomcat 5.0.19)
Created attachment 10498 [details] jk2.properties for JNI Mode ( JK2 2.0.4 dev)
I tested it and it works (but I maintain that JNI mode is mostly useless). - You need JMX in the classpath as well, and it should work. You'll also get errors about JMX registration errors, but these can be ignored. Don't add everyting to the classpath. - startd and stopd should be used for the parameters. - Don't start with a more complex catalina.base install. Start with a simple catalina.home only, without catalina.base.
Great! Success with the new parameter startd and stopd. The jmx lib is now on my reduce classpath. My working configuration has following jars bootstrap.jar tools.jar jmx.jar tomcat-jni.jar My JSP Compilation error is a too long classpath error at windows. After I reduce the path the JSP's are working. The catalina.base mode with my own catalina.config is working perfect. Ok, the direct Apache JNI Mode is no really usefull for big site but for single small maschine an option. By very small installation you have only to handle the apache service to start and stop. I will start a performance test at the weekend and than I tell you more. Great, now I can start to document this jni JK2 option for my german tomcat book project. I also document it on my german http://tomcat.objektpark.org site and wrote a story at my TomC@ series at JavaMagazin.. Thanx a lot Peter PS: add my working workers2.properties Other thing is.... Can't Compile jk_isapi at Apache 2.0.48 cvs head 10.03.04 Microsoft VC98 Windows XP Prof SP 1 Compiling D:\tomcat\develop\tomcat5\jakarta-tomcat-connectors\jk\native2\server\ isapi\jk_isapi_plugin.c [so] Compile failed 2 D:\tomcat\develop\tomcat5\jakarta-tomcat-connectors \jk\native2\server\isapi\jk_isapi_plugin.c [so] Output: [so] jk_isapi_plugin.c [so] D:\tomcat\develop\tomcat5\jakarta-tomcat-connectors\jk\native2\serve r\isapi\jk_isapi_plugin.c(163) : error C2065: 'SF_NOTIFY_AUTH_COMPLETE' : nichtd eklarierter Bezeichner [so] D:\tomcat\develop\tomcat5\jakarta-tomcat-connectors\jk\native2\serve r\isapi\jk_isapi_plugin.c(163) : warning C4018: '==' : Konflikt zwischen signed und unsigned [so] D:\tomcat\develop\tomcat5\jakarta-tomcat-connectors\jk\native2\serve r\isapi\jk_isapi_plugin.c(233) : warning C4018: '==' : Konflikt zwischen signed und unsigned [so] D:\tomcat\develop\tomcat5\jakarta-tomcat-connectors\jk\native2\serve r\isapi\jk_isapi_plugin.c(234) : error C2065: 'PHTTP_FILTER_AUTH_COMPLETE_INFO' : nichtdeklarierter Bezeichner [so] D:\tomcat\develop\tomcat5\jakarta-tomcat-connectors\jk\native2\serve r\isapi\jk_isapi_plugin.c(234) : error C2146: Syntaxfehler : Fehlendes ')' vor B ezeichner 'pvNotification' [so] D:\tomcat\develop\tomcat5\jakarta-tomcat-connectors\jk\native2\serve r\isapi\jk_isapi_plugin.c(234) : warning C4047: '=' : Anzahl der Dereferenzierun gen bei 'int (__stdcall *)(struct _HTTP_FILTER_CONTEXT *,char *,void *,unsigned long *)' und 'int ' unterschiedlich [so] D:\tomcat\develop\tomcat5\jakarta-tomcat-connectors\jk\native2\serve r\isapi\jk_isapi_plugin.c(234) : error C2059: Syntaxfehler : ')' [so] D:\tomcat\develop\tomcat5\jakarta-tomcat-connectors\jk\native2\serve r\isapi\jk_isapi_plugin.c(235) : error C2146: Syntaxfehler : Fehlendes ')' vor B ezeichner 'pvNotification' [so] D:\tomcat\develop\tomcat5\jakarta-tomcat-connectors\jk\native2\serve r\isapi\jk_isapi_plugin.c(235) : warning C4047: '=' : Anzahl der Dereferenzierun gen bei 'int (__stdcall *)(struct _HTTP_FILTER_CONTEXT *,char *,char *)' und 'in t ' unterschiedlich [so] D:\tomcat\develop\tomcat5\jakarta-tomcat-connectors\jk\native2\serve r\isapi\jk_isapi_plugin.c(235) : error C2059: Syntaxfehler : ')' [so] D:\tomcat\develop\tomcat5\jakarta-tomcat-connectors\jk\native2\serve r\isapi\jk_isapi_plugin.c(236) : error C2146: Syntaxfehler : Fehlendes ')' vor B ezeichner 'pvNotification' [so] D:\tomcat\develop\tomcat5\jakarta-tomcat-connectors\jk\native2\serve r\isapi\jk_isapi_plugin.c(236) : warning C4047: '=' : Anzahl der Dereferenzierun gen bei 'int (__stdcall *)(struct _HTTP_FILTER_CONTEXT *,char *,char *)' und 'in t ' unterschiedlich [so] D:\tomcat\develop\tomcat5\jakarta-tomcat-connectors\jk\native2\serve r\isapi\jk_isapi_plugin.c(236) : error C2059: Syntaxfehler : ')' [so] StdErr: BUILD FAILED file:D:/tomcat/develop/tomcat5/jakarta-tomcat-connectors/jk/native2/build.xml:61 1: Compile failed D:\tomcat\develop\tomcat5\jakarta-tomcat-connectors\jk\native2 \server\isapi\jk_isapi_plugin.c Total time: 1 minute 58 seconds D:\tomcat\develop\tomcat5>
Created attachment 10743 [details] working worker.properties (CVS HEAD 10.3.04)
*** Bug 17762 has been marked as a duplicate of this bug. ***
These days I tried to setup Apache 2.0.52 and Tomcat 5.5.4 to interwork either start up separately or Tomcat as Apache "inprocess". After many many trials I managed to get the non "inprocess" configuration to work. However, I didn't manage to get the inprocess configuration up and running. When I look at the Tomcat/Catalina example config files, i.e. workers2.properties and jk2.manifest, I'd recognized that they are hopefully outdated, i.e. the listed jars do not match with the provided set of jars and JMX has become part of JAVA 5 that tomcat 5.5 is supposed to use. Even the uris to the default examples, are not correct. One more note. Since it is not clear which config files are used by an installation and which one are not I recommend to rename these files by adding an example suffix. This would save a lot of confusion, too. By the way the non inprocess configuration could be as easy as just adding the following lines to apaches httpd.conf file: <IfModule !mod_jk2.c> LoadModule jk2_module modules/mod_jk2.so </IfModule> <IfModule mod_jk2.c> JkSet channel.socket:localhost:8009.info "Ajp13 forwarding over socket" JkSet channel.socket:localhost:8009.tomcatId localhost:8009 JkSet status:.info "Status worker, displays runtime information" <Location /jkstatus> JkUriSet group status: </Location> <Location /jsp-examples> JkUriSet group lb:lb </Location> <Location /servlets-examples> JkUriSet group lb:lb </Location> </IfModule>
As of November 15, 2004, JK2 is no longer supported. All bugs related to JK2 will be marked as WONTFIX. In its place, some of its features have been backported to jk1. Most of those features are included in 1.2.9, which is released on December 24th, 2004. Another alternative is the ajp addition to mod_proxy which will be part of apache 2. For more information on the Tomat connectors docs at http://jakarta.apache.org/tomcat/connectors-doc/