aspose file tools*
The moose likes Tomcat and the fly likes getting error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "getting error" Watch "getting error" New topic
Author

getting error

arekonda ramesh babu
Ranch Hand

Joined: Apr 11, 2006
Posts: 35
hai

i have set path , classpath , java_home and Tomcat_home as under

classpath:

C:\bea\weblogic81\server\lib;
C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar;
C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\S3TestServerWeb\WEB-INF\lib;


JAVA_HOME:

C:\bea\jdk142_08

path:

C:\bea\jdk142_08\bin;

Tomcat_Home:

C:\Program Files\Apache Software Foundation\Tomcat 5.0

is it sufficient to run a jsp file.

iam able run some sample hello.jsp.

but for running other than this simple file iam getting the following

errors.

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: database/HBQueryData
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.jsp.ActivateScenario_jsp._jspService(ActivateScenario_jsp.java:188)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

java.lang.NoClassDefFoundError: database/HBQueryData
org.apache.jsp.jsp.ActivateScenario_jsp._jspService(ActivateScenario_jsp.java:64)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache Tomcat/5.0.30 logs.


--------------------------------------------------------------------------------

Apache Tomcat/5.0.30

i tried a week long and finally posting this to the forum.

kindly do need ful to me.


Sivaraman Lakshmanan
Ranch Hand

Joined: Aug 02, 2003
Posts: 231
Hi arekonda,
You need to put all the relevant jar files which you refer in your application in to WEB-INF/lib folder. Do this and restart tomcat and give a try. It should work. Basically you are keeping all the jar files in the classpath that's it.

Hope this helps


Regards,
Sivaraman.L
arekonda ramesh babu
Ranch Hand

Joined: Apr 11, 2006
Posts: 35
hai sivaraman,

which jar files i need to put.

if iam not wrong shall i assume the jar file u mentioned is about :

C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib

servlet-api.jar

setting under

C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\S3TestServerWeb\WEB-INF\lib

please siva im i correct?, in this regard.

Thanks in advance for ur reply
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
Error message says it cannot find database.HBQueryData:

java.lang.NoClassDefFoundError: database/HBQueryData
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12683
    
    5
Note that Tomcat pays NO attention to classpath.

Your tomcat installation should have the "class-loader-howto.html" file under tomcat-docs. This explains exactly how Tomcat looks for library jars and class files.

Bill


Java Resources at www.wbrogden.com
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60082
    
  65

arekonda ramesh babu,

You wrote:

the jar file u mentioned is about


and

Thanks in advance for ur reply


"u" and "ur" are not real words. Please use only real words such as "you" and "your" when posting to the Ranch.

bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
arekonda ramesh babu
Ranch Hand

Joined: Apr 11, 2006
Posts: 35
hai Carol Enderlin,

i checked that

C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\S3TestServerWeb\WEB-INF\lib;

is placed correctly.

you mentioned "Error message says it cannot find database.HBQueryData".

could you please help me that what can i do now to rectify this problem.

please do need ful to me.


Rameshbabu
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Somewhere, one of your JSP is trying to import a class named:
database.HBQueryData.

If that class is part of a third party library, then the jar file from that project will need to be placed in /WEB-INF/lib.
If that class is one of your own then the class needs to be placed under:
/WEB-INF/classes/database.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
wood burning stoves
 
subject: getting error
 
Similar Threads
JFreeChart / X11 window server error
NoClassDefFoundError in Apache SOAP
Error while jsp connecting to database
JFreeChart / X11 window server error
what's the problem ?