• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

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

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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..
 
Rajat
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I know Tomcat3 and tomcat 4 is different. But how should i call classes of another application in tomcat4.

Thanx in advance.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!!
reply
    Bookmark Topic Watch Topic
  • New Topic