473,408 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 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 6477

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

Similar topics

3
by: Yoandy Rodriguez | last post by:
I'm developing a J2EE aplication and the project leader told me to investigate about the Data Access Object design pattern. I did some research at Sun's blueprints for the enterprise site but there...
6
by: Hamed | last post by:
Hello I have employed as a developer in a software company that its team uses FoxPro / VB 6.0 / VC++ 6.0 as the developing tools and newly is going to migrate to VS.NET. There is a project...
0
by: sedefo | last post by:
I ran into this Microsoft Patterns & Practices Enterprise Library while i was researching how i can write a database independent data access layer. In my company we already use Data Access...
9
by: Tony Lee | last post by:
Some time a ago, on this newsgroup the following comments were made in recommending good references for Access (2003) >I used to recommend Dr. Rick Dobson's, "Programming Access <version>" for...
1
by: Adam Getchell | last post by:
Hello all, I'm writing a Parameter class (following Fowler's "Introduce Parameter Object") that accepts a stored procedure and key-value pairs to be passed to a data access class that will parse...
5
by: Alex | last post by:
Hi, I have an aspx file that creates a custom class object and calls a method which should return a DataSet. It throws a: Description: The application attempted to perform an operation not...
1
by: EO | last post by:
I am trying to use the MSFT data access application block on 3 machines. Machine 1: Sandbox environment; I installed the application block with the msi. The Sqlhelper class compiles & runs...
4
by: Paul Aspinall | last post by:
Hi I've previously constucted my .NET 1.1 data access, via a Data Access Layer (DAL), that was all in code. Now that I have access to the DataSet control in .NET 2.0, I'm looking for opinions...
0
by: Tim | last post by:
I am having the exact same problem as below. Has anyone found the solution for this? I believe the solutions lies somewhere in here:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.