大家帮偶看看这是什么错误啊?谢谢!!再谢谢咯!!!

yu145 2004-09-21 03:49:46
javax.servlet.ServletException: tree.GuardForceBean.getWorkgroupy()Ljava/util/ArrayList;
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp.try_jsp._jspService(try_jsp.java:118)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)


root cause

java.lang.NoSuchMethodError: tree.GuardForceBean.getWorkgroupy()Ljava/util/ArrayList;
org.apache.jsp.try_jsp._jspService(try_jsp.java:74)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

...全文
55 点赞 收藏 3
写回复
3 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
yu145 2004-09-21
帮帮忙啊~~~~~~
帮这顶一下吧。。。
谢咯
回复
yu145 2004-09-21
try {

// write it out as XML (if not already present)
Mapping map = new Mapping();
map.loadMapping("mapping.xml");
File file = new File("test.xml");


// restore the value from XML
Reader reader = new FileReader(file);
Unmarshaller unmarshaller = new Unmarshaller(map);
GuardForceBean read = (GuardForceBean)unmarshaller.unmarshal(reader);
//Workgroupy

Iterator W_iter = read.getWorkgroupy().iterator();

while (W_iter.hasNext()){
WorkgroupBean workgroup = (WorkgroupBean)W_iter.next();
Iterator g_iter = workgroup.getGroups().iterator();
while (g_iter.hasNext()){




GroupBean group = (GroupBean)g_iter.next();
temname=group.getName();
temips=group.getIpstart();
temipe=group.getIpend();

n=n+1;
}
}
}catch (IOException ex) {
ex.printStackTrace(System.err);
} catch (MappingException ex) {
ex.printStackTrace(System.err);
} catch (MarshalException ex) {
ex.printStackTrace(System.err);
} catch (ValidationException ex) {
ex.printStackTrace(System.err);
}

我JSP里有这段代码,也有GuardForceBean这个BEAN,里面也有getWorkgroupy()。
这是怎么回事啊?帮帮我咯,谁叫我菜呢!谢谢!!
回复
rosen 2004-09-21
没有这个方法:tree.GuardForceBean.getWorkgroupy()
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2004-09-21 03:49
社区公告
暂无公告