<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "MySQLNonTransientConnectionException"]]></title>
		<link>http://www.andowson.com/posts/list/7.page</link>
		<description><![CDATA[Latest messages posted in the topic "MySQLNonTransientConnectionException"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>MySQLNonTransientConnectionException</title>
				<description><![CDATA[ 我的论坛也是jforum,几个小时没人访问以后，再访问就会出现下面错误：<br /> <br /> <br /> An error has occurred.<br /> <br /> For detailed error information, please see the HTML source code, and contact the forum Administrator.<br /> <br /> com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Communications link failure<br /> <br /> Last packet sent to the server was 0 ms ago.<br /> <br /> Query being executed when exception was thrown:<br /> <br /> SELECT COUNT(pm.privmsgs_to_userid) AS private_messages, u.* FROM jforum_users u LEFT JOIN jforum_privmsgs pm ON pm.privmsgs_type = 1 AND pm.privmsgs_to_userid = u.user_id WHERE u.user_id = 1 GROUP BY pm.privmsgs_to_userid<br /> <br /> <br /> 我是Tomcat 5.5 +  mysql <br /> <br /> Thanks!]]></description>
				<guid isPermaLink="true">http://www.andowson.com/posts/preList/237/364.page</guid>
				<link>http://www.andowson.com/posts/preList/237/364.page</link>
				<pubDate><![CDATA[Thu, 24 Apr 2008 12:08:15]]> GMT</pubDate>
				<author><![CDATA[ lynx286]]></author>
			</item>
			<item>
				<title>回覆:MySQLNonTransientConnectionException</title>
				<description><![CDATA[ 以下是右键察看源文件的错误信息：<br /> <br /> &lt;!-- BEGIN ERROR STACK TRACE<br /> net.jforum.exceptions.DatabaseException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Communications link failure<br /> <br /> Last packet sent to the server was 1 ms ago.<br /> <br /> Query being executed when exception was thrown:<br /> <br /> SELECT COUNT(pm.privmsgs_to_userid) AS private_messages, u.* FROM jforum_users u LEFT JOIN jforum_privmsgs pm ON pm.privmsgs_type = 1 AND pm.privmsgs_to_userid = u.user_id WHERE u.user_id = 1 GROUP BY pm.privmsgs_to_userid<br /> 	at sun.reflect.GeneratedConstructorAccessor114.newInstance(Unknown Source)<br /> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)<br /> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)<br /> 	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)<br /> 	at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)<br /> 	at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3134)<br /> 	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1818)<br /> 	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1961)<br /> 	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2543)<br /> 	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1737)<br /> 	at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1888)<br /> 	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)<br /> 	at net.jforum.dao.generic.GenericUserDAO.selectById(GenericUserDAO.java:136)<br /> 	at net.jforum.repository.SecurityRepository.load(SecurityRepository.java:94)<br /> 	at net.jforum.repository.SecurityRepository.load(SecurityRepository.java:112)<br /> 	at net.jforum.JForum.service(JForum.java:163)<br /> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)<br /> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)<br /> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br /> 	at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59)<br /> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)<br /> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br /> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)<br /> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)<br /> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)<br /> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)<br /> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)<br /> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)<br /> 	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)<br /> 	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)<br /> 	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)<br /> 	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)<br /> 	at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)<br /> 	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)<br /> 	at java.lang.Thread.run(Thread.java:619)<br /> Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Communications link failure<br /> <br /> Last packet sent to the server was 1 ms ago.<br /> <br /> Query being executed when exception was thrown:<br /> <br /> SELECT COUNT(pm.privmsgs_to_userid) AS private_messages, u.* FROM jforum_users u LEFT JOIN jforum_privmsgs pm ON pm.privmsgs_type = 1 AND pm.privmsgs_to_userid = u.user_id WHERE u.user_id = 1 GROUP BY pm.privmsgs_to_userid<br /> 	... 35 more<br /> <br /> URL is: /forums/list.page?null<br /> END ERROR STACK TRACE--&gt;<br /> <br /> 	&lt;html&gt;<br /> 	&lt;head&gt;<br /> 	&lt;title&gt;Error&lt;/title&gt;<br /> 	&lt;/head&gt;<br /> 	&lt;body&gt;<br /> 	&lt;p style="color:red; font-weight:bold"&gt;An error has occurred.&lt;/p&gt;&lt;p&gt;For detailed error information, please see the HTML source code, and contact the forum Administrator.&lt;/p&gt;&lt;pre class="pre-error"&gt;&lt;i&gt;com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Communications link failure<br /> <br /> Last packet sent to the server was 1 ms ago.<br /> <br /> Query being executed when exception was thrown:<br /> <br /> SELECT COUNT(pm.privmsgs_to_userid) AS private_messages, u.* FROM jforum_users u LEFT JOIN jforum_privmsgs pm ON pm.privmsgs_type = 1 AND pm.privmsgs_to_userid = u.user_id WHERE u.user_id = 1 GROUP BY pm.privmsgs_to_userid&lt;/i&gt;&lt;/pre&gt;<br /> 	&lt;/body&gt;<br /> 	&lt;/html&gt;<br /> <br /> ]]></description>
				<guid isPermaLink="true">http://www.andowson.com/posts/preList/237/365.page</guid>
				<link>http://www.andowson.com/posts/preList/237/365.page</link>
				<pubDate><![CDATA[Thu, 24 Apr 2008 13:25:37]]> GMT</pubDate>
				<author><![CDATA[ lynx286]]></author>
			</item>
			<item>
				<title>回覆:MySQLNonTransientConnectionException</title>
				<description><![CDATA[ 您提到的SQL是UserModel.selectById，在generic_queries.sql裡面的內容如下：<br /> [code=sql]<br /> UserModel.selectById = SELECT COUNT(pm.privmsgs_to_userid) AS private_messages, u.* \<br />         FROM jforum_users u \<br />         LEFT JOIN jforum_privmsgs pm ON pm.privmsgs_type = 1 AND pm.privmsgs_to_userid = u.user_id \<br />         WHERE u.user_id = ? \<br />         GROUP BY pm.privmsgs_to_userid<br /> [/code]<br /> 其中user_id = 1時表示使用者為訪客（anonymous)，這個錯誤可能是Session Timeout或Connection Timeout時，系統關閉資料庫連線，造成查詢使用者資料的這個查詢無法執行成功，應該對系統沒有太嚴重的影響，可以不予理會。<br /> <br /> 參考資料：<br /> http://bugs.mysql.com/bug.php?id=35353]]></description>
				<guid isPermaLink="true">http://www.andowson.com/posts/preList/237/368.page</guid>
				<link>http://www.andowson.com/posts/preList/237/368.page</link>
				<pubDate><![CDATA[Sun, 27 Apr 2008 22:54:41]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
	</channel>
</rss>
