Servlet execution threw an exception

tomcat使用Myeclipse6.5的jdk后,出现下面问题,改用 jdk1.6.0_33后没有问题了。
-------------------------------------------------------------------------




[DEBUG] [2014-10-22 11:09:47,556] (ModuleUtils.java:getModuleName:169)
Get module name for path /getOrgInfo.do


[DEBUG] [2014-10-22 11:09:47,556] (ModuleUtils.java:getModuleName:193)
Module name found: default


[DEBUG] [2014-10-22 11:09:47,557] (RequestProcessor.java:process:174)
Processing a 'GET' for path '/getOrgInfo'


[DEBUG] [2014-10-22 11:09:47,557] (RequestProcessor.java:processLocale:611)
 Setting user locale 'zh_CN'


[DEBUG] [2014-10-22 11:09:47,557] (RequestProcessor.java:processActionCreate:257)
 Looking for Action instance for class cn.com.sihitech.cc.common.struts.DBTranAction


[DEBUG] [2014-10-22 11:09:47,557] (RequestProcessor.java:processActionCreate:278)
  Creating new Action instance


[ INFO] [2014-10-22 11:09:47,604] (ApplicationContext.java:log:653)
Servlet execution threw an exception
![图片说明](https://img-ask.csdn.net/upload/201512/19/1450490730_314818.png) ![图片说明](https://img-ask.csdn.net/upload/201512/19/1450490844_611791.png) 这个错究竟是不是就是DBVisit.conn里面的错误啊?可是我找不到里面有什么错 public class DBConn { private static Connection conn=null; private static ResultSet st=null; private static PreparedStatement rs=null; static String driverName=null; static String dbURL=null; static String userName=null; static String password=null; static { try{ DBConn.class.getClassLoader(); //读取接口文件内的信息 InputStream in=ClassLoader.getSystemResourceAsStream("joggle.properties"); Properties prop=new Properties(); prop.load(in); driverName=prop.getProperty("driverName");//获取连接驱动 dbURL=prop.getProperty("dbURL");//获取端口口地址 userName=prop.getProperty("userName");//获取登录数据库时的名字 password=prop.getProperty("userPwd");//获取数据库身份验证的密码 Class.forName(driverName);//加载驱动 }catch(Exception e) { throw new ExceptionInInitializerError(e); } } public static Connection getConnection() throws SQLException //连接数据库 { return DriverManager.getConnection(dbURL, userName, password); } public static void release(Connection conn,Statement st,ResultSet rs )//释放数据库资源 { if(rs!=null) { try { rs.close(); }catch(Exception e) { e.printStackTrace(); } rs=null; } if(st!=null) { try { st.close(); }catch(Exception e) { e.printStackTrace(); } } if(conn!=null) { try{ conn.close(); }catch(Exception e) { e.printStackTrace(); } } } }
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页