Unable to load uordisplay.Beandisplay due to a java.lang.InstantiationException exception

Hi.. , I am working with the display tag.
While i am using the decoraters with  the display tag i am getting the Exception
like: Unable to load uordisplay.Beandisplay due to a java.lang.InstantiationException exception

Can any body help me  to come out of this error.

        My package is:uordisplay.  
        My Bean is:Beandisplay
        My jsp page is:Uordisplay.

my code is:
package uordisplay;
import org.displaytag.decorator.TableDecorator;
public class Beandisplay extends TableDecorator{

      private String img;

 * getter methods
 public Beandisplay(){
 public Beandisplay(String img){


 public String getImage(){
            Beandisplay lobj = (Beandisplay)getCurrentRowObject();      
            return "&lt;a href=\""+">"+ "<img src = '"+lobj.getImage()+"'  width='100' height='100'/>"+"</a>";


 *setter methods

 public void setImage(String img){


<%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display"%>
  <jsp:directive.page contentType="text/html; charset=UTF-8" />
<%@ page language = "java" import = "java.util.*" import = "uordisplay.Beandisplay"%>

  <center><h3>Auto-paging , Sorting of long lists</h3>
      Beandisplay bd[] = new Beandisplay[7];
                bd[0] = new Beandisplay("img");
      bd[1] = new Beandisplay("def");
      bd[2] = new Beandisplay("ghi");
      bd[3] = new Beandisplay("jkl");
      bd[4] = new Beandisplay("mno");
      bd[5] = new Beandisplay("poq");
      bd[6] = new Beandisplay("rst");
      ArrayList list=new ArrayList();
      <hr width=40%><br>
               <display:table  cellpadding="19" name="sessionScope.lister" pagesize="5" defaultsort="1"     defaultorder="ascending" decorator="uordisplay.Beandisplay">

            <display:column property="image" title="Car Image"       

While running  this on Tomcat I am getting the error :

javax.servlet.ServletException: Unable to load uordisplay.Beandisplay due to a java.lang.InstantiationException exception

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Check the get method

public String getImage(){
          Beandisplay lobj = (Beandisplay)getCurrentRowObject();    
          return "&lt;a href=\""+">"+ "<img src = '"+lobj.getImage()+"'  width='100' height='100'/>"+"</a>";


is something getting null here?? The instantiation exception generally occurs when the instantiation of bean methods are getting null pointer.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.