You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jacob Kjome <ho...@visi.com> on 2002/07/29 21:31:32 UTC

Re[2]: REPOST: Document.importNode not working-works fine in modified JSDK2.1

Hello Greg,

The advice below to store your application accessible classes in
$TOMCAT_HOME/server/lib/ is bad information.  That will only be seen
by Tomcat itself.  If you want both Tomcat and apps to see your
library, you need to store that in $TOMCAT_HOME/common/lib or in
$TOMCAT_HOME/lib (analogous to $TOMCAT_HOME/shared/lib in Tomcat 4.1.x) for just your apps and not Tomcat to see it.

What JDK are you using?  XML/DOM libraries did not come with JDK1.3.x,
but do come with j2sdk1.4.x.

If you are using anything less than JDK1.4.x, you need to make sure to
put something like Xerces in a directory accessible to Tomcat's
classloaders.  With Tomcat-3.3.x, you need to put it in either
$TOMCAT_HOME/lib/apps or $TOMCAT_HOME/lib/common.

Get out of the habit of putting any XML/DOM libraries in your own
app's WEB-INF/lib directory.  It is forbidden by the Sun classloading
spec to do this (see their spec for details) and Tomcat-4.0.2+
enforces this.

Jake

Monday, July 29, 2002, 8:26:16 AM, you wrote:

GW> Document.importNode not working-works fine in modified JSDK2.1Yes indeed, the <PROJECT>/WEB-INF/lib is where you place app specific JARs.

GW> But your problem is dealing with XML and JSDK 2.1... the JSDK does not contain the "org.w3c" package. You probably know this already, but here's the javadoc link for the JSDK 2.2... the 2.1 is
GW> offline now, since 2.3 is the standard.
GW> http://java.sun.com/products/servlet/2.2/javadoc/index.html

GW> The 1.3.x J2EE complete JAR does... but the older versions did not.

GW> So, the questions therefore, are....
GW> 1. What is your "compile-time" classpath... Where is the compiler finding org.w3c.dom / org.xml.sax ?
GW> 2. What is your "run-time classpath".
GW> 3. If # 1 and # 2 are different, do you also have servlet spec differences? ( 2.1 vs. 2.2 or 2.3 )

GW> I think the long and short of it will be that you need to add the "org.w3c.dom" and "org.xml.sax" packages to the $TOMCAT_HOME/server/lib/ or to your $PROJECT/WEB-INF/lib/




GW> [Greg Waehner]  -----Original Message-----
GW> From: Chua Eng Huang, Cecil [mailto:AEHChua@ntu.edu.sg]
GW> Sent: Monday, July 29, 2002 9:02 AM
GW> To: Tomcat Users List
GW> Subject: RE: REPOST: Document.importNode not working-works fine in modified JSDK2.1


GW>   This is probably it.  However, I have dumped every jar file into webapps\examples\WEB-INF\lib,
GW>   which according to my understanding of the various docs is where you're supposed to put all your own JAR files.

GW>   >Also, what are these "special" JARs? Tomcat is a J2EE servlet container, but it does not contain all the components of >the "easy download" J2SDK EE. So, look in the JAR files and see if the
GW> "org.w2c.dom" package is there... it may not be (I >forget). If that's the case, then you are compiling with a classpath that does not match the runtime classpath. This is >common with Tomcat,
GW> unless you want to point your compile classpath to $TOMCAT_HOME/server/lib/ for the JARs. >A lot of people use the J2EE.jar for simplicity, but then must remember to compare the run-time packages
GW> when a problem >occurs.
GW>   The code does compile fine (otherwise I wouldn't be getting a crash by Tomcat itself.  I'd get it from the compiler).

GW>   Cecil Chua

 



-- 
Best regards,
 Jacob                            mailto:hoju@visi.com


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


RE: Cannot do ./configure with the webapp on Linux machine

Posted by Gunter D'Hondt <gu...@sofico.be>.
I've tried it with the EAPI parameter but this is the result:


torvald1:/tmp/webapp-module-1.0-tc40 #
./configure --with-apxs --enable-DEAPI
: command not found
: command not found
: command not found
checking for test... /usr/bin/test
: command not found
: command not found
'/configure: line 2773: syntax error near unexpected token `in
'/configure: line 2773: `      case "${enableval}" in
torvald1:/tmp/webapp-module-1.0-tc40 #

So the problem still occurs... can anybody help me?

Gunter



-----Original Message-----
From: franzR [mailto:reitinger.franz@utanet.at]
Sent: dinsdag 30 juli 2002 15:44
To: Tomcat Users List; gudo@sofico.be
Subject: AW: Cannot do ./configure with the webapp on Linux machine


You've to enable the EAPI for an Apache-1.3 by parameterizing this property
before you start the configuration;
Example:
./configure --with-apxs=... --enable-EAPI

More things can be found in the documentation (native/BUILDING)!

franzR

-----Ursprüngliche Nachricht-----
Von: Gunter D'Hondt [mailto:gudo@sofico.be]
Gesendet: Dienstag, 30. Juli 2002 14:40
An: 'Tomcat Users List'
Betreff: Cannot do ./configure with the webapp on Linux machine


Hi,

I using Suse Linux 8.0 and already installed Apache 1.3 and Tomcat 4.0
successfully. Now I'm trying to get mod_webapp configured. This gives me the
error:
2002-07-30 12:37:05 [org.apache.catalina.connector.warp.WarpConnection]
Exception on socket
java.io.IOException: Premature packet header end
 at
org.apache.catalina.connector.warp.WarpConnection.recv(WarpConnection.java:2
37)
 at
org.apache.catalina.connector.warp.WarpRequestHandler.handle(WarpRequestHand
ler.java:112)
 at
org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:19
4)
 at java.lang.Thread.run(Thread.java:484)

Since I haven't compiled the mod_webapp.so myself I thought let's do that
becoz I'm getting the following error when running apachectl configtest:
torvald1:/tmp/webapp-module-1.0-tc40 # apachectl configtest
[Tue Jul 30 14:41:06 2002] [warn] Loaded DSO /usr/lib/apache/mod_webapp.so
uses plain Apache 1.3 API, this module might crash u
nder EAPI! (please recompile it with -DEAPI)
Syntax OK
torvald1:/tmp/webapp-module-1.0-tc40 #

But I'm getting problems when doing "./configure" with the sources:
torvald1:/tmp/webapp-module-1.0-tc40 #
torvald1:/tmp/webapp-module-1.0-tc40 # ls -la
total 296
drwxr-xr-x   11 nobody   nobody        664 Jul 30 14:24 .
drwxrwxrwt   12 root     root         1256 Jul 30 14:30 ..
-rwxr--r--    1 nobody   nobody      10244 Jul 19  2001 .DS_Store
-rwxr--r--    1 nobody   nobody        103 Aug 31  2001 .cvsignore
-rwxr--r--    1 nobody   nobody       5527 Sep 17  2001 INSTALL.txt
-rwxr--r--    1 nobody   nobody       4494 Sep 17  2001 LICENSE.txt
-rwxr--r--    1 nobody   nobody       7994 Sep 17  2001 Makedefs.in
-rwxr--r--    1 nobody   nobody       6349 Sep 17  2001 Makefile.in
-rwxr--r--    1 nobody   nobody       6300 Sep 17  2001 Makefile.win
-rwxr--r--    1 nobody   nobody       4494 Sep 17  2001 README.txt
drwxr-xr-x    2 nobody   nobody        176 Jul 30 13:41 apache-1.3
drwxr-xr-x    2 nobody   nobody        144 Jul 30 13:41 apache-2.0
drwxr-xr-x   22 nobody   nobody       1032 Jul 30 14:25 apr
-rw-r--r--    1 root     root         1553 Jul 30 14:24 config.log
-rwxr-xr-x    1 nobody   nobody     125598 Jul 30 14:29 configure
-rwxr--r--    1 nobody   nobody      19982 Sep 17  2001 configure.in
-rwxr--r--    1 nobody   nobody      80284 Jul 30 14:22 configure.old
drwxr-xr-x    2 nobody   nobody        232 Jul 30 13:41 docs
drwxr-xr-x    2 nobody   nobody        200 Jul 30 13:41 include
drwxr-xr-x    2 nobody   nobody        544 Jul 30 13:41 java
drwxr-xr-x    2 nobody   nobody        440 Jul 30 13:41 lib
drwxr-xr-x    2 nobody   nobody         72 Jul 30 13:41 nsapi
drwxr-xr-x    2 nobody   nobody        488 Jul 30 13:41 support
torvald1:/tmp/webapp-module-1.0-tc40 # autoconf
/usr/bin/m4: configure.in: 142: Non-numeric argument to built-in `divert'
/usr/bin/m4: configure.in: 372: Non-numeric argument to built-in `divert'
torvald1:/tmp/webapp-module-1.0-tc40 # ./configure --with-apxs
: command not found
: command not found
: command not found
checking for test... /usr/bin/test
: command not found
: command not found
'/configure: line 2773: syntax error near unexpected token `in
'/configure: line 2773: `      case "${enableval}" in
torvald1:/tmp/webapp-module-1.0-tc40 # #


Does anybody know what the problem can be overhere?

Greetings,
Gunter D'Hondt
SOFICO NV
BELGIUM





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


AW: Cannot do ./configure with the webapp on Linux machine

Posted by franzR <re...@utanet.at>.
You've to enable the EAPI for an Apache-1.3 by parameterizing this property
before you start the configuration;
Example:
./configure --with-apxs=... --enable-EAPI

More things can be found in the documentation (native/BUILDING)!

franzR

-----Ursprüngliche Nachricht-----
Von: Gunter D'Hondt [mailto:gudo@sofico.be]
Gesendet: Dienstag, 30. Juli 2002 14:40
An: 'Tomcat Users List'
Betreff: Cannot do ./configure with the webapp on Linux machine


Hi,

I using Suse Linux 8.0 and already installed Apache 1.3 and Tomcat 4.0
successfully. Now I'm trying to get mod_webapp configured. This gives me the
error:
2002-07-30 12:37:05 [org.apache.catalina.connector.warp.WarpConnection]
Exception on socket
java.io.IOException: Premature packet header end
 at
org.apache.catalina.connector.warp.WarpConnection.recv(WarpConnection.java:2
37)
 at
org.apache.catalina.connector.warp.WarpRequestHandler.handle(WarpRequestHand
ler.java:112)
 at
org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:19
4)
 at java.lang.Thread.run(Thread.java:484)

Since I haven't compiled the mod_webapp.so myself I thought let's do that
becoz I'm getting the following error when running apachectl configtest:
torvald1:/tmp/webapp-module-1.0-tc40 # apachectl configtest
[Tue Jul 30 14:41:06 2002] [warn] Loaded DSO /usr/lib/apache/mod_webapp.so
uses plain Apache 1.3 API, this module might crash u
nder EAPI! (please recompile it with -DEAPI)
Syntax OK
torvald1:/tmp/webapp-module-1.0-tc40 #

But I'm getting problems when doing "./configure" with the sources:
torvald1:/tmp/webapp-module-1.0-tc40 #
torvald1:/tmp/webapp-module-1.0-tc40 # ls -la
total 296
drwxr-xr-x   11 nobody   nobody        664 Jul 30 14:24 .
drwxrwxrwt   12 root     root         1256 Jul 30 14:30 ..
-rwxr--r--    1 nobody   nobody      10244 Jul 19  2001 .DS_Store
-rwxr--r--    1 nobody   nobody        103 Aug 31  2001 .cvsignore
-rwxr--r--    1 nobody   nobody       5527 Sep 17  2001 INSTALL.txt
-rwxr--r--    1 nobody   nobody       4494 Sep 17  2001 LICENSE.txt
-rwxr--r--    1 nobody   nobody       7994 Sep 17  2001 Makedefs.in
-rwxr--r--    1 nobody   nobody       6349 Sep 17  2001 Makefile.in
-rwxr--r--    1 nobody   nobody       6300 Sep 17  2001 Makefile.win
-rwxr--r--    1 nobody   nobody       4494 Sep 17  2001 README.txt
drwxr-xr-x    2 nobody   nobody        176 Jul 30 13:41 apache-1.3
drwxr-xr-x    2 nobody   nobody        144 Jul 30 13:41 apache-2.0
drwxr-xr-x   22 nobody   nobody       1032 Jul 30 14:25 apr
-rw-r--r--    1 root     root         1553 Jul 30 14:24 config.log
-rwxr-xr-x    1 nobody   nobody     125598 Jul 30 14:29 configure
-rwxr--r--    1 nobody   nobody      19982 Sep 17  2001 configure.in
-rwxr--r--    1 nobody   nobody      80284 Jul 30 14:22 configure.old
drwxr-xr-x    2 nobody   nobody        232 Jul 30 13:41 docs
drwxr-xr-x    2 nobody   nobody        200 Jul 30 13:41 include
drwxr-xr-x    2 nobody   nobody        544 Jul 30 13:41 java
drwxr-xr-x    2 nobody   nobody        440 Jul 30 13:41 lib
drwxr-xr-x    2 nobody   nobody         72 Jul 30 13:41 nsapi
drwxr-xr-x    2 nobody   nobody        488 Jul 30 13:41 support
torvald1:/tmp/webapp-module-1.0-tc40 # autoconf
/usr/bin/m4: configure.in: 142: Non-numeric argument to built-in `divert'
/usr/bin/m4: configure.in: 372: Non-numeric argument to built-in `divert'
torvald1:/tmp/webapp-module-1.0-tc40 # ./configure --with-apxs
: command not found
: command not found
: command not found
checking for test... /usr/bin/test
: command not found
: command not found
'/configure: line 2773: syntax error near unexpected token `in
'/configure: line 2773: `      case "${enableval}" in
torvald1:/tmp/webapp-module-1.0-tc40 # #


Does anybody know what the problem can be overhere?

Greetings,
Gunter D'Hondt
SOFICO NV
BELGIUM




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


Cannot do ./configure with the webapp on Linux machine

Posted by Gunter D'Hondt <gu...@sofico.be>.
Hi,

I using Suse Linux 8.0 and already installed Apache 1.3 and Tomcat 4.0
successfully. Now I'm trying to get mod_webapp configured. This gives me the
error:
2002-07-30 12:37:05 [org.apache.catalina.connector.warp.WarpConnection]
Exception on socket
java.io.IOException: Premature packet header end
 at
org.apache.catalina.connector.warp.WarpConnection.recv(WarpConnection.java:2
37)
 at
org.apache.catalina.connector.warp.WarpRequestHandler.handle(WarpRequestHand
ler.java:112)
 at
org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:19
4)
 at java.lang.Thread.run(Thread.java:484)

Since I haven't compiled the mod_webapp.so myself I thought let's do that
becoz I'm getting the following error when running apachectl configtest:
torvald1:/tmp/webapp-module-1.0-tc40 # apachectl configtest
[Tue Jul 30 14:41:06 2002] [warn] Loaded DSO /usr/lib/apache/mod_webapp.so
uses plain Apache 1.3 API, this module might crash u
nder EAPI! (please recompile it with -DEAPI)
Syntax OK
torvald1:/tmp/webapp-module-1.0-tc40 #

But I'm getting problems when doing "./configure" with the sources:
torvald1:/tmp/webapp-module-1.0-tc40 #
torvald1:/tmp/webapp-module-1.0-tc40 # ls -la
total 296
drwxr-xr-x   11 nobody   nobody        664 Jul 30 14:24 .
drwxrwxrwt   12 root     root         1256 Jul 30 14:30 ..
-rwxr--r--    1 nobody   nobody      10244 Jul 19  2001 .DS_Store
-rwxr--r--    1 nobody   nobody        103 Aug 31  2001 .cvsignore
-rwxr--r--    1 nobody   nobody       5527 Sep 17  2001 INSTALL.txt
-rwxr--r--    1 nobody   nobody       4494 Sep 17  2001 LICENSE.txt
-rwxr--r--    1 nobody   nobody       7994 Sep 17  2001 Makedefs.in
-rwxr--r--    1 nobody   nobody       6349 Sep 17  2001 Makefile.in
-rwxr--r--    1 nobody   nobody       6300 Sep 17  2001 Makefile.win
-rwxr--r--    1 nobody   nobody       4494 Sep 17  2001 README.txt
drwxr-xr-x    2 nobody   nobody        176 Jul 30 13:41 apache-1.3
drwxr-xr-x    2 nobody   nobody        144 Jul 30 13:41 apache-2.0
drwxr-xr-x   22 nobody   nobody       1032 Jul 30 14:25 apr
-rw-r--r--    1 root     root         1553 Jul 30 14:24 config.log
-rwxr-xr-x    1 nobody   nobody     125598 Jul 30 14:29 configure
-rwxr--r--    1 nobody   nobody      19982 Sep 17  2001 configure.in
-rwxr--r--    1 nobody   nobody      80284 Jul 30 14:22 configure.old
drwxr-xr-x    2 nobody   nobody        232 Jul 30 13:41 docs
drwxr-xr-x    2 nobody   nobody        200 Jul 30 13:41 include
drwxr-xr-x    2 nobody   nobody        544 Jul 30 13:41 java
drwxr-xr-x    2 nobody   nobody        440 Jul 30 13:41 lib
drwxr-xr-x    2 nobody   nobody         72 Jul 30 13:41 nsapi
drwxr-xr-x    2 nobody   nobody        488 Jul 30 13:41 support
torvald1:/tmp/webapp-module-1.0-tc40 # autoconf
/usr/bin/m4: configure.in: 142: Non-numeric argument to built-in `divert'
/usr/bin/m4: configure.in: 372: Non-numeric argument to built-in `divert'
torvald1:/tmp/webapp-module-1.0-tc40 # ./configure --with-apxs
: command not found
: command not found
: command not found
checking for test... /usr/bin/test
: command not found
: command not found
'/configure: line 2773: syntax error near unexpected token `in
'/configure: line 2773: `      case "${enableval}" in
torvald1:/tmp/webapp-module-1.0-tc40 # #


Does anybody know what the problem can be overhere?

Greetings,
Gunter D'Hondt
SOFICO NV
BELGIUM



RE: Re[2]: REPOST: Document.importNode not working-works fine in modified JSDK2.1

Posted by Greg Waehner <gr...@estudentloan.com>.
Jake is right about "server/lib". Sorry - mental lapse on my part.... I
meant common/lib. Thanks for catching that.

The XML/DOM packages comes with J2SDK 1.3.1 EE
(http://java.sun.com/j2ee/sdk_1.3/techdocs/api/index.html) but is now
bundled with the J2SDK 1.4.x SE. I was implicitly assuming EE since Cecil
mentioned the JSDK (servlet) 2.1, which is part of the complete EE distro.
My assumption is that JSDK SE 1.4.x is not in the picture since TC would
have found the XML/DOM packages during runtime. Clearly, using 1.4.x would
be a good (and recommended) solution.

So ultimately, yes, Xerxes is the issue at hand, and Cecil needs to resolve
classpath issues.

Greg

-----Original Message-----
From: Jacob Kjome [mailto:hoju@visi.com]
Sent: Monday, July 29, 2002 3:32 PM
To: Tomcat Users List
Subject: Re[2]: REPOST: Document.importNode not working-works fine in
modified JSDK2.1


Hello Greg,

The advice below to store your application accessible classes in
$TOMCAT_HOME/server/lib/ is bad information.  That will only be seen
by Tomcat itself.  If you want both Tomcat and apps to see your
library, you need to store that in $TOMCAT_HOME/common/lib or in
$TOMCAT_HOME/lib (analogous to $TOMCAT_HOME/shared/lib in Tomcat 4.1.x) for
just your apps and not Tomcat to see it.

What JDK are you using?  XML/DOM libraries did not come with JDK1.3.x,
but do come with j2sdk1.4.x.

If you are using anything less than JDK1.4.x, you need to make sure to
put something like Xerces in a directory accessible to Tomcat's
classloaders.  With Tomcat-3.3.x, you need to put it in either
$TOMCAT_HOME/lib/apps or $TOMCAT_HOME/lib/common.

Get out of the habit of putting any XML/DOM libraries in your own
app's WEB-INF/lib directory.  It is forbidden by the Sun classloading
spec to do this (see their spec for details) and Tomcat-4.0.2+
enforces this.

Jake

Monday, July 29, 2002, 8:26:16 AM, you wrote:

GW> Document.importNode not working-works fine in modified JSDK2.1Yes
indeed, the <PROJECT>/WEB-INF/lib is where you place app specific JARs.

GW> But your problem is dealing with XML and JSDK 2.1... the JSDK does not
contain the "org.w3c" package. You probably know this already, but here's
the javadoc link for the JSDK 2.2... the 2.1 is
GW> offline now, since 2.3 is the standard.
GW> http://java.sun.com/products/servlet/2.2/javadoc/index.html

GW> The 1.3.x J2EE complete JAR does... but the older versions did not.

GW> So, the questions therefore, are....
GW> 1. What is your "compile-time" classpath... Where is the compiler
finding org.w3c.dom / org.xml.sax ?
GW> 2. What is your "run-time classpath".
GW> 3. If # 1 and # 2 are different, do you also have servlet spec
differences? ( 2.1 vs. 2.2 or 2.3 )

GW> I think the long and short of it will be that you need to add the
"org.w3c.dom" and "org.xml.sax" packages to the $TOMCAT_HOME/server/lib/ or
to your $PROJECT/WEB-INF/lib/




GW> [Greg Waehner]  -----Original Message-----
GW> From: Chua Eng Huang, Cecil [mailto:AEHChua@ntu.edu.sg]
GW> Sent: Monday, July 29, 2002 9:02 AM
GW> To: Tomcat Users List
GW> Subject: RE: REPOST: Document.importNode not working-works fine in
modified JSDK2.1


GW>   This is probably it.  However, I have dumped every jar file into
webapps\examples\WEB-INF\lib,
GW>   which according to my understanding of the various docs is where
you're supposed to put all your own JAR files.

GW>   >Also, what are these "special" JARs? Tomcat is a J2EE servlet
container, but it does not contain all the components of >the "easy
download" J2SDK EE. So, look in the JAR files and see if the
GW> "org.w2c.dom" package is there... it may not be (I >forget). If that's
the case, then you are compiling with a classpath that does not match the
runtime classpath. This is >common with Tomcat,
GW> unless you want to point your compile classpath to
$TOMCAT_HOME/server/lib/ for the JARs. >A lot of people use the J2EE.jar for
simplicity, but then must remember to compare the run-time packages
GW> when a problem >occurs.
GW>   The code does compile fine (otherwise I wouldn't be getting a crash by
Tomcat itself.  I'd get it from the compiler).

GW>   Cecil Chua





--
Best regards,
 Jacob                            mailto:hoju@visi.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>