You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Stephen Weiss <Sw...@aamc.org> on 2000/05/25 00:42:23 UTC

RE: JSP engine fails when trying to compile java / Apache / Tomcat / Unix

Are you using the correct mod_jserv?  You should be using the one from the Jakarta site, not the one from JServ itself.

Stephen A. Weiss       Association of American Medical Colleges
(202)828-0428       mailto:sweiss@aamc.org   http://www.aamc.org

>>> nmarriage@ingenta.com 05/24/00 08:52AM >>>
Thanks, Steve, for your advice. Most kind.

I did what you suggested and it falls over in a different way now!
Now when I try to go to one of the example jsp pages in my browser, I get:

1. Blank screen on the browser and it hangs, apparently, for ever.

2. The following message on the Unix terminal from which I started tomcat:

HANDLER THREAD PROBLEM: java.io.IOException: Stream broken
java.io.IOException: Stream broken
        at java.lang.Throwable.<init>(Compiled Code)
        at java.lang.Exception.<init>(Compiled Code)
        at java.io.IOException.<init>(Compiled Code)
        at org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Compiled Code)
        at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Compiled Code)
        at org.apache.tomcat.service.TcpConnectionThread.run(Compiled Code)
        at java.lang.Thread.run(Compiled Code)

3. The following in jasper.log:

<JASPER_LOG> Wed May 24 12:24:59 GMT+01:00 2000 Parent class loader is: org.apache.tomcat.loader.AdaptiveServletLoader@1da653e7</JASPER_LOG> 
<JASPER_LOG> Wed May 24 12:24:59 GMT+01:00 2000 Scratch dir for the JSP engine is: /opt/local/jakarta-tomcat/work/localhost_8080%2fexamples</JASPER_LOG> 
<JASPER_LOG> Wed May 24 12:24:59 GMT+01:00 2000 IMPORTANT: Do not modify the generated servlets</JASPER_LOG> 
<JASPER_LOG> Wed May 24 12:25:00 GMT+01:00 2000 Parent class loader is: org.apache.tomcat.loader.AdaptiveServletLoader@1da646c6</JASPER_LOG> 
<JASPER_LOG> Wed May 24 12:25:01 GMT+01:00 2000 Parent class loader is: org.apache.tomcat.loader.AdaptiveServletLoader@1da63dd0</JASPER_LOG> 
<JASPER_LOG> Wed May 24 12:25:02 GMT+01:00 2000 Parent class loader is: org.apache.tomcat.loader.AdaptiveServletLoader@1da651db</JASPER_LOG> 

4. The following in servlet.log

Context log path="/examples" :tomcat.errorPage: init
Context log path="/examples" :default: init
Context log path="/examples" :jsp: init
Context log path="/test" :tomcat.errorPage: init
Context log path="/test" :default: init
Context log path="/test" :jsp: init
Context log path="/admin" :tomcat.errorPage: init
Context log path="/admin" :default: init
Context log path="/admin" :jsp: init
Context log path="" :tomcat.errorPage: init
Context log path="" :default: init
Context log path="" :jsp: init

5. The following in tomcat.log

Starting endpoint port="8008" handler="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"


Note, I am not using the usual port (8007) for the AJP12 connection, deliberately.


Can Steve or anyone else out there help me please? This is still driving me round the bend!

Thanks again in advance,
Nick Marriage, ingenta.com, Bath, UK

>-----Original Message-----
>From: steve@bath.ac.uk [mailto:steve@bath.ac.uk]On Behalf Of Steve Weiss
>Sent: Tuesday, May 23, 2000 18:04
>To: tomcat-user@jakarta.apache.org 
>Subject: Re: JSP engine fails when trying to compile java / Apache /
>Tomcat / Unix
>
>
>Nick Marriage wrote:
>> 
>
>> I have installed tomcat and apache, as per the Minimalistic User 
>Guide for Tomcat. I've started 
>> Another odd thing, which might have something to do with it, is 
>that in the jasper.log
>> files which tomcat creates, it says (amongst other things):
>> 
>> <JASPER_LOG> Tue May 23 13:13:28 GMT+01:00 2000 Classpath 
>according to the Servlet Engine is: 
>/opt/local/jakarta-tomcat/webapps/examples/WEB-INF/classes</JASPER_LOG>
>> 
>> What happened to the rest of my classpath, which, when I started 
>Tomcat via tomcat.sh is announced to be:
>>  
>.:./../lib/ant.jar:./../lib/jasper.jar:./../lib/servlet.jar:./../li
>b/test:./../lib/webserver.jar:./../lib/xml.jar:/usr/java1.2/jre/lib
>:/usr/java1.2/bin:/tools/external/xml/xml4j_2_0_11/xml4j/xml4j.jar:
>/tools/external/jserv_1.0/JSDK2.0/lib/jsdk.jar
>> 
>> Has anyone out there got any tips as to what I've done wrong? 
>This has been driving me round the bend for days now!
>> 
>
>It looks like you need to add <path-to-jdk>/lib/tools.jar to your
>classpath before you start Tomcat. (or classes.zip if you're using
>jdk1.1). That would also account for your missing Hashtable problem ;)
>
>-- 
>Steve Weiss      Association of American Medical Colleges
>(202)828-0428    mailto:sweiss@aamc.org    http://www.aamc.org 
>
>--------------------------------------------------------------------------
>To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org 
>For additional commmands, email: tomcat-user-help@jakarta.apache.org 
>
>


--------------------------------------------------------------------------
To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org 
For additional commmands, email: tomcat-user-help@jakarta.apache.org 


Re: Servlets vs JavaBeans

Posted by Alberto Rodríguez Ortega <a....@transtools.com>.
I'm novice but i'll try i understand (i hopt it's ok):

- Well, consider jsp as HTML-ASP and servelts as CGI (it's not so but it's 
same in utility).
- Java Beans is near of AxtiveX (have a concrete structure etc etc as 
ActiveX). The actuation is on the client.
- Enterprise Java Beans is (*think*) a group of beans which actue on the 
server and, bettwen all generate a group of cualities which can by used by all.
I'll try to explain this (remember i'm a novice and i only talk about i 
have read really quick), U have a Bean with a X structure and X parametres 
u can use. U have too a containers with all facilities all beans on the 
server u can use (one give u SSL faciltity, other give u X .. other Y .... 
) , then u can set on the bean-aplication that client execute on the server:

SSlprot: yes/no
X: yes/no
.
.
.
(Note: it is a server of aplications which all can use X properties of a 
container ans blah blah)

ufff, i think it's not so clear but i hope u understand what i'm talkgin 
about (sorry my terrible English ;) i do i can).

Later.

At 03.09 25/5/00 -0700, you wrote:
>Okay I'm trying to get my mind around the differents between writting
>Standalone Java Applications and Web Applications using JSP/Servlets. Could
>someone please explain the different between Java Beans and Servlets to me?
>
>Carl Parrish
>Webmaster
>ComputerPREP.com
>
>
>--------------------------------------------------------------------------
>To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commmands, email: tomcat-user-help@jakarta.apache.org


Servlets vs JavaBeans

Posted by Carl Parrish <cp...@computerprep.com>.
Okay I'm trying to get my mind around the differents between writting
Standalone Java Applications and Web Applications using JSP/Servlets. Could
someone please explain the different between Java Beans and Servlets to me?

Carl Parrish
Webmaster
ComputerPREP.com


RE: JSP engine fails when trying to compile java / Apache /Tomcat / Unix

Posted by Nick Marriage <nm...@ingenta.com>.

>-----Original Message-----
>From: fisherh@ucar.edu [mailto:fisherh@ucar.edu]
>Sent: Wednesday, May 24, 2000 23:19
>To: tomcat-user@jakarta.apache.org
>Subject: Re: JSP engine fails when trying to compile java / Apache
>/Tomcat / Unix
>
>
>
>	I encountered that error and those like it frequently when 
>I first installed
>tomcat.  There are 2 reasons that I got that error...
>
>1.  I didn't have TOMCAT_HOME and JAVA_HOME setup correctly

Hooray! Thanks, Hank! You've saved me a lot of grief. That ever-so-clever script tomcat.sh wasn't quite clever enough and it had managed to set my JAVA_HOME to "/usr", which wasn't a lot of use.

>2.  I didn't have the correct read/write permissions on all of my 
>files i.e. I
>created the jakarta-tomcat directory as userX and started the 
>shell script as
>"nobody"

My tomcat home directory seems to belong to 500, whoever that is, and I run tomcat.sh as root. The apache httpd runs as root and its subprocesses belong to "nobody". This seems to all work ok for me.

>
>	Hope this helps.
>

It certainly did!

>Hank
>
>
>
>> >>> nmarriage@ingenta.com 05/24/00 08:52AM >>>
>> Thanks, Steve, for your advice. Most kind.
>> 
>> I did what you suggested and it falls over in a different way now!
>> Now when I try to go to one of the example jsp pages in my 
>browser, I get:
>> 
>> 1. Blank screen on the browser and it hangs, apparently, for ever.
>> 
>> 2. The following message on the Unix terminal from which I 
>started tomcat:
>> 
>> HANDLER THREAD PROBLEM: java.io.IOException: Stream broken
>> java.io.IOException: Stream broken
>>         at java.lang.Throwable.<init>(Compiled Code)
>>         at java.lang.Exception.<init>(Compiled Code)
>>         at java.io.IOException.<init>(Compiled Code)
>>         at 
>org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextReq
>uest(Compiled Code)
>>         at 
>org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processC
>onnection(Compiled Code)
>>         at 
>org.apache.tomcat.service.TcpConnectionThread.run(Compiled Code)
>>         at java.lang.Thread.run(Compiled Code)
>> 
>> 3. The following in jasper.log:
>> 
>> <JASPER_LOG> Wed May 24 12:24:59 GMT+01:00 2000 Parent class 
>loader is: 
>org.apache.tomcat.loader.AdaptiveServletLoader@1da653e7</JASPER_LOG>
>> <JASPER_LOG> Wed May 24 12:24:59 GMT+01:00 2000 Scratch dir for 
>the JSP engine is: 
>/opt/local/jakarta-tomcat/work/localhost_8080%2fexamples</JASPER_LOG>
>> <JASPER_LOG> Wed May 24 12:24:59 GMT+01:00 2000 IMPORTANT: Do 
>not modify the generated servlets</JASPER_LOG>
>> <JASPER_LOG> Wed May 24 12:25:00 GMT+01:00 2000 Parent class 
>loader is: 
>org.apache.tomcat.loader.AdaptiveServletLoader@1da646c6</JASPER_LOG>
>> <JASPER_LOG> Wed May 24 12:25:01 GMT+01:00 2000 Parent class 
>loader is: 
>org.apache.tomcat.loader.AdaptiveServletLoader@1da63dd0</JASPER_LOG>
>> <JASPER_LOG> Wed May 24 12:25:02 GMT+01:00 2000 Parent class 
>loader is: 
>org.apache.tomcat.loader.AdaptiveServletLoader@1da651db</JASPER_LOG>
>> 
>
>-- 
>--------------------------------------------
>Hank Fisher   Software Engineer             
>Research Applications Program              
>National Center for Atmospheric Research 
>P.O. Box 3000, Boulder CO 80307-3000                      
>email: fisherh@ucar.edu    ph: 303-497-2817
>--------------------------------------------
>
>--------------------------------------------------------------------------
>To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commmands, email: tomcat-user-help@jakarta.apache.org
>
>


Re: JSP engine fails when trying to compile java / Apache /Tomcat / Unix

Posted by Hank Fisher <fi...@ucar.edu>.
	I encountered that error and those like it frequently when I first installed
tomcat.  There are 2 reasons that I got that error...

1.  I didn't have TOMCAT_HOME and JAVA_HOME setup correctly
2.  I didn't have the correct read/write permissions on all of my files i.e. I
created the jakarta-tomcat directory as userX and started the shell script as
"nobody"

	Hope this helps.

Hank



> >>> nmarriage@ingenta.com 05/24/00 08:52AM >>>
> Thanks, Steve, for your advice. Most kind.
> 
> I did what you suggested and it falls over in a different way now!
> Now when I try to go to one of the example jsp pages in my browser, I get:
> 
> 1. Blank screen on the browser and it hangs, apparently, for ever.
> 
> 2. The following message on the Unix terminal from which I started tomcat:
> 
> HANDLER THREAD PROBLEM: java.io.IOException: Stream broken
> java.io.IOException: Stream broken
>         at java.lang.Throwable.<init>(Compiled Code)
>         at java.lang.Exception.<init>(Compiled Code)
>         at java.io.IOException.<init>(Compiled Code)
>         at org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Compiled Code)
>         at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Compiled Code)
>         at org.apache.tomcat.service.TcpConnectionThread.run(Compiled Code)
>         at java.lang.Thread.run(Compiled Code)
> 
> 3. The following in jasper.log:
> 
> <JASPER_LOG> Wed May 24 12:24:59 GMT+01:00 2000 Parent class loader is: org.apache.tomcat.loader.AdaptiveServletLoader@1da653e7</JASPER_LOG>
> <JASPER_LOG> Wed May 24 12:24:59 GMT+01:00 2000 Scratch dir for the JSP engine is: /opt/local/jakarta-tomcat/work/localhost_8080%2fexamples</JASPER_LOG>
> <JASPER_LOG> Wed May 24 12:24:59 GMT+01:00 2000 IMPORTANT: Do not modify the generated servlets</JASPER_LOG>
> <JASPER_LOG> Wed May 24 12:25:00 GMT+01:00 2000 Parent class loader is: org.apache.tomcat.loader.AdaptiveServletLoader@1da646c6</JASPER_LOG>
> <JASPER_LOG> Wed May 24 12:25:01 GMT+01:00 2000 Parent class loader is: org.apache.tomcat.loader.AdaptiveServletLoader@1da63dd0</JASPER_LOG>
> <JASPER_LOG> Wed May 24 12:25:02 GMT+01:00 2000 Parent class loader is: org.apache.tomcat.loader.AdaptiveServletLoader@1da651db</JASPER_LOG>
> 

-- 
--------------------------------------------
Hank Fisher   Software Engineer             
Research Applications Program              
National Center for Atmospheric Research 
P.O. Box 3000, Boulder CO 80307-3000                      
email: fisherh@ucar.edu    ph: 303-497-2817
--------------------------------------------

RE: JSP engine fails when trying to compile java / Apache /Tomcat / Unix

Posted by Nick Marriage <nm...@ingenta.com>.

>-----Original Message-----
>From: Stephen Weiss [mailto:Sweiss@aamc.org]
>Sent: Wednesday, May 24, 2000 23:42
>To: nmarriage@ingenta.com; tomcat-user@jakarta.apache.org
>Subject: RE: JSP engine fails when trying to compile java / Apache
>/Tomcat / Unix
>
>
>Are you using the correct mod_jserv?  You should be using the one 
>from the Jakarta site, not the one from JServ itself.

Thanks again for your help; as it turns out, another person (Hank from Colorado) has solved the problem for me (see my reply to him - it was just a crummy environment variable in the end).

Yes I had compiled the mod_jserv as per the manual (except that the User Guide says "apxs -c *.c -o mod_jserv.so" instead of "apxs -c -o mod_jserv.so *.c", which threw me for a while).

>
>Stephen A. Weiss       Association of American Medical Colleges
>(202)828-0428       mailto:sweiss@aamc.org   http://www.aamc.org
>
>>>> nmarriage@ingenta.com 05/24/00 08:52AM >>>
>Thanks, Steve, for your advice. Most kind.
>
>I did what you suggested and it falls over in a different way now!
>Now when I try to go to one of the example jsp pages in my browser, I get:
>
>1. Blank screen on the browser and it hangs, apparently, for ever.
>
>2. The following message on the Unix terminal from which I started tomcat:
>
>HANDLER THREAD PROBLEM: java.io.IOException: Stream broken
>java.io.IOException: Stream broken
>        at java.lang.Throwable.<init>(Compiled Code)
>        at java.lang.Exception.<init>(Compiled Code)
>        at java.io.IOException.<init>(Compiled Code)
>        at 
>org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextReq
>uest(Compiled Code)
>        at 
>org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processC
>onnection(Compiled Code)
>        at org.apache.tomcat.service.TcpConnectionThread.run(Compiled Code)
>        at java.lang.Thread.run(Compiled Code)
>
>3. The following in jasper.log:
>
><JASPER_LOG> Wed May 24 12:24:59 GMT+01:00 2000 Parent class 
>loader is: 
>org.apache.tomcat.loader.AdaptiveServletLoader@1da653e7</JASPER_LOG> 
><JASPER_LOG> Wed May 24 12:24:59 GMT+01:00 2000 Scratch dir for 
>the JSP engine is: 
>/opt/local/jakarta-tomcat/work/localhost_8080%2fexamples</JASPER_LOG> 
><JASPER_LOG> Wed May 24 12:24:59 GMT+01:00 2000 IMPORTANT: Do not 
>modify the generated servlets</JASPER_LOG> 
><JASPER_LOG> Wed May 24 12:25:00 GMT+01:00 2000 Parent class 
>loader is: 
>org.apache.tomcat.loader.AdaptiveServletLoader@1da646c6</JASPER_LOG> 
><JASPER_LOG> Wed May 24 12:25:01 GMT+01:00 2000 Parent class 
>loader is: 
>org.apache.tomcat.loader.AdaptiveServletLoader@1da63dd0</JASPER_LOG> 
><JASPER_LOG> Wed May 24 12:25:02 GMT+01:00 2000 Parent class 
>loader is: 
>org.apache.tomcat.loader.AdaptiveServletLoader@1da651db</JASPER_LOG> 
>
>4. The following in servlet.log
>
>Context log path="/examples" :tomcat.errorPage: init
>Context log path="/examples" :default: init
>Context log path="/examples" :jsp: init
>Context log path="/test" :tomcat.errorPage: init
>Context log path="/test" :default: init
>Context log path="/test" :jsp: init
>Context log path="/admin" :tomcat.errorPage: init
>Context log path="/admin" :default: init
>Context log path="/admin" :jsp: init
>Context log path="" :tomcat.errorPage: init
>Context log path="" :default: init
>Context log path="" :jsp: init
>
>5. The following in tomcat.log
>
>Starting endpoint port="8008" 
>handler="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"
>
>
>Note, I am not using the usual port (8007) for the AJP12 
>connection, deliberately.
>
>
>Can Steve or anyone else out there help me please? This is still 
>driving me round the bend!
>
>Thanks again in advance,
>Nick Marriage, ingenta.com, Bath, UK
>
>>-----Original Message-----
>>From: steve@bath.ac.uk [mailto:steve@bath.ac.uk]On Behalf Of Steve Weiss
>>Sent: Tuesday, May 23, 2000 18:04
>>To: tomcat-user@jakarta.apache.org 
>>Subject: Re: JSP engine fails when trying to compile java / Apache /
>>Tomcat / Unix
>>
>>
>>Nick Marriage wrote:
>>> 
>>
>>> I have installed tomcat and apache, as per the Minimalistic User 
>>Guide for Tomcat. I've started 
>>> Another odd thing, which might have something to do with it, is 
>>that in the jasper.log
>>> files which tomcat creates, it says (amongst other things):
>>> 
>>> <JASPER_LOG> Tue May 23 13:13:28 GMT+01:00 2000 Classpath 
>>according to the Servlet Engine is: 
>>/opt/local/jakarta-tomcat/webapps/examples/WEB-INF/classes</JASPER_LOG>
>>> 
>>> What happened to the rest of my classpath, which, when I started 
>>Tomcat via tomcat.sh is announced to be:
>>>  
>>.:./../lib/ant.jar:./../lib/jasper.jar:./../lib/servlet.jar:./../li
>>b/test:./../lib/webserver.jar:./../lib/xml.jar:/usr/java1.2/jre/lib
>>:/usr/java1.2/bin:/tools/external/xml/xml4j_2_0_11/xml4j/xml4j.jar:
>>/tools/external/jserv_1.0/JSDK2.0/lib/jsdk.jar
>>> 
>>> Has anyone out there got any tips as to what I've done wrong? 
>>This has been driving me round the bend for days now!
>>> 
>>
>>It looks like you need to add <path-to-jdk>/lib/tools.jar to your
>>classpath before you start Tomcat. (or classes.zip if you're using
>>jdk1.1). That would also account for your missing Hashtable problem ;)
>>
>>-- 
>>Steve Weiss      Association of American Medical Colleges
>>(202)828-0428    mailto:sweiss@aamc.org    http://www.aamc.org 
>>
>>--------------------------------------------------------------------------
>>To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org 
>>For additional commmands, email: tomcat-user-help@jakarta.apache.org 
>>
>>
>
>
>--------------------------------------------------------------------------
>To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org 
>For additional commmands, email: tomcat-user-help@jakarta.apache.org 
>
>
>--------------------------------------------------------------------------
>To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commmands, email: tomcat-user-help@jakarta.apache.org
>
>