mysql中的连续数据_MySQL 中连续插入数据出现的问题

我是在spring+hibernate+struts的基础上做了一个插入数据的测试首先我把MySQL默认的max_connections修改为2000然后做了一个i<1000的循环来连续插入数据然后我发现每次插入146条后就出...

我是在spring+hibernate+struts的基础上做了一个插入数据的测试

首先我把 MySQL默认的 max_connections 修改为 2000

然后做了一个 i<1000 的循环来连续插入数据

然后我发现每次插入 146 条后就出现以下错误:

2009-01-19 15:54:54,140 INFO [org.hibernate.cfg.SettingsFactory] - Echoing all SQL to stdout

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: Java heap space

Caused by: java.lang.OutOfMemoryError: Java heap space

2009-01-19 15:54:54,546 INFO [org.hibernate.cfg.SettingsFactory] - Statistics: disabled

2009-01-19 15:54:54,546 INFO [org.hibernate.cfg.SettingsFactory] - Deleted entity synthetic identifier rollback: disabled

2009-01-19 15:54:54,546 INFO [org.hibernate.cfg.SettingsFactory] - Default entity-mode: pojo

2009-01-19 15:54:54,546 INFO [org.hibernate.cfg.SettingsFactory] - Named query checking : enabled

2009-01-19 15:54:58,203 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@aea944: defining beans [dataBaseConnectioin,sessionFactory,hibernateTemplate,test,admindao,admindaoimpl,adminaction,memberdao,memberdaoimpl,memberaction,logindao,logindaoimpl,logincheck,authdao,authdaoimpl,authaction,admingroupauthdao,admingroupauthdaoimpl,admingroupdao,admingroupdaoimpl,admingroupaction,keygroupdao,keygroupdaoimpl,keygroupaction,keyauthdao,keyauthdaoimpl,keydao,keydaoimpl,keyaction,userkeyaction,areadao,areadaoimpl,areaplusdao,areaplusdaoimpl,useraction,ukeyaction]; root of factory hierarchy

请各位大侠指教,谢谢!

展开

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值