JDBC exception on Hibernate data access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • neuraljay
    New Member
    • Jan 2008
    • 8

    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.e xception.Generi cJDBCException: Could not execute JDBC batch update

    org.springframe work.orm.hibern ate3.HibernateJ dbcException: JDBC exception on Hibernate data access; nested exception is org.hibernate.e xception.Generi cJDBCException: Could not execute JDBC batch update
    Caused by: org.hibernate.e xception.Generi cJDBCException: Could not execute JDBC batch update
    at org.hibernate.e xception.SQLSta teConverter.han dledNonSpecific Exception(SQLSt ateConverter.ja va:103)
    at org.hibernate.e xception.SQLSta teConverter.con vert(SQLStateCo nverter.java:91 )
    at org.hibernate.e xception.JDBCEx ceptionHelper.c onvert(JDBCExce ptionHelper.jav a:43)
    at org.hibernate.j dbc.AbstractBat cher.executeBat ch(AbstractBatc her.java:249)
    at org.hibernate.e ngine.ActionQue ue.executeActio ns(ActionQueue. java:235)
    at org.hibernate.e ngine.ActionQue ue.executeActio ns(ActionQueue. java:140)
    at org.hibernate.e vent.def.Abstra ctFlushingEvent Listener.perfor mExecutions(Abs tractFlushingEv entListener.jav a:298)
    at org.hibernate.e vent.def.Defaul tFlushEventList ener.onFlush(De faultFlushEvent Listener.java:2 7)
    at org.hibernate.i mpl.SessionImpl .flush(SessionI mpl.java:1000)
    at org.hibernate.i mpl.SessionImpl .managedFlush(S essionImpl.java :338)
    at org.hibernate.t ransaction.JDBC Transaction.com mit(JDBCTransac tion.java:106)
    at org.springframe work.orm.hibern ate3.HibernateT ransactionManag er.doCommit(Hib ernateTransacti onManager.java: 558)
    at org.springframe work.transactio n.support.Abstr actPlatformTran sactionManager. processCommit(A bstractPlatform TransactionMana ger.java:540)
    at org.springframe work.transactio n.support.Abstr actPlatformTran sactionManager. commit(Abstract PlatformTransac tionManager.jav a:510)
    at org.springframe work.transactio n.interceptor.T ransactionAspec tSupport.commit TransactionAfte rReturning(Tran sactionAspectSu pport.java:310)
    at org.springframe work.transactio n.interceptor.T ransactionInter ceptor.invoke(T ransactionInter ceptor.java:117 )
    at org.springframe work.aop.framew ork.ReflectiveM ethodInvocation .proceed(Reflec tiveMethodInvoc ation.java:185)
    at org.springframe work.aop.framew ork.JdkDynamicA opProxy.invoke( JdkDynamicAopPr oxy.java:209)
    at $Proxy10.getStu dy(Unknown Source)
    at Caused by: java.sql.SQLExc eption: Connection is read-only. Queries leading to data modification are not allowed
    at com.mysql.jdbc. SQLError.create SQLException(SQ LError.java:910 )
    at com.mysql.jdbc. ServerPreparedS tatement.execut eBatch(ServerPr eparedStatement .java:547)
    at org.hibernate.j dbc.BatchingBat cher.doExecuteB atch(BatchingBa tcher.java:48)
    at org.hibernate.j dbc.AbstractBat cher.executeBat ch(AbstractBatc her.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
Working...