[Persistence, JBoss/CMP, Hibernate, Database] - mysql connection reset
by tomerbd2
I'm using cmp2.1 + jdbc and i get from time to time (daily) a connection reset exception.
im using mysql: 5.0.26 and i made sure that the wait_timeout parameter of mysql is longer than the connection idle timeout of jboss connection pool.
Can anyone advise please?
anonymous wrote :
| Exception: Communication link failure: java.net.SocketException, underlying cause: Connection reset
|
| ** BEGIN NESTED EXCEPTION **
|
| java.net.SocketException
| MESSAGE: Connection reset
|
| STACKTRACE:
|
| java.net.SocketException: Connection reset
| at java.net.SocketInputStream.read(SocketInputStream.java:168)
| at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
| at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
| at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
| at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1316)
| at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1463)
| at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1854)
| at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109)
| at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203)
| at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1164)
| at com.mysql.jdbc.Connection.execSQL(Connection.java:2087)
| at com.mysql.jdbc.Connection.execSQL(Connection.java:2037)
| at com.mysql.jdbc.Statement.execute(Statement.java:900)
| at org.jboss.resource.adapter.jdbc.WrappedStatement.execute(Unknown Source)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096586#4096586
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096586
18Â years, 9Â months
[Beginners Corner] - Urgent : Time getting different than system time
by sonalisalunkhe147
In one of the method of one class which is deployed on JBOSS, I have written the following lines of code :
SimpleDateFormat dateFormatterSecondPrecision = new SimpleDateFormat("MM/dd/yyyy kk:mm:ss");
System.setProperty("user.timezone","America/Los_Angeles");
Calendar cal = GregorianCalendar.getInstance(TimeZone.getTimeZone("America/Los_Angeles"));
String strCreatedDate=dateFormatterSecondPrecision.format(cal.getTime());
if(INFO) // used log4j
log.info("..... strCreatedDate : "+strCreatedDate);
java.util.Date createdDate=dateFormatterSecondPrecision.parse(strCreatedDate);
if(INFO)
log.info("..... createdDate : "+createdDate);
The o/p :
..... strCreatedDate : 10/18/2007 13:32:33
..... createdDate : Thu Oct 18 13:32:33 GMT 2007
But if I run the code soley, toatlly written a simple java class which contain the above 4-5 liines,
The o/p is :
..... strCreatedDate : 10/18/2007 19:05:45
..... createdDate : Thu Oct 18 19:05:45 IST 2007
The difference of 5.5 hrs is coming .
Can anybody tell me where i m wrong?
Thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096579#4096579
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096579
18Â years, 9Â months