By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,196 Members | 1,784 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,196 IT Pros & Developers. It's quick & easy.

JDBC exception on Hibernate data access

P: 8
hi everyone. I am trying to build a jsp using webwork, hibernate and mysql. And right now I am doing its unit testing. Everytime I run the test I am getting this error:

Error JDBC exception on Hibernate data access; nested exception is org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update

org.springframework.orm.hibernate3.HibernateJdbcEx ception: JDBC exception on Hibernate data access; nested exception is org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
Caused by: org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.handledN onSpecificException(
at org.hibernate.exception.SQLStateConverter.convert(
at org.hibernate.exception.JDBCExceptionHelper.conver t(
at org.hibernate.jdbc.AbstractBatcher.executeBatch(Ab
at org.hibernate.engine.ActionQueue.executeActions(Ac
at org.hibernate.engine.ActionQueue.executeActions(Ac
at org.hibernate.event.def.AbstractFlushingEventListe ner.performExecutions(AbstractFlushingEventListene
at org.hibernate.event.def.DefaultFlushEventListener. onFlush(
at org.hibernate.impl.SessionImpl.flush(SessionImpl.j ava:1000)
at org.hibernate.impl.SessionImpl.managedFlush(Sessio
at org.hibernate.transaction.JDBCTransaction.commit(J
at org.springframework.orm.hibernate3.HibernateTransa ctionManager.doCommit(HibernateTransactionManager. java:558)
at atformTransactionManager.processCommit(AbstractPla
at atformTransactionManager.commit(AbstractPlatformTr
at org.springframework.transaction.interceptor.Transa ctionAspectSupport.commitTransactionAfterReturning (
at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:117)
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed( :185)
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(
at $Proxy10.getStudy(Unknown Source)
at Caused by: java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed
at com.mysql.jdbc.SQLError.createSQLException(SQLErro
at com.mysql.jdbc.ServerPreparedStatement.executeBatc h(
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(
at org.hibernate.jdbc.AbstractBatcher.executeBatch(Ab

any idea what am I missing. and by the way I also have a sample-data in xml form as my temporary data storage in my unit test
Mar 27 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.