ResultSet作参数的函数,在函数体中使用这个rs怎么会出错?

starwalker a SE  2006-03-21 05:00:39
public class BanJi
{
String BJ;
String BZ;

BanJi(ResultSet rs)
{
BJ = new String(rs.getParameter("BJ"));
BZ = new String(rs.getParameter("BZ"));
}
}

以上BanJi函数怎么会出错?
错误如下:
type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:598)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:147)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:315)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

java.lang.ClassNotFoundException: org.apache.jsp.admin_jsp
java.net.URLClassLoader$1.run(URLClassLoader.java:200)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:133)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65)
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:596)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:147)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:315)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.15 logs.
...全文
74 点赞 收藏 5
写回复
5 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
starwalker 2006-03-22
呵呵
难怪啊!
回复
yuzl32 2006-03-22
LZ醒醒啊,ResultSet 有这个方法吗? getParameter
回复
starwalker 2006-03-22
这个是编译的时候就出错了
回复
minghangw 2006-03-22
rs使用之前先rs.next()一下看看结果如何
回复
bluelily22 2006-03-21
ResultSet 和Statement一块存在的,如果stmtatement被回收 ResultSet也会被回收的

建议楼主用arrayList和hashmap构造一个rs,做为参数传进去
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

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