rg.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
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:139)
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 tgcom.hibernate.yb.TgsEnterpriseCountinfoDAO.save(TgsEnterpriseCountinfoDAO.java:68)
at tgcom.struts.yb.action.TgsEnterpriseCountinfoAction.execute(TgsEnterpriseCountinfoAction.java:42)
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:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.BatchUpdateException: ORA-01747: 无效的用户.表.列,表.列,或列规格
at oracle.jdbc.dbaccess.DBError.throwBatchUpdateException(DBError.java:459)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:4210)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195)
... 29 more
引用
因为出现了与数据库重命名的问题。如User.java就不能利用hibernate自动生成user表,需要制定特定的表如table="user1"
分享到:
相关推荐
警告: SQL Error: 156, ...org.hibernate.exception.SQLGrammarException: could not execute query org.hibernate.util.JDBCExceptionReporter logExceptions 严重: 关键字 'user' 附近有语法错误。 的解决方案。
Exception in thread "main" org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update 或者org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not insert: ...
nested exception is org.hibernate.exception.SQLGrammarException: could not execute query 这个错误是由于SQL语句有错误,导致查询失败。解决方法是检查SQL语句的正确性,确保语句正确无误。 4. 严重: Error ...
### 错误四:`org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update` **错误现象**: 在执行数据库批量操作时,Hibernate抛出`SQLGrammarException`,表明SQL语法错误或数据库不支持...
nested exception is org.hibernate.exception.SQLGrammarException: could not execute query` 这个异常表明执行SQL查询时出现了语法错误。检查并修正相关的SQL语句,确保其符合SQL语法规范,并且与数据库表结构...
3. **Exception in thread "main" org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update** Hibernate在执行数据库批处理更新时出现SQL语法错误,可能是由于数据库表不存在或结构不符...
在这个场景中,异常的根因是嵌套的“org.hibernate.exception.SQLGrammarException: could not execute query”,这是Hibernate在处理SQL语句时抛出的异常,通常与SQL语法错误或表结构不匹配有关。当从SQL Server...
nested exception is org.hibernate.exception.SQLGrammarException: could not execute query ``` **问题描述:** 这通常是因为Hibernate执行SQL查询时遇到了语法错误或者数据表结构不匹配等问题。 **解决方法:...
### 错误三:Could not execute JDBC batch update; nested exception is org.hibernate.exception.ConstraintViolationException 此错误表示在执行批量更新操作时违反了数据库约束,可能是外键约束、唯一性约束等...
### Hibernate参考手册中文版知识点概览 #### 一、简介 Hibernate是一款开源的对象关系映射(Object Relational Mapping,简称ORM)框架,它为Java应用提供了对数据库的持久化操作支持,极大地简化了数据访问层的...
- **批处理**: 通过设置`hibernate.jdbc.batch_size`等参数优化。 - **缓存策略**: 合理使用缓存级别和缓存区域。 - **查询优化**: 通过索引、SQL优化等方式提高查询效率。 #### 十、扩展与定制 - **拦截器...
### Hibernate 3.2 官方用户手册知识点详解 #### 一、概述 Hibernate 是一款开源的对象关系映射 (ORM) 工具,用于 Java 应用程序与数据库交互。它能够将 Java 对象自动持久化到关系型数据库中,从而简化了数据访问...
在软件开发领域,尤其是涉及到关系型数据库管理和ORM(对象关系映射)框架如Hibernate时,开发者经常遇到各种查询问题。本案例中,开发者遇到了一个与Hibernate映射配置文件相关的异常,该异常涉及到不支持的“union...
- **JDBCConnectionException**:当使用 JDBC 遇到连接问题时,如无法建立连接或连接超时等,可能会抛出此异常。 - **SQLGrammarException**:如果执行的 SQL 语句语法有误,则会抛出该异常。 - **...