You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Ron H <be...@gmail.com> on 2009/11/18 10:47:55 UTC

Error calling Connection.setAutoCommit:

hi
randomly, i get the following exception:
18/11/2009 03:18:49 ERROR Connection:19 - Error calling
Connection.setAutoCommit:
com.mysql.jdbc.CommunicationsException: Communications link failure due to
underlying exception:

** BEGIN NESTED EXCEPTION **

java.io.EOFException

STACKTRACE:

java.io.EOFException
       at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1934)

my configuration file is:
<environments default="development">
		<environment id="development">
			<transactionManager type="JDBC" />
			<dataSource type="POOLED">
				<property name="driver" value="${driver}" />
				<property name="url" value="${url}" />
				<property name="username" value="${username}" />
				<property name="password" value="${password}" />
				<property name="poolPingQuery" value="select 1 from DUAL" />
				<property name="poolPingEnabled" value="true" />
			</dataSource>
		</environment>
	</environments>
it reopen the connection and things are working. i am just wondering how
does it happen? how can i prevent it from happening?
-- 
View this message in context: http://old.nabble.com/Error-calling-Connection.setAutoCommit%3A-tp26405013p26405013.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


RE: Error calling Connection.setAutoCommit:

Posted by meindert <me...@eduflex.com>.
Yes, but I think that might be a red herring. How many rows do you have in
DUAL?

  my (spring) datasource is;
      <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
		<property name="driverClassName" value="${database_driver}"
/>
		<property name="url" value="${database_url}" />
		<property name="username" value="${database_user}" />
		<property name="password" value="${database_password}" />
		<property name="defaultAutoCommit" value="true"/>
		<property name="defaultTransactionIsolation" value="2"/>
		<property name="maxActive" value="10"/>
		<property name="removeAbandoned" value="true"/>
		<property name="removeAbandonedTimeout" value="30"/>
		<property name="logAbandoned" value="false"/>
		<property name="validationQuery" value="select top 1
DealerCode from Dealer"/>
	</bean>


-----Original Message-----
From: Ron H [mailto:be.special@gmail.com] 
Sent: 18 November 2009 01:24 PM
To: user-java@ibatis.apache.org
Subject: RE: Error calling Connection.setAutoCommit:


thanks
do you use it instead of:
<property name="poolPingQuery" value="select 1 from DUAL" />
<property name="poolPingEnabled" value="true" /> 


meindert-3 wrote:
> 
> Not sure what the difference is, but I'm using the validationQuery
> property
> to check the connection;
> <property name="validationQuery" value=" select top 1 'niks' from DUAL "/>
> 
> The second thing I noticed is that 'select 1 from DUAL' will return all
> rows
> in DUAL, shouldn't you use 'select top 1 * from DUAL'
> 
> -----Original Message-----
> From: Ron H [mailto:be.special@gmail.com] 
> Sent: 18 November 2009 11:48 AM
> To: user-java@ibatis.apache.org
> Subject: Error calling Connection.setAutoCommit:
> 
> 
> hi
> randomly, i get the following exception:
> 18/11/2009 03:18:49 ERROR Connection:19 - Error calling
> Connection.setAutoCommit:
> com.mysql.jdbc.CommunicationsException: Communications link failure due to
> underlying exception:
> 
> ** BEGIN NESTED EXCEPTION **
> 
> java.io.EOFException
> 
> STACKTRACE:
> 
> java.io.EOFException
>        at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1934)
> 
> my configuration file is:
> <environments default="development">
> 		<environment id="development">
> 			<transactionManager type="JDBC" />
> 			<dataSource type="POOLED">
> 				<property name="driver" value="${driver}" />
> 				<property name="url" value="${url}" />
> 				<property name="username"
> value="${username}" />
> 				<property name="password"
> value="${password}" />
> 				<property name="poolPingQuery" value="select
> 1 from DUAL" />
> 				<property name="poolPingEnabled"
> value="true" />
> 			</dataSource>
> 		</environment>
> 	</environments>
> it reopen the connection and things are working. i am just wondering how
> does it happen? how can i prevent it from happening?
> -- 
> View this message in context:
>
http://old.nabble.com/Error-calling-Connection.setAutoCommit%3A-tp26405013p2
> 6405013.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
> 
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 9.0.707 / Virus Database: 270.14.67/2505 - Release Date: 11/17/09
> 21:26:00
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
> 
> 
> 

-- 
View this message in context:
http://old.nabble.com/Error-calling-Connection.setAutoCommit%3A-tp26405013p2
6406158.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.707 / Virus Database: 270.14.67/2505 - Release Date: 11/17/09
21:26:00


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


RE: Error calling Connection.setAutoCommit:

Posted by Ron H <be...@gmail.com>.
thanks
do you use it instead of:
<property name="poolPingQuery" value="select 1 from DUAL" />
<property name="poolPingEnabled" value="true" /> 


meindert-3 wrote:
> 
> Not sure what the difference is, but I'm using the validationQuery
> property
> to check the connection;
> <property name="validationQuery" value=" select top 1 'niks' from DUAL "/>
> 
> The second thing I noticed is that 'select 1 from DUAL' will return all
> rows
> in DUAL, shouldn't you use 'select top 1 * from DUAL'
> 
> -----Original Message-----
> From: Ron H [mailto:be.special@gmail.com] 
> Sent: 18 November 2009 11:48 AM
> To: user-java@ibatis.apache.org
> Subject: Error calling Connection.setAutoCommit:
> 
> 
> hi
> randomly, i get the following exception:
> 18/11/2009 03:18:49 ERROR Connection:19 - Error calling
> Connection.setAutoCommit:
> com.mysql.jdbc.CommunicationsException: Communications link failure due to
> underlying exception:
> 
> ** BEGIN NESTED EXCEPTION **
> 
> java.io.EOFException
> 
> STACKTRACE:
> 
> java.io.EOFException
>        at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1934)
> 
> my configuration file is:
> <environments default="development">
> 		<environment id="development">
> 			<transactionManager type="JDBC" />
> 			<dataSource type="POOLED">
> 				<property name="driver" value="${driver}" />
> 				<property name="url" value="${url}" />
> 				<property name="username"
> value="${username}" />
> 				<property name="password"
> value="${password}" />
> 				<property name="poolPingQuery" value="select
> 1 from DUAL" />
> 				<property name="poolPingEnabled"
> value="true" />
> 			</dataSource>
> 		</environment>
> 	</environments>
> it reopen the connection and things are working. i am just wondering how
> does it happen? how can i prevent it from happening?
> -- 
> View this message in context:
> http://old.nabble.com/Error-calling-Connection.setAutoCommit%3A-tp26405013p2
> 6405013.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
> 
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 9.0.707 / Virus Database: 270.14.67/2505 - Release Date: 11/17/09
> 21:26:00
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Error-calling-Connection.setAutoCommit%3A-tp26405013p26406158.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


RE: Error calling Connection.setAutoCommit:

Posted by meindert <me...@eduflex.com>.
Not sure what the difference is, but I'm using the validationQuery property
to check the connection;
<property name="validationQuery" value=" select top 1 'niks' from DUAL "/>

The second thing I noticed is that 'select 1 from DUAL' will return all rows
in DUAL, shouldn't you use 'select top 1 * from DUAL'

-----Original Message-----
From: Ron H [mailto:be.special@gmail.com] 
Sent: 18 November 2009 11:48 AM
To: user-java@ibatis.apache.org
Subject: Error calling Connection.setAutoCommit:


hi
randomly, i get the following exception:
18/11/2009 03:18:49 ERROR Connection:19 - Error calling
Connection.setAutoCommit:
com.mysql.jdbc.CommunicationsException: Communications link failure due to
underlying exception:

** BEGIN NESTED EXCEPTION **

java.io.EOFException

STACKTRACE:

java.io.EOFException
       at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1934)

my configuration file is:
<environments default="development">
		<environment id="development">
			<transactionManager type="JDBC" />
			<dataSource type="POOLED">
				<property name="driver" value="${driver}" />
				<property name="url" value="${url}" />
				<property name="username"
value="${username}" />
				<property name="password"
value="${password}" />
				<property name="poolPingQuery" value="select
1 from DUAL" />
				<property name="poolPingEnabled"
value="true" />
			</dataSource>
		</environment>
	</environments>
it reopen the connection and things are working. i am just wondering how
does it happen? how can i prevent it from happening?
-- 
View this message in context:
http://old.nabble.com/Error-calling-Connection.setAutoCommit%3A-tp26405013p2
6405013.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.707 / Virus Database: 270.14.67/2505 - Release Date: 11/17/09
21:26:00


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org