jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes javax.servlet.ServletException:  Cannot create bean of class... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "javax.servlet.ServletException:  Cannot create bean of class... " Watch "javax.servlet.ServletException:  Cannot create bean of class... " New topic

javax.servlet.ServletException: Cannot create bean of class...

anand chawla
Ranch Hand

Joined: Oct 19, 2000
Posts: 91
hi Guys
I m working on Tomcat server 3.2.3
I have my jsp files stored at following path:-
and my beans are stored at following path
when i run the file i get the error
ServletException: Cannot create bean of class...
why does this happen
my jsp file is as follows
<title>Browse the Catalog</title>
<%@ page language="java" import="projsp.*" %>
<jsp:useBean id="Item" class="projsp.Item" />
<td>Item Description<td>Price<td>Quantity in Hand

Vector items=Item.getItems();

<td><input type=submit value="Add Selected items">

why is this happening
please help
its so confusing
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Problably some error in your bean. Remember that a bean must have an empty constructor(i.e- you can�t create a constructor that receives parameters for your bean).
anand chawla
Ranch Hand

Joined: Oct 19, 2000
Posts: 91
Hey Pls help me out with this proble,..
Ther is nothing wrong with my bean or class.
pls anyone out ther...why do we get this error
all you jave gurus where are u...i m stuck.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

Could you include more of the error message? There may be a hint there.

An IDE is no substitute for an Intelligent Developer.
anand chawla
Ranch Hand

Joined: Oct 19, 2000
Posts: 91

this is the error i am getting please help...........
javax.servlet.ServletException: Cannot create bean of class Item
at jsp.anand._0002fjsp_0002fanand_0002fdispord_0002ejspdispord_jsp_15._jspService(_0002fjsp_0002fanand_0002fdispord_0002ejspdispord_jsp_15.java:77)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)
I agree. Here's the link: http://aspose.com/file-tools
subject: javax.servlet.ServletException: Cannot create bean of class...
It's not a secret anymore!