Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cannot create bean of class . . .

 
Andrew Shafer
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 338
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic