大家帮忙看看这个jdbc代码,和出错信息?

gzhtcmliyaya 2006-03-13 06:56:03
import java.sql.*;

public class UseDriver {
public static void main(String[]args){
String url="jdbc:mysql://localhost/sql_test";
String userName="root";
String password="yese04";
String sql=null;
Connection conn=null;
Statement stmt=null;
//
try{
//load the driver class
Class.forName("com.mysql.jdbc.Driver");
}
catch(ClassNotFoundException e){
System.err.println("class not found");
}
//connect database
try{
conn=DriverManager.getConnection(url,userName,password);
//create statement
stmt=conn.createStatement();
//operation the database
sql="insert into student"+"values('20','jack','2000/02/03','beijing')";
//execute the statement
stmt.executeUpdate(sql);
System.out.println("inser successful");
}
catch(SQLException e){
System.err.println("insert sql error");
}
finally{
try{
stmt.close();
conn.close();
}
catch(SQLException e){
System.err.println("close error");
}
}
}
}

出错信息:

#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_FLT_STACK_CHECK (0xc0000092) at pc=0x00dd0618, pid=2960, tid=2964
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode)
# Problematic frame:
# v ~RuntimeStub::init_check_patching Runtime1 stub
#
# An error report file with more information is saved as hs_err_pid2960.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
...全文
58 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
zealVampire 2006-03-13
  • 打赏
  • 举报
回复
An error report file with more information is saved as hs_err_pid2960.log
jvm怎么出错了呢

具体看看那个log把
zx2002027 2006-03-13
  • 打赏
  • 举报
回复
不知道什么错误

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧