Error creating form bean of class form

今天遇到非正常错误,但用struts1开发项目

当出现错误的时候我马上检查了配置文件和相关类,

可是我没有发现错误,相关信息如下

XML配置

<form-beans>
<form-bean name="bbsColumnForm" type="com.websh.column.BbsColumnForm"/>
</form-beans>


<action-mappings>
<action path="/mana/bbs/bbsAction" type="com.websh.column.BbsColumnAction" name="bbsColumnForm" scope="request" validate="false">
<forward name="toadd" path="/mana/bbs/MyJsp.jsp" />
<forward name="search" path="/mana/bbs/bbs_columnManage.jsp" />
</action>
<action-mappings>



ACTIONFORM代码如下:

public class BbsColumnForm extends ActionForm {

private static final long serialVersionUID = 1L;

private long bbsColumnId;
private String bbsColumnName;
private String bbsColumnDes;
private String bbsColumnNotice;
private String parentId;
private String picture;
private long bzId;
private Date creationDate;
private long creationUserId;
private String flag;


public long getBbsColumnId() {
return bbsColumnId;
}

public void setBbsColumnId(long bbsColumnId) {
this.bbsColumnId = bbsColumnId;
}

public String getBbsColumnName() {
return bbsColumnName;
}

public void setBbsColumnName(String bbsColumnName) {
this.bbsColumnName = bbsColumnName;
}

public String getBbsColumnDes() {
return bbsColumnDes;
}

public void setBbsColumnDes(String bbsColumnDes) {
this.bbsColumnDes = bbsColumnDes;
}

public String getBbsColumnNotice() {
return bbsColumnNotice;
}

public void setBbsColumnNotice(String bbsColumnNotice) {
this.bbsColumnNotice = bbsColumnNotice;
}

public String getParentId() {
return parentId;
}

public void setParentId(String parentId) {
this.parentId = parentId;
}

public String getPicture() {
return picture;
}

public void setPicture(String picture) {
this.picture = picture;
}

public long getBzId() {
return bzId;
}

public void setBzId(long bzId) {
this.bzId = bzId;
}

public Date getCreationDate() {
return creationDate;
}

public void setCreationDate(Date creationDate) {
this.creationDate = creationDate;
}

public long getCreationUserId() {
return creationUserId;
}

public void setCreationUserId(long creationUserId) {
this.creationUserId = creationUserId;
}

public String getFlag() {
return flag;
}

public void setFlag(String flag) {
this.flag = flag;
}
}


当我调用ACTION时候,错误信息如下


严重: Error creating form bean of class com.websh.column.BbsColumnForm
java.lang.ClassNotFoundException: com.websh.column.BbsColumnForm
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1438)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:182)
at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:206)
at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:749)
at org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.java:359)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:505)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.websh.esp.common.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:80)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:843)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:679)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1293)
at java.lang.Thread.run(Thread.java:619)
2010-12-16 16:02:55 org.apache.struts.action.RequestProcessor processActionCreate
严重: No action instance for path /mana/bbs/bbsAction could be created
java.lang.ClassNotFoundException: com.websh.column.BbsColumnAction
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1438)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:182)
at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:206)
at org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcessor.java:324)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:268)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:505)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.websh.esp.common.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:80)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:843)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:679)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1293)
at java.lang.Thread.run(Thread.java:619)



原来不是我配置出现了问题,而是IDE没有编译我写的ACTION和ACTIONFORM,

去到发布后的项目的WEB-INF目录下的CLASS文件找这些类的.class文件,结果

没有找到。

搞半天才发现这个问题!!! 所以找不到FORM不一定是配置出错!!

-----------------------------------------------END
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值