Exception creating bean of class

javax.servlet.jsp.JspException: Exception creating bean of class com.fuzzysoft.business.Web.Form.itemForm: {1}      at org.apache.struts.taglib.html.FormTag.initFormBean(FormTag.java:487)      at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:457)      at _Welcome._jspService(_Welcome.java:90)      [SRC:/Welcome.jsp:36]      at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)      at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:569)      at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:305)      at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)      at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)      at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)      at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)      at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:222)      at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)      at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)      at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)      at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)      at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)      at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)      at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)      at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)      at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)      at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)      at java.lang.Thread.run(Thread.java:534)
itaakashcomAsked:
Who is Participating?

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

x
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.

mccarlIT Business Systems Analyst / Software DeveloperCommented:
Is that the full stack trace that you get? Normally, I would expect to see some further Exception that caused the JSPException. If that is just the view rendered in the browser, maybe you can find the full stack trace in the log files?
mccarlIT Business Systems Analyst / Software DeveloperCommented:
And it may help if you post the JSP page and the Java class mentioned at the start of the above error message.
itaakashcomAuthor Commented:
Welcomw.jsp

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ page import="java.util.*,com.fuzzysoft.business.Web.Form.*,com.fuzzysoft.business.common.*"%>
<html:html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<html:base/>
<link rel="stylesheet" href="css/sms.css">
</head>
<%
   UserDetailsForm uf=(UserDetailsForm) session.getAttribute("log");
   String msg="";
   String urole="";
   String cdt="";
   String ldt="";
   if (uf!=null)
   {
     msg = "Welcome "+uf.getFullName()+", "+uf.getDesignation()+", "+uf.getOfficeName();
     urole = "Role : "+(String) uf.getRoleName();
     String uid=(String) uf.getUserId();
     ArrayList arr=new ArrayList();
     arr=fuzzysoft.getCurrentLogin(uid);
     cdt=(String)arr.get(0);
     ldt=(String)arr.get(1);
   }
%>
<body>
<!-- DO NOT MOVE! The following AllWebMenus linking code section must always be placed right AFTER the BODY tag-->
<!-- ******** BEGIN ALLWEBMENUS CODE FOR menu11 ******** -->
<script type="text/javascript">var MenuLinkedBy="AllWebMenus [4]",awmMenuName="menu11",awmBN="628";awmAltUrl="";</script><script charset="UTF-8" src="menu11.js" type="text/javascript"></script><script type="text/javascript">awmBuildMenu();</script>
<!-- ******** END ALLWEBMENUS CODE FOR menu11 ******** -->

<html:form action="/Itemdata">
<html:hidden property="event" value=""/>
<table width="780" align="center">
    <tr><td height="2"></td></tr>
    <tr><td>
    <table width="760" align="center">
      <tr><td><html:img width="760" src="Images/innerimg.jpg"/></td></tr>
      <tr><td class="userbar" width="760"><%=msg%>&nbsp;</td></tr>
    </table>
    <table width="760" align="center">
      <tr><td class="rolebar" width="700"><%=urole%>&nbsp;</td><td class="rolebar"><strong><a href="./Word/Index.htm" target="_blank">HELP</a></strong></td></tr>
    </table>
    <table width="760" align="center">
      <tr><td class="errorbar" width="760"><html:errors/>&nbsp;</td></tr>
      <tr><td class="errorbar" width="760">Current Login : <%=cdt%></td></tr>
      <tr><td class="errorbar" width="760">Last Login : <%=ldt%></td></tr>
    </table>
    <table width="760">
    <tr>
    <td width="150" id="awmAnchor-menu11">
    <div style="position:relative">
    </div>
    </td>
    <td width="10"></td>
    <td width="600">
       <table>
       <tr>
       <td width="600" class="tableheading">&nbsp;</td></tr>
       <tr>
       <td>
       <table width="600">
  <tr class="bodytable1">
      <td width="600" colspan="2">&nbsp;</td>
      </tr>
      <tr class="bodytable2">
      <td colspan="2">&nbsp;</td>
      </tr>
      <tr class="bodytable1">
      <td colspan="2">&nbsp;</td>
      </tr>
      <tr class="bodytable2">
      <td colspan="2">&nbsp;</td>
      </tr>
      <tr class="bodytable1">
  <td colspan="2">&nbsp;</td>
      </tr>
  <tr class="bodytable2">
  <td colspan="2">&nbsp;</td>
      </tr>
  <tr align="center" class="bodytable1">
      <td width="" colspan="2">
        <div align="center">
          <font color="#006600" face="Verdana" size="5"><strong>Welcome to Stores Management System</strong></font>
        </div>
      </td>
      </tr>
  <tr class="bodytable2">
      <td colspan="2">&nbsp;</td>
      </tr>
      <tr class="bodytable1">
      <td colspan="2">&nbsp;</td>
      </tr>
      <tr class="bodytable2">
      <td colspan="2">&nbsp;</td>
      </tr>
      <tr class="bodytable1">
      <td colspan="2">&nbsp;</td>
      </tr>
      <tr class="bodytable2">
  <td colspan="2">&nbsp;</td>
      </tr>
  <tr class="bodytable1">
  <td colspan="2">&nbsp;</td>
      </tr>
  </table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr><td height="8"></td></tr>
</table>
</html:form>
</body>
</html:html>


itemForm.java

 package com.fuzzysoft.business.Web.Form;
 import com.fuzzysoft.business.mbo.MasterBO;
 import java.sql.*;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
 import org.apache.struts.action.ActionError;
 import org.apache.struts.action.ActionErrors;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionMapping;
 import org.apache.struts.validator.ValidatorForm;
 import com.fuzzysoft.business.common.fuzzysoft;

 public class itemForm extends ActionForm
 {
         private String itemCode;
         private String itemDesc;
         private String itemUnit;
         private String itemType;
         private String event;
    private int finalchkdigit;
   
  public void setItemCode(String itemCode)
         {
               this.itemCode=itemCode;
         }
  public String getItemCode()
         {
               return this.itemCode;
         }
  public void setItemDesc(String itemDesc)
  {
        this.itemDesc=itemDesc;
  }
 public String getItemDesc()
  {
        return this.itemDesc;
  }
 public void setItemUnit(String itemUnit)
 {
       this.itemUnit=itemUnit;
 }
 public String getItemUnit()
 {
       return this.itemUnit;
 }
 
 public void setItemType(String itemType)
 {
       this.itemType=itemType;
 }
 public String getItemType()
 {
       return this.itemType;
 }
  public void setEvent(String event)
 {
       this.event=event ;
 }
 public String getEvent()
 {
       return this.event ;
 }

 public void reset(ActionMapping mapping,HttpServletRequest request)
 {
 try
  {
  this.itemCode=null;
  this.itemDesc=null;
  this.itemType=null;
  this.itemUnit=null;
  MasterBO mbo=new MasterBO();
  request.setAttribute("ITEMUNIT",mbo.getArrayOfUnit());
  request.setAttribute("ITEMTYPE",mbo.getArrayOfItemType());
  }catch(Exception e)
  {
    e.printStackTrace();
  }
  }
 
  public ActionErrors validate(ActionMapping map,HttpServletRequest req)
 {
  ActionErrors errors=new ActionErrors();
  HttpSession session=req.getSession();
  errors.clear();
  int chkdigit=0;
  /*---------------Local Prefix Logic-----------------------*/
  if (event.equals("SaveOnClick"))
  {
   String oftype=(String) session.getAttribute("otype");
   String lpr=(String) session.getAttribute("lprefix");
   lpr="99"+lpr;
   String localcd="";
   if(this.itemCode.trim().length()>0)
   {
    localcd=this.getItemCode().substring(2,6);
   }
   MasterBO mbo=new MasterBO();
   try{
   if(this.itemCode.trim().length()==11)
   {
   chkdigit=mbo.CalCheckDigit(this.itemCode); }
   }
   catch (Exception e)
   {
     e.printStackTrace();
   }
  if ((itemCode==null)||(itemCode.trim().length()==0)){
        errors.add("err",new ActionError("errors.required","Item Code"));
  }
  else if((this.getItemCode().trim().length() < 11))
  {
        errors.add("err",new ActionError("errors.minlength","Item Code","11"));
  }
  else if((Integer.parseInt(this.getItemCode().substring(9,10))!= chkdigit))
   {  
    errors.add("err",new ActionError("errors.checkdigit",String.valueOf(chkdigit)));
   }
   else if(!fuzzysoft.isNumeric(itemCode))
   {
    errors.add("err",new ActionError("errors.numeric","Item Code"));
   }
   /*-------------------- Check Local Purchase Item Prefix ----------------------------*/
  else if ((oftype.equals("S")) && (!localcd.equals(lpr)))
  {
    errors.add("err",new ActionError("errors.be","Item Code","00"+lpr+"00000"));
  }
  else if((itemDesc==null)||(itemDesc.trim().length()==0))
  {
        errors.add("err",new ActionError("errors.required","Item Description"));
  }
  else if ((itemUnit==null)||(itemUnit.trim().length()==0))
  {
        errors.add("err",new ActionError("errors.select","Item Unit"));
  }
  else if ((itemType==null)||(itemType.trim().length()==0))
  {
        errors.add("err",new ActionError("errors.select","Item Type"));
  }
  }
  return errors;
 }
 }
 
 
itemAction.java

package com.fuzzysoft.business.Web.Action;
import com.fuzzysoft.business.Web.Form.*;
import com.fuzzysoft.business.common.fuzzysoft;
import com.fuzzysoft.business.db.Additem;
import java.text.SimpleDateFormat;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;
import org.apache.struts.util.MessageResources;
import java.sql.*;

public class itemAction extends DispatchAction
{
     ActionErrors errors=new ActionErrors();
  public ActionForward onLoad(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception
      {
         boolean nosession = fuzzysoft.sessionout(request);
         if (nosession) return mapping.findForward("login");
         return(mapping.findForward("redirect.samepage"));
      }
      public ActionForward ComboOnchange(ActionMapping mapping,ActionForm form,
              HttpServletRequest request,HttpServletResponse response) throws Exception
  {
     boolean nosession = fuzzysoft.sessionout(request);
     if (nosession) return mapping.findForward("login");
          return mapping.findForward("redirect.samepage");
  }
 
      public ActionForward CancelOnClick(ActionMapping mapping,ActionForm form,
              HttpServletRequest request,HttpServletResponse response) throws Exception
  {
         boolean nosession = fuzzysoft.sessionout(request);
     if (nosession) return mapping.findForward("login");
     return mapping.findForward("redirect.nextpage");
  }
public ActionForward SaveOnClick(ActionMapping mapping,ActionForm form,
HttpServletRequest request,HttpServletResponse response)throws Exception
  {
    try{
     
         boolean nosession = fuzzysoft.sessionout(request);
     if (nosession) return mapping.findForward("login");
   
    itemForm item=new itemForm();
        item.setItemCode(request.getParameter("itemCode").trim());
        item.setItemDesc(request.getParameter("itemDesc").trim());
        item.setItemUnit(request.getParameter("itemUnit").trim());
        item.setItemType(request.getParameter("itemType").trim());
        HttpSession session=request.getSession();
        String message="";
        request.setAttribute("item",item);
    Additem additem=new Additem();
    boolean commcd=additem.CheckCommercial(item.getItemCode());
    if (!commcd)
    {
     errors.clear();
     errors.add("err",new ActionError("errors.incomm"));
     saveErrors(request,errors);
     return(mapping.findForward("redirect.samepage"));
    }
        boolean itemexist=additem.Checkitem(item);
        if(itemexist)
    {
     errors.clear();
     errors.add("err",new ActionError("errors.itemexist"));
     saveErrors(request,errors);
     return(mapping.findForward("redirect.samepage"));
    }
    int i=additem.AddItem(item);
    if(i!=1)
         {
              errors.clear();
      errors.add("err",new ActionError("errors.save"));
      saveErrors(request,errors);
      return(mapping.findForward("redirect.samepage"));
     }              
     UserDetailsForm uf =(UserDetailsForm) session.getAttribute("log");
     //logrecord
     String dt=new SimpleDateFormat("dd-MM-yyyy hh:mm:ss a").format(new java.util.Date());
     i=fuzzysoft.logrecord(uf.getUserId(),uf.getOfficeId(),"ITEM",item.getItemCode(),"ADD",dt);
     //
     return(mapping.findForward("redirect.nextpage"));
    } catch (Exception e)
    {
              errors.clear();
      errors.add("err",new ActionError("errors.custom",e));
      saveErrors(request,errors);
      return(mapping.findForward("redirect.samepage"));
    }
}
}

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
krishna kishore mellacheruvu venkataCommented:
Check whether itemForm class is in classpath or not?

As a good java standard convention Java class name should start with Capital Letter. It should be ItemForm not itemForm.
itaakashcomAuthor Commented:
It gave some indication about the solution.
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
Java EE

From novice to tech pro — start learning today.