This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Servlets and the fly likes cannot create bean of class . . . Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "cannot create bean of class . . ." Watch "cannot create bean of class . . ." New topic

cannot create bean of class . . .

Andrew Shafer
Ranch Hand

Joined: Jan 19, 2001
Posts: 338

I'm running Tomcat 3.2.3 on windows NT.
I'm trying to instantiate a class using the jsp:useBean tag.
It seems to work fine with other classes I have made but this one keeps giving me a ServletException: cannot create bean of class . . .
Anyone of you smart people know what might cause this?

Andrew Shafer
Ranch Hand

Joined: Jan 19, 2001
Posts: 338

I thought I could be cute and just instantiate the class, but now I get a ServletException being caused by a java.lang.SecurityException: sealing violation
So there must be some deeper problem, I'll keep digging.
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

...instantiate a class using the jsp:useBean tag...
If you are using the type attribute you cannot
a bean. Hopefully you are using the
attribute of the usebean tag.
just thought I will mention it...
- satya

Take a Minute, Donate an Hour, Change a Life
Tony Alicea

Joined: Jan 30, 2000
Posts: 3222
Also, if you declared a constructor in your bean class with any number of arguments and forgot to explicitly define one no-argument constructor, then the JSP engine won't be able to instantiate a bean if the bean is not already in the desired scope.

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
wood burning stoves
subject: cannot create bean of class . . .
It's not a secret anymore!