wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error" Watch "Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error" New topic
Author

Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error

Rajat
Greenhorn

Joined: Mar 20, 2003
Posts: 13
Hi
I am working on one application which is calling the classes of other application. It works fine when i run Tomcat3.2.2 but it gives the following error when I run on tomcat4.0.
Pl. help me out. Thanx in advance.
Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
/usr/local/jakarta-tomcat-4.0.6/work/Standalone/localhost/demossm/Login$jsp.java:5: Package sfacommunity.community not found in import.
import sfacommunity.community.*;
^
1 error, 1 warning
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:414)
at org.apache.jsp.index$jsp._jspService(index$jsp.java:61)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:536)
N Nanda
Ranch Hand

Joined: Feb 09, 2004
Posts: 62
try to copy <java-install-dir\lib\tools.jar file into
<tomcat-install-dir>\common\lib\... and restart tomcat.
NOTE :: there is a significant difference between tomcat 3 and tomcat 4 as both were developed by separate groups within Apache organization, and now those groups are merged, so it is very difficult to compare the behavior of these versions.
hopefully it'll work..


Regards<br />--<br />Niranjan Nanda<br />Consultant<br />Capgemini Consulting India <br />Mumbai<br />Phone: 9324951476
Rajat
Greenhorn

Joined: Mar 20, 2003
Posts: 13
Hi
I know Tomcat3 and tomcat 4 is different. But how should i call classes of another application in tomcat4.

Thanx in advance.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
What do you mean by "classes of another application"?
By default, web applications are isolated from each other. A JSP in one application can only use the WEB-INF/classes files in that application, or JAR libraries that are shared by being placed in the common directories. See the docs that come with Tomcat.
Bill
Rajat
Greenhorn

Joined: Mar 20, 2003
Posts: 13
I mean to say i want to call classes of another application from one application.
I have two web applications
WebApp1
-jsp
- web-inf--> classes-->webapp1Classes
WebAPp2
-jsp
- web-inf--> classes-->webapp2Classes
In my webapp1, there are 5 communities which uses this source code.I have 5 context in tomcat. All reference this web application.
In my webapp2, I am kepping the listing of all the communities which reference the webapp1 because I am using this webapplication as a configuration application for webapp1. In this application, I am creating the communities and creating the databse and some admin info. Actually, I am having a web based product and i have a 100 customers. so i cant keep 100 source code. So I am creating the different database , differenet context but they are all referencing the same source code.
How we are setting up the community?
suppose we have a new customer. we create the datadbase and users and make the context in tomcat and start a new webapplication using the same source code. we also customise the look and feel. So it is not a part of my application.
How we are handling the connectons?
We are saving all the database info like username password , hostname, max users in one table. and make the listing of allthe communities with database info. when a request commes it checks the contextpath and get the corresponding information.
now what we want to do?
we want to create an interface or application which dynamically create the database and users using template. and update look and feel.
So I have made that interface but now I am kepping that listing in this application which contains all the information.
Now I want to access that list for any request to get database info from other application.
Means webapp2 jsp has to access the classes of webapp1 classes.
Pl help me out? what should I do? Its working fine with tomat3.2.2 but in tomcat 4 its is giving error.
Thanx in advance
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Funny Tell,
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Like I said already "see the docs that come with tomcat"
Specifically
http://yourserver/tomcat-docs/class-loader-howto.html
In which you will find the following:
For classes and resources that must be shared across all web applications, place unpacked classes and resources under $CATALINA_HOME/shared/classes, or place JAR files containing those classes and resources under $CATALINA_HOME/shared/lib.

There is no way that I know of to share classes ONLY between two applications (unless you duplicate the class files).
Tomcat installations come with a HUGE amount of useful information.
Bill
Rajat
Greenhorn

Joined: Mar 20, 2003
Posts: 13
Thanks,
I was trying with $CATALINA_HOME/shared/classes , it was not working. But now I have tried with $CATALINA_HOME/classes. its working fine but at my localhost on tomcat4.0.6. now, I hope it can work on server.
Yesterday, I copied classes in all the webapplications. It worked but now I will try with this option because there is no need to have duplicate copies on the server. Right! Thanx again!!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error
 
Similar Threads
Multiple updates
deployment problem
Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error
How do i correct this error
Problem compiling JSPs on Tomcat