In this case I've used the Jboss 3.2 (from Jboss.org). Looks like Apache 2.0.48 have more problems with Tomcat then Jboss (as for me). And sometimes you can have these errors but with next start of Tomcat all works fine.
David, 19 ������ 2004 �., 16:02:51 you wrote: DS> I, too, am having difficulty getting Apache 2.0.48 to load Tomcat 4.1.29 DS> in-process. Apache installed and runs just fine, Tomcat installed and runs DS> just fine on it's own (I can access the examples JSPs and servlets, etc.) DS> and I'm using the latest mod_jk2.dll (in the Apache2\modules directory). I DS> used this link DS> http://www.gregoire.org/howto/Apache2_Jk2_TC4.1.x_JSDK1.4.x.html to perform DS> the installations. DS> The server.xml file is "out of the box" unchanged. DS> I added LoadModule jk2_module modules/mod_jk2.dll to the httpd.conf file DS> (this was the only change). DS> Here's my jk2.properties file: DS> ## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED DS> ## WHEN YOU EDIT THE FILE. DS> ## COMMENTS WILL BE _LOST_ DS> ## DOCUMENTATION OF THE FORMAT IN JkMain javadoc. DS> # Set the desired handler list DS> # handler.list=apr,request,channelJni DS> # DS> # Override the default port for the socketChannel DS> # channelSocket.port=8019 DS> # Default: DS> # channelUnix.file=${jkHome}/work/jk2.socket DS> # Just to check if the the config is working DS> shm.file=${jkHome}/work/jk2.shm DS> # In order to enable jni use any channelJni directive DS> channelJni.disabled = 0 DS> # And one of the following directives: DS> # apr.jniModeSo=/opt/apache2/modules/mod_jk2.so DS> # If set to inprocess the mod_jk2 will Register natives itself DS> # This will enable the starting of the Tomcat from mod_jk2 DS> apr.jniModeSo=inprocess DS> Here's my workers2.properties file: DS> [vm:] DS> info=Parameters used to load a JVM in the server process DS> #JVM=C:\jdk\jre\bin\hotspot\jvm.dll DS> OPT=-Djava.class.path=${CATALINA_HOME}/bin/tomcat-jni.jar;${CATALINA_HOME}/s DS> erver/lib/commons-logging.jar DS> OPT=-Dtomcat.home=${CATALINA_HOME} DS> OPT=-Dcatalina.home=${CATALINA_HOME} DS> OPT=-Xmx128M DS> #OPT=-Djava.compiler=NONE DS> disabled=0 DS> [logger] DS> level=DEBUG DS> [config:] DS> #file=${serverRoot}/conf/workers2.properties DS> file=c:/Apache2/conf/workers2.properties DS> debug=0 DS> debugEnv=0 DS> [uriMap:] DS> info=Maps the requests. Options: debug DS> debug=0 DS> # Alternate file logger DS> #[logger.file:0] DS> #level=DEBUG DS> #file=${serverRoot}/logs/jk2.log DS> [shm:] DS> info=Scoreboard. Required for reconfiguration and status with multiprocess DS> servers DS> file=${serverRoot}/logs/jk2.shm DS> size=1000000 DS> debug=0 DS> disabled=0 DS> [workerEnv:] DS> info=Global server options DS> timing=1 DS> debug=0 DS> # Default Native Logger (apache2 or win32 ) DS> # can be overriden to a file logger, useful DS> # when tracing win32 related issues DS> #logger=logger.file:0 DS> [lb:lb] DS> info=Default load balancer. DS> debug=0 DS> #[lb:lb_1] DS> #info=A second load balancer. DS> #debug=0 DS> [channel.socket:localhost:8009] DS> info=Ajp13 forwarding over socket DS> debug=0 DS> tomcatId=localhost:8009 DS> #[channel.socket:localhost:8019] DS> #info=A second tomcat instance. DS> #debug=0 DS> #tomcatId=localhost:8019 DS> #lb_factor=1 DS> #group=lb DS> #group=lb_1 DS> #disabled=0 DS> #[channel.un:/opt/33/work/jk2.socket] DS> #info=A second channel connecting to localhost:8019 via unix socket DS> #tomcatId=localhost:8019 DS> #lb_factor=1 DS> #debug=0 DS> [channel.jni:jni] DS> info=The jni channel, used if tomcat is started inprocess DS> [status:] DS> info=Status worker, displays runtime informations DS> [worker.jni:onStartup] DS> info=Command to be executed by the VM on startup. This one will start DS> tomcat. DS> class=org/apache/jk/apr/TomcatStarter DS> ARG=start DS> disabled=0 DS> stdout=c:/Apache2/logs/stdout.log DS> stderr=c:/Apache2/logs/stderr.log DS> [worker.jni:onShutdown] DS> info=Command to be executed by the VM on shutdown. This one will stop DS> tomcat. DS> class=org/apache/jk/apr/TomcatStarter DS> ARG=stop DS> disabled=0 DS> [uri:/jkstatus/*] DS> info=Display status information and checks the config file for changes. DS> group=status: DS> #[uri:127.0.0.1:8003] DS> #info=Example virtual host. Make sure myVirtualHost is in /etc/hosts to test DS> it DS> #alias=myVirtualHost:8003 DS> #[uri:127.0.0.1:8003/ex] DS> #info=Example webapp in the virtual host. It'll go to lb_1 ( i.e. DS> localhost:8019 ) DS> #context=/ex DS> #group=lb_1 DS> [uri:/examples] DS> info=Example webapp in the default context. DS> context=/examples DS> debug=0 DS> #[uri:/examples1/*] DS> #info=A second webapp, this time going to the second tomcat only. DS> #group=lb_1 DS> #debug=0 DS> [uri:/examples/servlets/*] DS> info=Prefix mapping DS> [uri:/examples/*.jsp] DS> info=Extension mapping DS> [uri:/examples/*] DS> info=Map the whole webapp DS> [uri:/examples/servlets/HelloW] DS> info=Exampel with debug enabled. DS> debug=10 DS> Here's the Apache2\logs\error.log DS> [Mon Jan 19 10:53:20 2004] [notice] Parent: Created child process 2852 DS> [Mon Jan 19 10:53:21 2004] [notice] Child 2852: Child process is running DS> [Mon Jan 19 10:53:21 2004] [notice] jk2_init() Found child 2852 in DS> scoreboard slot 0 DS> [Mon Jan 19 10:53:21 2004] [notice] vm.init(): Jni lib: C:\Program DS> Files\JavaSoft\JRE\1.3.1_03\bin\hotspot\jvm.dll DS> [Mon Jan 19 10:53:21 2004] [notice] vm.open2() done DS> [Mon Jan 19 10:53:21 2004] [notice] jni.validate() class= DS> org/apache/jk/apr/TomcatStarter DS> [Mon Jan 19 10:53:21 2004] [notice] Loaded DS> org/apache/jk/apr/TomcatStarter DS> [Mon Jan 19 10:53:21 2004] [error] Can't find class DS> org/apache/jk/apr/AprImpl DS> java.lang.NoClassDefFoundError: javax/management/MBeanRegistration DS> at java.lang.ClassLoader.defineClass0(Native Method) DS> at java.lang.ClassLoader.defineClass(Unknown Source) DS> at java.security.SecureClassLoader.defineClass(Unknown Source) DS> at java.net.URLClassLoader.defineClass(Unknown Source) DS> at java.net.URLClassLoader.access$100(Unknown Source) DS> at java.net.URLClassLoader$1.run(Unknown Source) DS> at java.security.AccessController.doPrivileged(Native Method) DS> at java.net.URLClassLoader.findClass(Unknown Source) DS> at java.lang.ClassLoader.loadClass(Unknown Source) DS> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) DS> at java.lang.ClassLoader.loadClass(Unknown Source) DS> at java.lang.ClassLoader.loadClassInternal(Unknown Source) DS> at java.lang.ClassLoader.defineClass0(Native Method) DS> at java.lang.ClassLoader.defineClass(Unknown Source) DS> at java.security.SecureClassLoader.defineClass(Unknown Source) DS> at java.net.URLClassLoader.defineClass(Unknown Source) DS> at java.net.URLClassLoader.access$100(Unknown Source) DS> at java.net.URLClassLoader$1.run(Unknown Source) DS> at java.security.AccessController.doPrivileged(Native Method) DS> at java.net.URLClassLoader.findClass(Unknown Source) DS> at java.lang.ClassLoader.loadClass(Unknown Source) DS> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) DS> at java.lang.ClassLoader.loadClass(Unknown Source) DS> at java.lang.ClassLoader.loadClassInternal(Unknown Source) DS> [Mon Jan 19 10:53:21 2004] [notice] vm.detach() ok DS> [Mon Jan 19 10:53:21 2004] [error] workerEnv.initWorkers() init failed for DS> worker.jni:onStartup DS> [Mon Jan 19 10:53:21 2004] [notice] jni.validate() class= DS> org/apache/jk/apr/TomcatStarter DS> [Mon Jan 19 10:53:21 2004] [notice] Loaded DS> org/apache/jk/apr/TomcatStarter DS> [Mon Jan 19 10:53:21 2004] [error] Can't find class DS> org/apache/jk/apr/AprImpl DS> java.lang.NoClassDefFoundError: javax/management/MBeanRegistration DS> at java.lang.ClassLoader.defineClass0(Native Method) DS> at java.lang.ClassLoader.defineClass(Unknown Source) DS> at java.security.SecureClassLoader.defineClass(Unknown Source) DS> at java.net.URLClassLoader.defineClass(Unknown Source) DS> at java.net.URLClassLoader.access$100(Unknown Source) DS> at java.net.URLClassLoader$1.run(Unknown Source) DS> at java.security.AccessController.doPrivileged(Native Method) DS> at java.net.URLClassLoader.findClass(Unknown Source) DS> at java.lang.ClassLoader.loadClass(Unknown Source) DS> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) DS> at java.lang.ClassLoader.loadClass(Unknown Source) DS> at java.lang.ClassLoader.loadClassInternal(Unknown Source) DS> at java.lang.ClassLoader.defineClass0(Native Method) DS> at java.lang.ClassLoader.defineClass(Unknown Source) DS> at java.security.SecureClassLoader.defineClass(Unknown Source) DS> at java.net.URLClassLoader.defineClass(Unknown Source) DS> at java.net.URLClassLoader.access$100(Unknown Source) DS> at java.net.URLClassLoader$1.run(Unknown Source) DS> at java.security.AccessController.doPrivileged(Native Method) DS> at java.net.URLClassLoader.findClass(Unknown Source) DS> at java.lang.ClassLoader.loadClass(Unknown Source) DS> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) DS> at java.lang.ClassLoader.loadClass(Unknown Source) DS> at java.lang.ClassLoader.loadClassInternal(Unknown Source) DS> [Mon Jan 19 10:53:21 2004] [notice] vm.detach() ok DS> [Mon Jan 19 10:53:21 2004] [error] workerEnv.initWorkers() init failed for DS> worker.jni:onShutdown DS> [Mon Jan 19 10:53:21 2004] [notice] workerEnv.init() ok DS> C:/Apache2/conf/workers2.properties DS> [Mon Jan 19 10:53:21 2004] [error] mod_jk child init 1 0 DS> [Mon Jan 19 10:53:21 2004] [notice] Child 2852: Acquired the start mutex. DS> [Mon Jan 19 10:53:21 2004] [notice] Child 2852: Starting 250 worker threads. DS> I've tried adding various JAR files to the workers2.properties DS> OPT=--Djava.class.path. As I do that, new java.lang.NoClassDefFoundError DS> errors keep popping up. DS> I'm going crazy!!!! DS> Does anyone have a working Apache 2.0.48 and Tomcat 4.1.29 working DS> in-process? DS> Dave DS> -----Original Message----- DS> From: Alvaro Seixas [mailto:[EMAIL PROTECTED] DS> Sent: Monday, January 19, 2004 3:34 AM DS> To: Tomcat Users List DS> Subject: Apache 2.048 + Tomcat 5 + Win 2k DS> Hello DS> I'm having some problems with Apache + Tomcat config. When I try to access DS> the 'jsp-examples' and 'servlets-examples' some times I get "Internal Server DS> Error", it is very instable. DS> I configured the workers2.properties just like appears on DS> http://www.gregoire.org/howto/Apache2_Jk2_TC4.1.x_JSDK1.4.x.html and added DS> 'jsp-examples' and 'servlets-examples' in it. DS> And jk2.properties is like this: DS> #Socket configuration DS> # DS> handler.list=request,container,channelSocket DS> # DS> # socket configuration DS> # DS> channelSocket.port=8009 DS> channelSocket.address=127.0.0.1 DS> channelSocket.maxPort=port+10 DS> When I get the error and open the log file there's a message that tells, DS> "Can't find class org/apache/jk/apr/AprImpl". DS> I already searched on many sites and archive lists but couldn't solve it. DS> If someone could help I'd appreciate!!! DS> The error.log follows attached. DS> Thanks, DS> Alvaro -- Sincerely yours, Candyman mailto:[EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
