You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Joey Kovacs <jo...@hotmail.com> on 2002/07/02 21:43:55 UTC

TOMCAT 4.0 + apache 2.0.39

I am using  Apache 2.0.39  + tomcat 4 +  Java 2 SDK 1.3.1_03

I also installed  ANT  in  c:/ant

I also installed
Download the tomcat connectors source from 
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.3/src/jakarta-tomcat-connectors-4.0.2-01-src.zip.

all from this site

http://www.galatea.com/flashguides/apache-tomcat-24-win32.xml

Now I need a copy of someones  httpd.conf file.

Everytime I add a LoadModule comment into  my apache httpd.conf file
I restart Apache and I get an error and cannot start.  WONT START

How do I do a proper load module?

this is what I tried.. both dont work

Include c:/tomcat4/conf/auto/mod_jk.conf  --- didnt work

<IfModule !mod_jk.c>
  LoadModule jk_module modules/mod_jk.dll         -----------didnt work
</IfModule>

LoadModule jk_module "C:/tomcat4/bin/modules/mod_jk.dll"

--------I dont even  have a C:/tomcat4/bin/modules/mod_jk.dll path????
pls help


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Class loader problem with Xalan under 4.0.2 and 4.0.3

Posted by ho...@visi.com.
That isn't the issue here.  Beginning with Tomcat-4.0.2, Tomcat is enforcing
Sun's classloading spec more stringently and not allowing XML/DOM libraries to
be loaded from a child classloader.  In plain english, this means you cannot
include XML/DOM libraries in WEB-INF/lib.  They must exist in a parent
classloader such as $TOMCAT_HOME/lib (or $TOMCAT_HOME/shared/lib in 4.1.x) or
$TOMCAT_HOME/common/lib (or $TOMCAT_HOME/common/endorsed when using j2sdk1.4.x
in Tomcat-4.1.x).

The reason why you get the ClassCastException is that although Tomcat is
attempting to enforce the spec, it doesn't do it very cleanly.  This was fixed
for the 4.0.4 release as well as the latest releases of 4.1.x.  Upgrade to 4.0.4
or 4.1.7 and move your XML/DOM libraries to the above mentioned directories and
all will be well.

Jake

Quoting Andrew Conrad <an...@msn.com>:

> This isn't answering your question as you posed it, but aren't
> xml-api.jar and XMLParserAPI.jar from different versions of Xerces?
> Xalan 2.4.D1 comes with Xerces 2.0.1 (xercesImpl.jar and xml-api.jar).
> To use Xerces 2.0.2, aren't you suppose to delete those files and
> replace them with those from the Xerces distribution (xercesImpl.jar and
> XMLParserAPI.jar)?  
> 
> Maybe you are having a class loading issue because you are mixing your
> versions.
> 
> Just a thought.
> 
> - Andrew
> 
> 
> 
> -----Original Message-----
> From: stephen chan [mailto:stephenc@netnation.com] 
> Sent: Wednesday, July 10, 2002 9:05 PM
> To: 'Tomcat Users List'
> Subject: Class loader problem with Xalan under 4.0.2 and 4.0.3
> 
> 
> Class loader problem with Xalan under 4.0.2 and 4.0.3
> 
> 
> Hi, I have:
> 
>   jakarta-tomcat-4.0.2 / jakarta-tomcat-4.0.3
>   Xerces-J-bin.2.0.2
>   xalan-j_2_4_D1-bin.tar.gz
>   jdom
>   sun jdk jdk1.3.1
> 
> on a linux box.
> 
> According to Tomcat documentation, class loading is
> done in the following order:
> 
>   /WEB-INF/classes of your web application
>   /WEB-INF/lib/*.jar of your web application
>   Bootstrap classes of your JVM
>   System class loader classses
>   $CATALINA_HOME/common/classes
>   $CATALINA_HOME/common/lib/*.jar
>   $CATALINA_HOME/classes
>   $CATALINA_HOME/lib/*.jar
> 
> In my /WEB-INF/lib/ directory, I have all the
> xerces, xalan and jdom jar files:
> 
>   BCEL.jar
>   JLex.jar
>   bsf.jar
>   java_cup.jar
>   jdom.jar
>   regexp.jar
>   runtime.jar
>   xalan.jar
>   xalansamples.jar
>   xalanservlet.jar
>   xercesImpl.jar
>   xercesSamples.jar
>   xml-apis.jar
>   xmlParserAPIs.jar
>   xsltc.jar
> 
> When I run my servlet from /WEB-INF/classes,
> I get this:
> 
>   root cause
> 
>     java.lang.NoClassDefFoundError:
> javax/xml/transform/TransformerException
> 
> This means Tomcat can't find the xalan lib.
> *** Tomcat can find xerces and jdom libs ***
> 
> At this point, I decided to do some testing on other versions of Tomcat
> and here are the results.
> 
> 
>   Tomcat        xalan lib in /WEB-INF/lib/
>   ------        --------------------------
>   3.3.1         OK
>   4.0.2         NOT OK
>   4.0.3         NOT OK
>   4.0.4         OK
> 
> 
> The only way to make 4.0.2 and 4.0.3 aware of xalan libs is to have the
> xalan jar files in "Bootstrap classes of my JVM" which is in
> /usr/local/jdk1.3.1_02/jre/lib/ext. But having the libs in this
> directory can effect other applications within the same container. How
> do I make my Tomcat 4.0.2 and 4.0.3 use the xalan lib in my
> /WEB-INF/lib/ directory? Is this a Tomcat config problem or a Xalan
> config problem?
> 
> Thanks
> Stephen
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Class loader problem with Xalan under 4.0.2 and 4.0.3

Posted by Andrew Conrad <an...@msn.com>.
This isn't answering your question as you posed it, but aren't
xml-api.jar and XMLParserAPI.jar from different versions of Xerces?
Xalan 2.4.D1 comes with Xerces 2.0.1 (xercesImpl.jar and xml-api.jar).
To use Xerces 2.0.2, aren't you suppose to delete those files and
replace them with those from the Xerces distribution (xercesImpl.jar and
XMLParserAPI.jar)?  

Maybe you are having a class loading issue because you are mixing your
versions.

Just a thought.

- Andrew



-----Original Message-----
From: stephen chan [mailto:stephenc@netnation.com] 
Sent: Wednesday, July 10, 2002 9:05 PM
To: 'Tomcat Users List'
Subject: Class loader problem with Xalan under 4.0.2 and 4.0.3


Class loader problem with Xalan under 4.0.2 and 4.0.3


Hi, I have:

  jakarta-tomcat-4.0.2 / jakarta-tomcat-4.0.3
  Xerces-J-bin.2.0.2
  xalan-j_2_4_D1-bin.tar.gz
  jdom
  sun jdk jdk1.3.1

on a linux box.

According to Tomcat documentation, class loading is
done in the following order:

  /WEB-INF/classes of your web application
  /WEB-INF/lib/*.jar of your web application
  Bootstrap classes of your JVM
  System class loader classses
  $CATALINA_HOME/common/classes
  $CATALINA_HOME/common/lib/*.jar
  $CATALINA_HOME/classes
  $CATALINA_HOME/lib/*.jar

In my /WEB-INF/lib/ directory, I have all the
xerces, xalan and jdom jar files:

  BCEL.jar
  JLex.jar
  bsf.jar
  java_cup.jar
  jdom.jar
  regexp.jar
  runtime.jar
  xalan.jar
  xalansamples.jar
  xalanservlet.jar
  xercesImpl.jar
  xercesSamples.jar
  xml-apis.jar
  xmlParserAPIs.jar
  xsltc.jar

When I run my servlet from /WEB-INF/classes,
I get this:

  root cause

    java.lang.NoClassDefFoundError:
javax/xml/transform/TransformerException

This means Tomcat can't find the xalan lib.
*** Tomcat can find xerces and jdom libs ***

At this point, I decided to do some testing on other versions of Tomcat
and here are the results.


  Tomcat        xalan lib in /WEB-INF/lib/
  ------        --------------------------
  3.3.1         OK
  4.0.2         NOT OK
  4.0.3         NOT OK
  4.0.4         OK


The only way to make 4.0.2 and 4.0.3 aware of xalan libs is to have the
xalan jar files in "Bootstrap classes of my JVM" which is in
/usr/local/jdk1.3.1_02/jre/lib/ext. But having the libs in this
directory can effect other applications within the same container. How
do I make my Tomcat 4.0.2 and 4.0.3 use the xalan lib in my
/WEB-INF/lib/ directory? Is this a Tomcat config problem or a Xalan
config problem?

Thanks
Stephen




--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Class loader problem with Xalan under 4.0.2 and 4.0.3

Posted by stephen chan <st...@netnation.com>.
Class loader problem with Xalan under 4.0.2 and 4.0.3


Hi, I have:

  jakarta-tomcat-4.0.2 / jakarta-tomcat-4.0.3
  Xerces-J-bin.2.0.2 
  xalan-j_2_4_D1-bin.tar.gz
  jdom
  sun jdk jdk1.3.1

on a linux box.

According to Tomcat documentation, class loading is
done in the following order:

  /WEB-INF/classes of your web application 
  /WEB-INF/lib/*.jar of your web application 
  Bootstrap classes of your JVM 
  System class loader classses
  $CATALINA_HOME/common/classes 
  $CATALINA_HOME/common/lib/*.jar 
  $CATALINA_HOME/classes 
  $CATALINA_HOME/lib/*.jar 

In my /WEB-INF/lib/ directory, I have all the
xerces, xalan and jdom jar files:

  BCEL.jar
  JLex.jar
  bsf.jar
  java_cup.jar
  jdom.jar
  regexp.jar
  runtime.jar
  xalan.jar
  xalansamples.jar
  xalanservlet.jar
  xercesImpl.jar
  xercesSamples.jar
  xml-apis.jar
  xmlParserAPIs.jar
  xsltc.jar

When I run my servlet from /WEB-INF/classes,
I get this:

  root cause 

    java.lang.NoClassDefFoundError:
javax/xml/transform/TransformerException

This means Tomcat can't find the xalan lib.
*** Tomcat can find xerces and jdom libs ***

At this point, I decided to do some testing on other versions
of Tomcat and here are the results.


  Tomcat        xalan lib in /WEB-INF/lib/
  ------        --------------------------
  3.3.1         OK
  4.0.2         NOT OK
  4.0.3         NOT OK
  4.0.4         OK


The only way to make 4.0.2 and 4.0.3 aware of xalan libs is to
have the xalan jar files in "Bootstrap classes of my JVM" which
is in /usr/local/jdk1.3.1_02/jre/lib/ext. But having the libs
in this directory can effect other applications within the same
container. How do I make my Tomcat 4.0.2 and 4.0.3 use the xalan
lib in my /WEB-INF/lib/ directory? Is this a Tomcat config problem
or a Xalan config problem?

Thanks
Stephen




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


apache/jserv connect to Tomcat 4.0.3 - mod-jk using ajp12 protocol

Posted by stephen chan <st...@netnation.com>.
Hello:

I have Apache -> mod-jk -> Tomcat 4.0.3 up and running on box "B"
I also have another older box "A" with Apache/JServ.
I need to redirect a directory on "A" to point to "B".


On "A", Apache/JServ, I have:

	ApJServMount /my_dir ajpv12://box_b.my_company.com:8007/my_app

On "B", Tomcat/mod-jk, I have:

	Workers.properties:
		- worker.list=ajp12,ajp13
		- worker.ajp12.port=8007
		- worker.ajp12.type=ajp12
		- worker.ajp12.lbfactor=1

	server.xml:
		- <Connector
className="org.apache.ajp.tomcat4.Ajp13Connector"
               port="8007" minProcessors="5" maxProcessors="75"
               acceptCount="10" debug="0"/>


http://box_b.my_company.com/my_app  works perfectly as I am accessing
"B" directly

However, http://box_a.my_company.com/my_app does not.


I looked at "catalina.out", the last 3 lines reads:

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................
00 00 00 00 00 00 00 00 00 00 00                 | ...........

[Ajp13] incomplete read, waited #-1 got only 0

Seems box "A" is speaking ajp12? And box "B" can't understand it.

Help

Thanks
Steve










--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: TOMCAT 4.0 + apache 2.0.39

Posted by Andrew Conrad <an...@msn.com>.
You need to get a mod_jk.dll and so you can load it. 

You COULD build your own (from your connectors source) but why?

Just D/L the binary from here:  http://www.acg-gmbh.de/mod_jk/

BTW, if you would have read your helpfile (www.galatea.com) it gives you
this link.


-Andrew


-----Original Message-----
From: Joey Kovacs [mailto:joeartzinager@hotmail.com] 
Sent: Tuesday, July 02, 2002 3:44 PM
To: tomcat-user@jakarta.apache.org
Subject: TOMCAT 4.0 + apache 2.0.39


I am using  Apache 2.0.39  + tomcat 4 +  Java 2 SDK 1.3.1_03

I also installed  ANT  in  c:/ant

I also installed
Download the tomcat connectors source from 
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.3/src/j
akarta-tomcat-connectors-4.0.2-01-src.zip.

all from this site

http://www.galatea.com/flashguides/apache-tomcat-24-win32.xml

Now I need a copy of someones  httpd.conf file.

Everytime I add a LoadModule comment into  my apache httpd.conf file I
restart Apache and I get an error and cannot start.  WONT START

How do I do a proper load module?

this is what I tried.. both dont work

Include c:/tomcat4/conf/auto/mod_jk.conf  --- didnt work

<IfModule !mod_jk.c>
  LoadModule jk_module modules/mod_jk.dll         -----------didnt work
</IfModule>

LoadModule jk_module "C:/tomcat4/bin/modules/mod_jk.dll"

--------I dont even  have a C:/tomcat4/bin/modules/mod_jk.dll path????
pls help


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>