472,110 Members | 2,207 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,110 software developers and data experts.

JDBC exception on Hibernate data access

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(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert( SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.conver t(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(Ab stractBatcher.java:249)
at org.hibernate.engine.ActionQueue.executeActions(Ac tionQueue.java:235)
at org.hibernate.engine.ActionQueue.executeActions(Ac tionQueue.java:140)
at org.hibernate.event.def.AbstractFlushingEventListe ner.performExecutions(AbstractFlushingEventListene r.java:298)
at org.hibernate.event.def.DefaultFlushEventListener. onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.j ava:1000)
at org.hibernate.impl.SessionImpl.managedFlush(Sessio nImpl.java:338)
at org.hibernate.transaction.JDBCTransaction.commit(J DBCTransaction.java:106)
at org.springframework.orm.hibernate3.HibernateTransa ctionManager.doCommit(HibernateTransactionManager. java:558)
at org.springframework.transaction.support.AbstractPl atformTransactionManager.processCommit(AbstractPla tformTransactionManager.java:540)
at org.springframework.transaction.support.AbstractPl atformTransactionManager.commit(AbstractPlatformTr ansactionManager.java:510)
at org.springframework.transaction.interceptor.Transa ctionAspectSupport.commitTransactionAfterReturning (TransactionAspectSupport.java:310)
at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:117)
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :185)
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:209)
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 r.java:910)
at com.mysql.jdbc.ServerPreparedStatement.executeBatc h(ServerPreparedStatement.java:547)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch( BatchingBatcher.java:48)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(Ab stractBatcher.java:242)

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
0 6308

Post your reply

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

Similar topics

3 posts views Thread by Yoandy Rodriguez | last post: by
9 posts views Thread by Tony Lee | last post: by
1 post views Thread by Adam Getchell | last post: by
4 posts views Thread by Paul Aspinall | last post: by
reply views Thread by Tim | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.