Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > Apache Tomcat
|
Apache Tomcat General discussion of the Apache Tomcat servlet container. For discussions specific to the Professional Apache Tomcat book, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Apache Tomcat section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 22nd, 2004, 12:50 PM
Registered User
 
Join Date: Apr 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Unfixable Tomcat Error !

I have been trying to solve the following error. I also looked up for solutions in the groups and a in couple other websites but nothing seems to solve the problem. The following is the problem description:

 I have unzipped & installed tomcat-4.1.30 on Sun Solaris (Unix). I run tomcat on port 8118 and it works fine. I also executed a couple of examples from <...>/examples/jsp and they work fine too. Then I created 2 new folders under webapps as follows
<...>/webapps/users/pkhann1
(here users & pkhann1 are the new folders that I created)
Then I copied the dates folder from <...>/webapps/examples/jsp/dates to <...>/webapps/users/pkhann1/ and then I created another folder WEB-INF/classes as follows
<...>/webapps/users/pkhann1/WEB-INF/classes
and copied the respective class & java file of dates as follows:
<...>/webapps/users/pkhann1/WEB-INF/classes/JspCalendar.class
<...>/webapps/users/pkhann1/WEB-INF/classes/JspCalendar.java

But when I try executing dates.jsp, i get the following error:
HTTP Status 500 -
type Exception report

message

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

exception

org.apache.jasper.JasperException: dates.JspCalendar
    at org.apache.jasper.compiler.BeanRepository.getBeanT ype(BeanRepository.java:183)
    at org.apache.jasper.compiler.Generator$GenerateVisit or.visit(Generator.java:692)
    at org.apache.jasper.compiler.Node$GetProperty.accept (Node.java:552)
    at org.apache.jasper.compiler.Node$Nodes.visit(Node.j ava:1028)
    at org.apache.jasper.compiler.Node$Visitor.visitBody( Node.java:1070)
    at org.apache.jasper.compiler.Node$Visitor.visit(Node .java:1076)
...
<snipped for breavity>

root cause
java.lang.ClassNotFoundException: dates.JspCalendar

I have tried to do the following, but nothing worked:
1. Copied the web.xml from jakarta-tomcat-4.1.30/webapps/examples/WEB-INF
to jakarta-tomcat-4.1.30/webapps/users/pkhann1/WEB-INF and stopped and started the server, but it didn't work.
2. Tried to add the import page statement in the dates.jsp, but it didn't work either.

Any help would be really appreciated.

Thanx for your help in advance


 
Old May 18th, 2004, 10:16 AM
Registered User
 
Join Date: May 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Since you copied the files, did you copied classes belong to a package. If so, you have to copy the .class file in the last folder of the package. I have been compiling classes in the classes folder but if its is part of package you have (or at least I have had to )move the .class file to the last folder in application for the package declaration found in my class.

If your application is accessing an web.xml file parameters make sure they correspondes with the correct entries, also.


Quote:
quote:Originally posted by pkhann1
 I have been trying to solve the following error. I also looked up for solutions in the groups and a in couple other websites but nothing seems to solve the problem. The following is the problem description:

I have unzipped & installed tomcat-4.1.30 on Sun Solaris (Unix). I run tomcat on port 8118 and it works fine. I also executed a couple of examples from <...>/examples/jsp and they work fine too. Then I created 2 new folders under webapps as follows
<...>/webapps/users/pkhann1
(here users & pkhann1 are the new folders that I created)
Then I copied the dates folder from <...>/webapps/examples/jsp/dates to <...>/webapps/users/pkhann1/ and then I created another folder WEB-INF/classes as follows
<...>/webapps/users/pkhann1/WEB-INF/classes
and copied the respective class & java file of dates as follows:
<...>/webapps/users/pkhann1/WEB-INF/classes/JspCalendar.class
<...>/webapps/users/pkhann1/WEB-INF/classes/JspCalendar.java

But when I try executing dates.jsp, i get the following error:
HTTP Status 500 -
type Exception report

message

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

exception

org.apache.jasper.JasperException: dates.JspCalendar
    at org.apache.jasper.compiler.BeanRepository.getBeanT ype(BeanRepository.java:183)
    at org.apache.jasper.compiler.Generator$GenerateVisit or.visit(Generator.java:692)
    at org.apache.jasper.compiler.Node$GetProperty.accept (Node.java:552)
    at org.apache.jasper.compiler.Node$Nodes.visit(Node.j ava:1028)
    at org.apache.jasper.compiler.Node$Visitor.visitBody( Node.java:1070)
    at org.apache.jasper.compiler.Node$Visitor.visit(Node .java:1076)
...
<snipped for breavity>

root cause
java.lang.ClassNotFoundException: dates.JspCalendar

I have tried to do the following, but nothing worked:
1. Copied the web.xml from jakarta-tomcat-4.1.30/webapps/examples/WEB-INF
to jakarta-tomcat-4.1.30/webapps/users/pkhann1/WEB-INF and stopped and started the server, but it didn't work.
2. Tried to add the import page statement in the dates.jsp, but it didn't work either.

Any help would be really appreciated.

Thanx for your help in advance







Similar Threads
Thread Thread Starter Forum Replies Last Post
Tomcat error kaushiksamaddar Apache Tomcat 2 April 4th, 2007 08:55 AM
Chapter 5 example 1 tomcat error bozokhun BOOK: Beginning JavaServer Pages 0 March 28th, 2007 04:51 AM
tomcat error Mr. Ram Apache Tomcat 0 March 20th, 2006 07:58 AM
Tomcat Connection error venkatachar Servlets 0 December 16th, 2004 06:52 AM
Tomcat set up error vaithise Apache Tomcat 2 August 3rd, 2004 12:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.