aspose file tools*
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 Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "cannot create bean of class . . ." Watch "cannot create bean of class . . ." New topic
Author

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?


!_I_Know_Kung_Fu_!
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

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

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cannot create bean of class . . .