tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Short" <dsh...@san.rr.com>
Subject RE: Apache 2.048 + Tomcat 5 + Win 2k
Date Mon, 19 Jan 2004 19:02:51 GMT
I, too, am having difficulty getting Apache 2.0.48 to load Tomcat 4.1.29
in-process.  Apache installed and runs just fine, Tomcat installed and runs
just fine on it's own (I can access the examples JSPs and servlets, etc.)
and I'm using the latest mod_jk2.dll (in the Apache2\modules directory).  I
used this link
http://www.gregoire.org/howto/Apache2_Jk2_TC4.1.x_JSDK1.4.x.html to perform
the installations.

The server.xml file is "out of the box" unchanged.
I added LoadModule jk2_module modules/mod_jk2.dll to the httpd.conf file
(this was the only change).


Here's my jk2.properties file:

## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED
## WHEN YOU EDIT THE FILE.

## COMMENTS WILL BE _LOST_

## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.

# Set the desired handler list
# handler.list=apr,request,channelJni
#
# Override the default port for the socketChannel
# channelSocket.port=8019
# Default:
# channelUnix.file=${jkHome}/work/jk2.socket
# Just to check if the the config  is working
shm.file=${jkHome}/work/jk2.shm

# In order to enable jni use any channelJni directive
channelJni.disabled = 0
# And one of the following directives:

# apr.jniModeSo=/opt/apache2/modules/mod_jk2.so

# If set to inprocess the mod_jk2 will Register natives itself
# This will enable the starting of the Tomcat from mod_jk2
apr.jniModeSo=inprocess


Here's my workers2.properties file:

[vm:]
info=Parameters used to load a JVM in the server process
#JVM=C:\jdk\jre\bin\hotspot\jvm.dll
OPT=-Djava.class.path=${CATALINA_HOME}/bin/tomcat-jni.jar;${CATALINA_HOME}/s
erver/lib/commons-logging.jar
OPT=-Dtomcat.home=${CATALINA_HOME}
OPT=-Dcatalina.home=${CATALINA_HOME}
OPT=-Xmx128M
#OPT=-Djava.compiler=NONE
disabled=0

[logger]
level=DEBUG

[config:]
#file=${serverRoot}/conf/workers2.properties
file=c:/Apache2/conf/workers2.properties
debug=0
debugEnv=0

[uriMap:]
info=Maps the requests. Options: debug
debug=0

# Alternate file logger
#[logger.file:0]
#level=DEBUG
#file=${serverRoot}/logs/jk2.log

[shm:]
info=Scoreboard. Required for reconfiguration and status with multiprocess
servers
file=${serverRoot}/logs/jk2.shm
size=1000000
debug=0
disabled=0

[workerEnv:]
info=Global server options
timing=1
debug=0

# Default Native Logger (apache2 or win32 )
# can be overriden to a file logger, useful
# when tracing win32 related issues
#logger=logger.file:0

[lb:lb]
info=Default load balancer.
debug=0

#[lb:lb_1]
#info=A second load balancer.
#debug=0

[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
debug=0
tomcatId=localhost:8009

#[channel.socket:localhost:8019]
#info=A second tomcat instance.
#debug=0
#tomcatId=localhost:8019
#lb_factor=1
#group=lb
#group=lb_1
#disabled=0

#[channel.un:/opt/33/work/jk2.socket]
#info=A second channel connecting to localhost:8019 via unix socket
#tomcatId=localhost:8019
#lb_factor=1
#debug=0

[channel.jni:jni]
info=The jni channel, used if tomcat is started inprocess

[status:]
info=Status worker, displays runtime informations

[worker.jni:onStartup]
info=Command to be executed by the VM on startup. This one will start
tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=start
disabled=0
stdout=c:/Apache2/logs/stdout.log
stderr=c:/Apache2/logs/stderr.log

[worker.jni:onShutdown]
info=Command to be executed by the VM on shutdown. This one will stop
tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=stop
disabled=0

[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:

#[uri:127.0.0.1:8003]
#info=Example virtual host. Make sure myVirtualHost is in /etc/hosts to test
it
#alias=myVirtualHost:8003

#[uri:127.0.0.1:8003/ex]
#info=Example webapp in the virtual host. It'll go to lb_1 ( i.e.
localhost:8019 )
#context=/ex
#group=lb_1

[uri:/examples]
info=Example webapp in the default context.
context=/examples
debug=0

#[uri:/examples1/*]
#info=A second webapp, this time going to the second tomcat only.
#group=lb_1
#debug=0

[uri:/examples/servlets/*]
info=Prefix mapping

[uri:/examples/*.jsp]
info=Extension mapping

[uri:/examples/*]
info=Map the whole webapp

[uri:/examples/servlets/HelloW]
info=Exampel with debug enabled.
debug=10

Here's the Apache2\logs\error.log

[Mon Jan 19 10:53:20 2004] [notice] Parent: Created child process 2852
[Mon Jan 19 10:53:21 2004] [notice] Child 2852: Child process is running
[Mon Jan 19 10:53:21 2004] [notice] jk2_init() Found child 2852 in
scoreboard slot 0
[Mon Jan 19 10:53:21 2004] [notice] vm.init(): Jni lib: C:\Program
Files\JavaSoft\JRE\1.3.1_03\bin\hotspot\jvm.dll
[Mon Jan 19 10:53:21 2004] [notice] vm.open2() done
[Mon Jan 19 10:53:21 2004] [notice] jni.validate() class=
org/apache/jk/apr/TomcatStarter
[Mon Jan 19 10:53:21 2004] [notice] Loaded org/apache/jk/apr/TomcatStarter
[Mon Jan 19 10:53:21 2004] [error] Can't find class
org/apache/jk/apr/AprImpl
java.lang.NoClassDefFoundError: javax/management/MBeanRegistration
 at java.lang.ClassLoader.defineClass0(Native Method)
 at java.lang.ClassLoader.defineClass(Unknown Source)
 at java.security.SecureClassLoader.defineClass(Unknown Source)
 at java.net.URLClassLoader.defineClass(Unknown Source)
 at java.net.URLClassLoader.access$100(Unknown Source)
 at java.net.URLClassLoader$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClassInternal(Unknown Source)
 at java.lang.ClassLoader.defineClass0(Native Method)
 at java.lang.ClassLoader.defineClass(Unknown Source)
 at java.security.SecureClassLoader.defineClass(Unknown Source)
 at java.net.URLClassLoader.defineClass(Unknown Source)
 at java.net.URLClassLoader.access$100(Unknown Source)
 at java.net.URLClassLoader$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClassInternal(Unknown Source)
[Mon Jan 19 10:53:21 2004] [notice] vm.detach() ok
[Mon Jan 19 10:53:21 2004] [error] workerEnv.initWorkers() init failed for
worker.jni:onStartup
[Mon Jan 19 10:53:21 2004] [notice] jni.validate() class=
org/apache/jk/apr/TomcatStarter
[Mon Jan 19 10:53:21 2004] [notice] Loaded org/apache/jk/apr/TomcatStarter
[Mon Jan 19 10:53:21 2004] [error] Can't find class
org/apache/jk/apr/AprImpl
java.lang.NoClassDefFoundError: javax/management/MBeanRegistration
 at java.lang.ClassLoader.defineClass0(Native Method)
 at java.lang.ClassLoader.defineClass(Unknown Source)
 at java.security.SecureClassLoader.defineClass(Unknown Source)
 at java.net.URLClassLoader.defineClass(Unknown Source)
 at java.net.URLClassLoader.access$100(Unknown Source)
 at java.net.URLClassLoader$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClassInternal(Unknown Source)
 at java.lang.ClassLoader.defineClass0(Native Method)
 at java.lang.ClassLoader.defineClass(Unknown Source)
 at java.security.SecureClassLoader.defineClass(Unknown Source)
 at java.net.URLClassLoader.defineClass(Unknown Source)
 at java.net.URLClassLoader.access$100(Unknown Source)
 at java.net.URLClassLoader$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClassInternal(Unknown Source)
[Mon Jan 19 10:53:21 2004] [notice] vm.detach() ok
[Mon Jan 19 10:53:21 2004] [error] workerEnv.initWorkers() init failed for
worker.jni:onShutdown
[Mon Jan 19 10:53:21 2004] [notice] workerEnv.init() ok
C:/Apache2/conf/workers2.properties
[Mon Jan 19 10:53:21 2004] [error] mod_jk child init 1 0
[Mon Jan 19 10:53:21 2004] [notice] Child 2852: Acquired the start mutex.
[Mon Jan 19 10:53:21 2004] [notice] Child 2852: Starting 250 worker threads.


I've tried adding various JAR files to the workers2.properties
OPT=--Djava.class.path.  As I do that, new java.lang.NoClassDefFoundError
errors keep popping up.

I'm going crazy!!!!

Does anyone have a working Apache 2.0.48 and Tomcat 4.1.29 working
in-process?

Dave
  -----Original Message-----
  From: Alvaro Seixas [mailto:lumbriga_ck@yahoo.com.br]
  Sent: Monday, January 19, 2004 3:34 AM
  To: Tomcat Users List
  Subject: Apache 2.048 + Tomcat 5 + Win 2k


  Hello

  I'm having some problems with Apache + Tomcat config. When I try to access
the 'jsp-examples' and 'servlets-examples' some times I get "Internal Server
Error", it is very instable.

  I configured the workers2.properties just like appears on
http://www.gregoire.org/howto/Apache2_Jk2_TC4.1.x_JSDK1.4.x.html and added
'jsp-examples' and 'servlets-examples' in it.

  And jk2.properties is like this:

  #Socket configuration
  #
  handler.list=request,container,channelSocket

  #
  # socket configuration
  #
  channelSocket.port=8009
  channelSocket.address=127.0.0.1
  channelSocket.maxPort=port+10

  When I get the error and open the log file there's a message that tells,
"Can't find class org/apache/jk/apr/AprImpl".
  I already searched on many sites and archive lists but couldn't solve it.

  If someone could help I'd appreciate!!!

  The error.log follows attached.

  Thanks,
  Alvaro

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message