You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by MacCormac Rinehart <ma...@banfieldpethospital.com> on 2001/05/07 02:34:36 UTC
Cannot create bean of class riddles.Riddler
I know someone posted a message with a problem similar to this about a month
ago, but was unable to find the solution. I have deployed my riddles
package in the WEB-INF/classes directory for this program. There is an
empty constructor in the bean. I have already ruled out a ClassNotFound
exception. At this point I think I am down to a configuration issue. I am
using Tomcat 3.2.1. If someone knows the resolution to this issue, please
let me know. Thanks,
Mac
PS for further information see below:
This is the useBean tag copied directly from my JSP:
<jsp:useBean id="riddler" class="riddles.Riddler" scope="request"/>
Below is the code in my web.xml file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
</web-app>
Below is the context entry from my server.xml file:
<Context path="/riddler"
docBase="webapps/riddler"
defaultSessionTimeOut="30"
crossContext="false"
debug="0"
reloadable="true">
</Context>
This is the try-catch block from the generated servlet code where the error
message is generated:
try {
riddler = (riddles.Riddler)
Beans.instantiate(this.getClass().getClassLoader(), "riddles.Riddler");
} catch (Exception exc) {
throw new ServletException (" Cannot create bean of class
"+"riddles.Riddler");
}