Hello,
I've got a curious problem.
I'm using Hibernate-Version: 3.1.3 with mysql 5 and the driver connection org.gjt.mm.mysql.Driver
I've got a web application that works fine, the forms are posted correctly, objects inserted in the database but sometimes like once a month I've got this error :
Code:
1205 : could not insert [miju.game.business.bean.Furniture]
org.hibernate.exception.GenericJDBCException : could not insert: [miju.game.business.bean.Furniture] at
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103) at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91) at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1986) at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2405) at
org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:37) at
org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248) at
org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java :269) at
org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167) at
org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:101) at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186) at
org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33) at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java : 175) at
org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27) at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70) at
org.hibernate.impl.SessionImpl.fireSave(SessionImpl:530) at
org.hibernate.impl.SessionImpl.save(SessionImpl.java:518) at
org.hibernate.impl.SessionImpl.save(SessionImpl.java:514) at
If I refresh the page so I get back on the web page, enter exactly the same informations, the insertion work just fine.
I suspect a connection problem, hibernate might lose the connection for some reason but I really don't know.
Here are my configuration file
Code:
hibernate.dialect org.hibernate.dialect.MySQLDialect
hibernate.connection.driver_class org.gjt.mm.mysql.Driver
hibernate.connection.url jdbc:mysql://10.170.1.210:3306/datas
hibernate.dbcp.maxActive 10
hibernate.dbcp.whenExhaustedAction 1
hibernate.dbcp.maxWait 20000
hibernate.dbcp.maxIdle 5
hibernate.transaction.auto_close_session=false
hibernate.dbcp.validationQuery select 1 from dual
hibernate.dbcp.testOnBorrow true
hibernate.dbcp.testOnReturn true
hibernate.show_sql true
hibernate.connection.isolation 2
hibernate.jdbc.batch_size 0
hibernate.jdbc.batch_versioned_data true
hibernate.jdbc.use_streams_for_binary true
hibernate.max_fetch_depth 1
hibernate.cglib.use_reflection_optimizer false
hibernate.cache.use_second_level_cache false
The connection timeout is set to 28800 seconds on mysql
So if you have got any ideas on how could I produce this system crash so I can correct it or even better if you have the answer that would be great.
If you need more informations tell me I'll post it.
Thank you in advance !