Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Tomcat 5 with Apache2

Tomcat 5 with Apache2

2003-12-30       - By Shawn Zernik

 Back
Gurus:

I installed the Tomcat per these directions
(http://www.gregoire.org/howto/Apache2_Jk2_TC4.1.x_JSDK1.4.x.html) with
tomcat in C:\tomcat and Apache HTTPd in c:\apache2.  It starts to load but
dies.  I have stoped the httpd server, deleted the log file, and started.
The following errors are in the log:

[Tue Dec 30 22:34:35 2003] [notice] Parent: Created child process 1852
[Tue Dec 30 22:34:35 2003] [notice] Child 1852: Child process is running
[Tue Dec 30 22:34:35 2003] [notice] jk2_init() Found child 1852 in
scoreboard slot 0
[Tue Dec 30 22:34:35 2003] [notice] vm.init(): Jni lib: C:\Program
Files\Java\j2re1.4.2\bin\client\jvm.dll
[Tue Dec 30 22:34:35 2003] [notice] vm.open2() done
[Tue Dec 30 22:34:35 2003] [notice] jni.validate() class=
org/apache/jk/apr/TomcatStarter
[Tue Dec 30 22:34:35 2003] [error] Can't find class
org/apache/jk/apr/TomcatStarter
java.lang.NoClassDefFoundError Source code of java.lang.NoClassDefFoundError: org/apache/jk/apr/TomcatStarter
[Tue Dec 30 22:34:35 2003] [notice] vm.detach() ok
[Tue Dec 30 22:34:35 2003] [error] workerEnv.initWorkers() init failed for
worker.jni:onStartup
[Tue Dec 30 22:34:35 2003] [notice] jni.validate() class=
org/apache/jk/apr/TomcatStarter
[Tue Dec 30 22:34:35 2003] [error] Can't find class
org/apache/jk/apr/TomcatStarter
java.lang.NoClassDefFoundError Source code of java.lang.NoClassDefFoundError: org/apache/jk/apr/TomcatStarter
[Tue Dec 30 22:34:35 2003] [notice] vm.detach() ok
[Tue Dec 30 22:34:35 2003] [error] workerEnv.initWorkers() init failed for
worker.jni:onShutdown
[Tue Dec 30 22:34:35 2003] [notice] uriMap: creating context */tomcat-docs
[Tue Dec 30 22:34:35 2003] [notice] workerEnv.init() ok
C:/apache2/conf/workers2.properties
[Tue Dec 30 22:34:35 2003] [error] mod_jk child init 1 0
[Tue Dec 30 22:34:35 2003] [notice] Child 1852: Acquired the start mutex.
[Tue Dec 30 22:34:35 2003] [notice] Child 1852: Starting 250 worker threads.




After searching on the internet, I found a VM option that includes just
about everything:

OPT=-Djava.class.path=C:/Tomcat/bin/tomcat-jni.jar;C:/Tomcat/server/lib/tomc
at-jk2.jar;C:/Tomcat/server/lib/commons-logging.jar;C:/Tomcat/common/lib/com
mons-collections.jar;C:/Tomcat/common/lib/naming-common.jar;C:/Tomcat/common
/lib/naming-resources.jar;C:/Tomcat/server/lib/catalina.jar;C:/Tomcat/server
/lib/commons-digester.jar;C:/TomCat/server/lib/commons-beanutils.jar;C:/Tomc
at/server/lib/mx4j-jmx.jar;C:/Tomcat/server/lib/commons-modeler.jar;C:/Tomca
t/common/lib/servlet.jar;C:/Tomcat/server/lib/tomcat-http11.jar;C:/Tomcat/se
rver/lib/servlets-invoker.jar;C:/Tomcat/server/lib/servlets-default.jar;C:/T
omcat/server/lib/servlets-webdav.jar;C:/Tomcat/server/lib/servlets-manager.j
ar;C:/Tomcat/server/lib/servlets-common.jar;c:/j2sdk/j2sdk1.4.2/lib/tools.ja
r;c:/tomcat/bin/BootStrap.jar;c:/tomcat/server/lib/tomcat-util.jar;c:/tomcat
/server/lib/tomcat-coyote.jar



This get past the prevoius error, but dies in a stack trace:

[Tue Dec 30 22:40:12 2003] [notice] Parent: Created child process 1448
[Tue Dec 30 22:40:12 2003] [notice] Child 1448: Child process is running
[Tue Dec 30 22:40:12 2003] [notice] jk2_init() Found child 1448 in
scoreboard slot 0
[Tue Dec 30 22:40:12 2003] [notice] vm.init(): Jni lib: C:\Program
Files\Java\j2re1.4.2\bin\client\jvm.dll
[Tue Dec 30 22:40:12 2003] [notice] vm.open2() done
[Tue Dec 30 22:40:12 2003] [notice] jni.validate() class=
org/apache/jk/apr/TomcatStarter
[Tue Dec 30 22:40:12 2003] [notice] Loaded org/apache/jk/apr/TomcatStarter
[Tue Dec 30 22:40:12 2003] [error] Can't find class
org/apache/jk/apr/AprImpl
java.lang.NoClassDefFoundError Source code of java.lang.NoClassDefFoundError: javax/management/MBeanRegistration
  at java.lang.ClassLoader Source code of java.lang.ClassLoader(Native Method)
  at java.lang.ClassLoader Source code of java.lang.ClassLoader(Unknown Source)
  at java.security.SecureClassLoader Source code of java.security.SecureClassLoader(Unknown Source)
  at java.net.URLClassLoader Source code of java.net.URLClassLoader(Unknown Source)
  at java.net.URLClassLoader Source code of java.net.URLClassLoader$100(Unknown Source)
  at java.net.URLClassLoader Source code of java.net.URLClassLoader$1.run(Unknown Source)
  at java.security.AccessController Source code of java.security.AccessController(Native Method)
  at java.net.URLClassLoader Source code of java.net.URLClassLoader(Unknown Source)
  at java.lang.ClassLoader Source code of java.lang.ClassLoader(Unknown Source)
  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  at java.lang.ClassLoader Source code of java.lang.ClassLoader(Unknown Source)
  at java.lang.ClassLoader Source code of java.lang.ClassLoader(Unknown Source)
  at java.lang.ClassLoader Source code of java.lang.ClassLoader(Native Method)
  at java.lang.ClassLoader Source code of java.lang.ClassLoader(Unknown Source)
  at java.security.SecureClassLoader Source code of java.security.SecureClassLoader(Unknown Source)
  at java.net.URLClassLoader Source code of java.net.URLClassLoader(Unknown Source)
  at java.net.URLClassLoader Source code of java.net.URLClassLoader$100(Unknown Source)
  at java.net.URLClassLoader Source code of java.net.URLClassLoader$1.run(Unknown Source)
  at java.security.AccessController Source code of java.security.AccessController(Native Method)
  at java.net.URLClassLoader Source code of java.net.URLClassLoader(Unknown Source)
  at java.lang.ClassLoader Source code of java.lang.ClassLoader(Unknown Source)
  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  at java.lang.ClassLoader Source code of java.lang.ClassLoader(Unknown Source)
  at java.lang.ClassLoader Source code of java.lang.ClassLoader(Unknown Source)


My workers2.properties file is as follows:

[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

[vm:]
info=Parameters used to load a JVM in the server process
#JVM=C:\jdk\jre\bin\hotspot\jvm.dll
#OPT=-Djava.class.path=c:/Tomcat/bin/*
#OPT=-Djava.class.path=c:/Tomcat/bin/tomcat-jni.jar;c:/Tomcat/server/lib/com
mons-logging.jar
#OPT=-Djava.class.path=c:/Tomcat/bin/*;C:/Tomcat/server/lib/*;C:/Tomcat/comm
on/lib/*;
OPT=-Djava.class.path=C:/Tomcat/bin/tomcat-jni.jar;C:/Tomcat/server/lib/tomc
at-jk2.jar;C:/Tomcat/server/lib/commons-logging.jar;C:/Tomcat/common/lib/com
mons-collections.jar;C:/Tomcat/common/lib/naming-common.jar;C:/Tomcat/common
/lib/naming-resources.jar;C:/Tomcat/server/lib/catalina.jar;C:/Tomcat/server
/lib/commons-digester.jar;C:/TomCat/server/lib/commons-beanutils.jar;C:/Tomc
at/server/lib/mx4j-jmx.jar;C:/Tomcat/server/lib/commons-modeler.jar;C:/Tomca
t/common/lib/servlet.jar;C:/Tomcat/server/lib/tomcat-http11.jar;C:/Tomcat/se
rver/lib/servlets-invoker.jar;C:/Tomcat/server/lib/servlets-default.jar;C:/T
omcat/server/lib/servlets-webdav.jar;C:/Tomcat/server/lib/servlets-manager.j
ar;C:/Tomcat/server/lib/servlets-common.jar;c:/j2sdk/j2sdk1.4.2/lib/tools.ja
r;c:/tomcat/bin/BootStrap.jar;c:/tomcat/server/lib/tomcat-util.jar;c:/tomcat
/server/lib/tomcat-coyote.jar
OPT=-Dtomcat.home=c:\Tomcat
OPT=-Dcatalina.home=c:\tomcat
OPT=-Xmx128M
#OPT=-Djava.compiler=NONE
disabled=0


[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

[uri:/jsp-examples]
context=/jsp-examples
debug=0

[uri:/admin]
context=/admin
debug=0

[uri:/manager]
context=/manager
debug=0

[uri:/tomcat]
context=/tomcat-docs
debug=0

The other properties file is verbatum what the documentation says.  I just
had to uncomment some lines from the exitsting files.

Shawn Zernik
Internetwork Consulting
www.internetworkconsulting.net


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)




©2008 junlu.com - Jax Systems, LLC, U.S.A.