草庐IT

exception-derived

全部标签

java - org.hibernate.exception.ConstraintViolationException : Could not execute JDBC batch update

虽然数据已成功插入,但我得到了下面提到的堆栈跟踪。Hibernate:selectattendee_.attendeeId,attendee_.attendeeNameasattendee2_1_fromattendeeattendee_whereattendee_.attendeeId=?Hibernate:selectattendee_.attendeeId,attendee_.attendeeNameasattendee2_1_fromattendeeattendee_whereattendee_.attendeeId=?Hibernate:insertintoevent(eve

java - org.hibernate.exception.JDBCConnectionException : Could not open connection exception in MySQL

我已经在我的本地机器上设置了一个mysql实例,并将它与我在GAE上的javahibernate应用程序一起使用。它工作得很好,但从下午开始,它开始给我下面给出的错误。请帮我弄清楚如何解决这个问题。如果没有任何数据库事务,我被卡住了,无法继续执行代码。谢谢!org.hibernate.exception.JDBCConnectionException:Couldnotopenconnectionatorg.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.

php - PDO “Uncaught exception ' PDOException' .. 当其他无缓冲查询处于事件状态时无法执行查询。考虑使用 PDOStatement::fetchAll()。”

我知道这个问题已经被问过很多次了,但我已经阅读了很多问题的答案,但仍然不明白为什么我会收到这个错误:Fatalerror:Uncaughtexception'PDOException'withmessage'SQLSTATE[HY000]:Generalerror:2014Cannotexecutequerieswhileotherunbufferedqueriesareactive.ConsiderusingPDOStatement::fetchAll().Alternatively,ifyourcodeisonlyevergoingtorunagainstmysql,youmaye

java - com.mysql.jdbc.exceptions.jdbc4.CommunicationsException MySQL + Apache Tomcat 7

我的应用程序(Spring4MVC/Hibernate4/MySQL/Maven)使用基于注释的配置将Spring与Hibernate集成在一起。几个小时不使用数据库后,我总是看到这个错误:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Thelastpacketsuccessfullyreceivedfromtheserverwas84,510,841millisecondsago.Thelastpacketsentsuccessfullytotheserverwas84,510,841millisecondsago.i

MySQL 错误 : #1248 - Every derived table must have its own alias

如何通过设置别名来更正此错误?错误:#1248-每个派生表都必须有自己的别名SELECTentry_id,author_id,title,statusFROMexp_channel_titlesLEFTJOIN(SELECTentry_id,field_id_14,field_id_15,field_id_25,field_id_27,field_id_28,field_id_29,field_id_30,field_id_31,field_id_32,field_id_33,field_id_34,field_id_35FROMexp_channel_dataWHEREentry_i

php - 如何在mysql数据库连接中使用throw exception

这个问题在这里已经有了答案:TurningqueryerrorstoExceptionsinMySQLi[duplicate](3个答案)关闭3年前。我遇到过这个:-PHPErrorhandling:die()Vstrigger_error()VsthrowException理解抛出异常更好如何在此代码中替换die并在此处使用抛出异常:-

mysql - 在 MySQL 中替代 except

我必须在MySQL中编写这样的查询:SELECT*FROMTab1EXCEPTSELECT*FROMTab1WHEREint_attribute_of_Tab1>0但是MySQL不支持关键字EXCEPT。是否有标准模式可以正确使用另一个模拟MySQL中的except的运算符? 最佳答案 你可以使用NOTINSELECT*FROMTab1WHEREidNOTIN(SELECTidFROMTab1WHEREint_attribute_of_Tab1>0) 关于mysql-在MySQL中替代e

php - fatal error : Uncaught exception 'mysqli_sql_exception' with message 'No index used in query/prepared statement'

当我运行以下代码时,出现错误提示Fatalerror:Uncaughtexception'mysqli_sql_exception'withmessage'Noindexusedinquery/preparedstatement'$mysql=newmysqli(DB_SERVER,DB_USER,DB_PASSWORD,DB_NAME)ordie('Therewasaproblemconnectingtothedatabase');if(mysqli_connect_errno()){printf("DBerror:%s",mysqli_connect_error());exit()

mysql - com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException : in mysql

您好,我已经创建了jdbc程序,数据库是MySQL5.1我所有的friend也使用相同的数据库进行连接。我们所有人的连接总数变成了150。所以当我想连接更多时,我得到了以下错误com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:无法创建与数据库服务器的连接。尝试重新连接3次。放弃。如何解决这个错误。谢谢苏尼尔·库马尔·萨胡 最佳答案 我通过增加连接数解决了这个问题设置@@global.max_connections=1250;看看下面的链接http

java - "com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure"到远程数据库

我尝试连接到我的远程MySQL数据库,但失败并收到此错误。com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communicationslinkfailure疑惑的是我用MySQL-Front工具连接远程数据库时有效,能ping通IP地址。但是当我使用我的代码时,它会在大约十秒钟后显示错误。此外,当我在代码中使用错误的用户名或密码时,它会立即显示错误的验证。是不是证明连接没问题了?这是我的代码(它可以在我的本地主机数据库上运行):publicstaticvoidmain(String[]args){Stringurl="jd