tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suresh Manne" <sureshma...@indbrain.com>
Subject RE: probs in bean creation
Date Thu, 05 Jul 2001 15:15:43 GMT
Hi Dim,
  I am sending you the erroe message I get,

javax.servlet.ServletException:  Cannot create bean of class
searchBean.CrossSearch
	at
search._0002fsearch_0002fcrRefsearch_00031_0002ejspcrRefsearch1_jsp_4._jspSe
rvice(_0002fsearch_0002fcrRefsearch_00031_0002ejspcrRefsearch1_jsp_4.java:85
)
	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$JspServletWrapper.service(JspServlet.ja
va:177)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
	at org.apache.tomcat.core.Handler.service(Handler.java:286)
	at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
	at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
	at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)
	at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
	at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
	at java.lang.Thread.run(Thread.java:484)

Can you make out anything?

Thanks in advance,
Suresh.

-----Original Message-----
From: Dmitri Colebatch [mailto:dim@nuix.com.au]
Sent: Wednesday, July 04, 2001 7:44 PM
To: sureshmanne@indbrain.com
Subject: Re: probs in bean creation


Suresh,

On Thu,  5 Jul 2001 06:42, you wrote:
> What else could be wrong? Please help me out.. I am really bugged with
this
> error.
Ok - post the stack trace from the compile and we'll see if that sheds any
light on it.

cheers
dim


>
> Thanks,
> Suresh.
>
>
> -----Original Message-----
> From: Dmitri Colebatch [mailto:dim@nuix.com.au]
> Sent: Wednesday, July 04, 2001 3:00 AM
> To: tomcat-user@jakarta.apache.org; Suresh Manne
> Subject: Re: probs in bean creation
>
>
> Hi,
>
> On Thu,  5 Jul 2001 02:58, Suresh Manne wrote:
> > javax.servlet.ServletException:  Cannot create bean of
> > class my_classes_folder.my_class_file
>
> What does your bean look like?  Firstly, I'm assuming it has "package
> my_classes_folder" at the top of it.  Secondly, the main reason I find
> those errors are the lack of a null argument constructor.  To use that
> useBean tag the way you are, you should have something like:
>
> package my_classes_folder;
>
> public class my_class_file
> {
> 	public my_class_file() { }
> }
>
> You might also have other things, I'm assuming you do, but that is the
bare
> minimum.  However, you're not at all following conventions.  The above
> should
> be
>
> package myPackage;
>
> public class MyClass
> {
> 	public MyClass() { }
> }
>
> which would have the following useBean tag:
>
> <jsp:useBean id="cs" class="myPackage.MyClass" scope="request" />
>
> DOes that make sense?
>
> cheers
> dim


Mime
View raw message