-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: SQL Error: 1393, SQLState: HY000
PostPosted: Mon Mar 15, 2010 4:47 am 
Newbie

Joined: Sat Oct 03, 2009 10:59 pm
Posts: 7
Dear friends,
I met lots of problems while using Hibernate, here is the biggest bug troubles me all day long.
Code:
(33125 ms) [http-8080-2] WARN : org.hibernate.util.JDBCExceptionReporter#logExceptions : SQL Error: 1393, SQLState: HY000
(33141 ms) [http-8080-2] ERROR: org.hibernate.util.JDBCExceptionReporter#logExceptions : Can not modify more than one base table through a join view 'tour.problem_hotel'
(33156 ms) [http-8080-2] ERROR: org.hibernate.event.def.AbstractFlushingEventListener#performExecutions : Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
   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.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:202)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
   at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297)
   at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985)
   at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:333)
   at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
   at com.tour.extension.SaveStrategyToDB.saveStrategyToDB(SaveStrategyToDB.java:29)
   at com.tour.extension.Transform.<init>(Transform.java:106)
   at com.tour.struts.actionFrontstage.ExtensionTransformAction.execute(ExtensionTransformAction.java:54)
   at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
   at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
   at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at com.tour.util.EncodingFilter.doFilter(EncodingFilter.java:36)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.BatchUpdateException: Can not modify more than one base table through a join view 'tour.problem_hotel'
   at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1669)
   at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1085)
   at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
   at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195)
   ... 31 more

Firstly, I just read data from the view 'tour.problem_hotel', but never delete or update data from the view.
Secondly, aroud the 29th line of 'SaveStrategyToDB.java' is as follow,
Code:
try{
         Transaction tx_1 = session.beginTransaction();
         session.createQuery("delete from PizzaTable").executeUpdate();
         tx_1.commit();
      }catch(RuntimeException e){
         e.printStackTrace();
      }

So....what's the problems? Anybody help me? Many thanks.

Regards,
Iwill.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.