Win a copy of Fixing your Scrum this week in the Agile forum!

K.B. Stone

+ Follow
since Sep 11, 2008
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by K.B. Stone

Seems great ! Thanks for suggestion
12 years ago
Hi Expert,

I am seeking for some Strut2 training material. Welcome to suggest some materials, reference site to me. I want to develop a simple application application. Hence, sample code, step-by-step guidelines are absolutely welcome! I think I would use mySQL + tomcat as my development environment.

BTW, Which development tools are easier to use ? netbean or eclipse ? since I only use vi for many years and I am new to editor tools, welcome advice.

Many Many Thanks.
12 years ago
Hi Suresh!

May I know how the connection created ? Get from connection pool or just simply make a new connection from data source.
13 years ago
Thanks for your fast response. Yes, got little bit more idea on MVC ! Thanks a lot! I think I will switch to respective forum for further post!

Thanks again!
13 years ago
Yes, you are right ! I am really confused by those terms. Thanks for correcting my question and suggestion, and then ask again on respective forums.

But allow me to have a fast question, What should "Model 1" & "Model 2" refer to ? Is it referring about Struts or Struts2 ? Since I got some ppt about Strut2, it mention that Strut2 is used to implement Model 2.
13 years ago
Hi Experts,

I have experience in writing JAVA/JSP/Servlet. However, my coding style/design does not following the MVC/MVC2 model. I want some reference (if possible, I seek a example/sample) for teaching me
- Struts/Struts2
- Eclipse (for file edit and management), any other good tools ?
- XXX.xml ( I found many properties file, but I don't know what they are working for )
- Configuration passing in a Tomcat Application.

Thanks a lot!
13 years ago
Initially, I expect that "?autoReconnect=true" could be workable for reconnection of the stale connection. But, in fact, that property seems no effect on the reconnection of stale connection, still have exception. Hence, I am seeking extra reference for properties setting and usage.
Hi Experts,

I got exception "com.mysql.jdbc.CommunicationsException" when executing query to MySQL Server using one of the connection from connection pools.

From my observation, the connection works properly (I open a jsp for making an query to a table. The SQL statement executes successfully ), However, after 9 hours, when I trigger the same jsp again, It failed with long waiting, in fact, INFORMATION 2 appeared in catalina.out

I suspect that the connection in the connection pool may be stale, as I got some news about connection's 8hours expiry. How can I have the setting of data source, so that
- the connection in db pool will not expired, and
- once connection is stale in pool, re-creation of connection can be done automatically.

I am also seeking for any information/guideline in Connection Pool, Welcome to send me a reference. Thank you very much!

INFORMATION 1: Environment
TOMCAT : apache-tomcat-5.5.20
JDBC library
MySQL : 5.0.51a-community
MySQL Connector : mysql-connector-java-5.1.6-bin.jar
BasicDataSource.class : commons-dbcp-1.2.2.jar

INFORMATION 2 : Exception captured.

com.mysql.jdbc.CommunicationsException: The last packet successfully received from the server was50336 seconds ago.The last packet sent successfully to the server was 50336 seconds ago, which is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
at com.mysql.jdbc.SQLError.createCommunicationsException(
at com.mysql.jdbc.MysqlIO.send(
at com.mysql.jdbc.MysqlIO.sendCommand(
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(
at com.mysql.jdbc.ConnectionImpl.execSQL(
at com.mysql.jdbc.PreparedStatement.executeInternal(
at com.mysql.jdbc.PreparedStatement.executeQuery(
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(
at com.nmss.ivrAdmin.LoginBean.login(
at org.apache.jsp.jsp.login_jsp._jspService(
at org.apache.jasper.runtime.HttpJspBase.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.jasper.servlet.JspServletWrapper.service(
at org.apache.jasper.servlet.JspServlet.serviceJspFile(
at org.apache.jasper.servlet.JspServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.valves.AccessLogValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(
at org.apache.tomcat.util.threads.ThreadPool$
Caused by: Broken pipe
at Method)
at com.mysql.jdbc.MysqlIO.send(
... 29 more

INFORMATION 3 : DataSource Setting

dataSource = new BasicDataSource();

Thanks again!

[ September 11, 2008: Message edited by: Mr Monkey ]
[ September 11, 2008: Message edited by: Mr Monkey ]