当前位置: 技术问答>java相关
resin支持连接池吗?为什么我的连接池报错??高分悬赏!!
来源: 互联网 发布时间:2015-04-07
本文导语: 在jsp文件内使用javabean 在执行的时候:报错!! 500 Servlet Exception /upload/Result_kj.jsp:3: cannot resolve symbol symbol : class PoolBean location: class _jsp._upload._Result_0kj__jsp PoolBean poolBean; ^ /upload/Result_kj.jsp:5:...
在jsp文件内使用javabean
在执行的时候:报错!!
500 Servlet Exception
/upload/Result_kj.jsp:3: cannot resolve symbol
symbol : class PoolBean
location: class _jsp._upload._Result_0kj__jsp
PoolBean poolBean;
^
/upload/Result_kj.jsp:5: cannot resolve symbol
symbol : class PoolBean
location: class _jsp._upload._Result_0kj__jsp
poolBean = (PoolBean) application.getAttribute("poolBean");
^
/upload/Result_kj.jsp:7: cannot resolve symbol
symbol : class PoolBean
location: class _jsp._upload._Result_0kj__jsp
poolBean = new PoolBean();
^
Note: C:RESINRESIN1.3.S001117work_jsp_upload_Result_0kj__jsp.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
3 errors
这个bean是可以使的,以前在tomcat上就可以.不知为什么到这就不行了?好像是在编译阶段报的错,但是分析不出原因!!
还有就是我用一般的连接方法也无法查询数据库!!服了!!
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:db");
他提示为:
500 Servlet Exception
java.sql.SQLException: [Microsoft][ODBC q¨? ?h] ^??8?
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6031)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6188)
at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(JdbcOdbc.java:3266)
at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(JdbcOdbcResultSet.java:5398)
at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:326)
at _jsp._upload._edit_0text__jsp._jspService(/upload/edit_text.jsp:34)
at com.caucho.jsp.JavaPage.service(JavaPage.java:89)
at com.caucho.jsp.JavaPage.subservice(JavaPage.java:83)
at com.caucho.jsp.Page.service(Page.java:334)
at com.caucho.jsp.QServlet.service(QServlet.java:163)
at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:84)
at com.caucho.server.http.Invocation.service(Invocation.java:248)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:145)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:211)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:145)
at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
at java.lang.Thread.run(Thread.java:484)
我就写了一个很简单的sql表达式(测试用).数据库中绝对有这条纪录!!怎么回事呢??
在执行的时候:报错!!
500 Servlet Exception
/upload/Result_kj.jsp:3: cannot resolve symbol
symbol : class PoolBean
location: class _jsp._upload._Result_0kj__jsp
PoolBean poolBean;
^
/upload/Result_kj.jsp:5: cannot resolve symbol
symbol : class PoolBean
location: class _jsp._upload._Result_0kj__jsp
poolBean = (PoolBean) application.getAttribute("poolBean");
^
/upload/Result_kj.jsp:7: cannot resolve symbol
symbol : class PoolBean
location: class _jsp._upload._Result_0kj__jsp
poolBean = new PoolBean();
^
Note: C:RESINRESIN1.3.S001117work_jsp_upload_Result_0kj__jsp.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
3 errors
这个bean是可以使的,以前在tomcat上就可以.不知为什么到这就不行了?好像是在编译阶段报的错,但是分析不出原因!!
还有就是我用一般的连接方法也无法查询数据库!!服了!!
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:db");
他提示为:
500 Servlet Exception
java.sql.SQLException: [Microsoft][ODBC q¨? ?h] ^??8?
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6031)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6188)
at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(JdbcOdbc.java:3266)
at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(JdbcOdbcResultSet.java:5398)
at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:326)
at _jsp._upload._edit_0text__jsp._jspService(/upload/edit_text.jsp:34)
at com.caucho.jsp.JavaPage.service(JavaPage.java:89)
at com.caucho.jsp.JavaPage.subservice(JavaPage.java:83)
at com.caucho.jsp.Page.service(Page.java:334)
at com.caucho.jsp.QServlet.service(QServlet.java:163)
at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:84)
at com.caucho.server.http.Invocation.service(Invocation.java:248)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:145)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:211)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:145)
at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
at java.lang.Thread.run(Thread.java:484)
我就写了一个很简单的sql表达式(测试用).数据库中绝对有这条纪录!!怎么回事呢??
|
第一个估计是PoolBean没有import,第二个看不懂ODBC q¨ ? ?h] ^??8?,屏幕上就是这样啊?