Re: [dbcp] java.io.EOFException, underlying cause: null
Matthew Hixson wrote: Occasionally I'll see this exception in our logs. I have setup the pool like so: GenericObjectPool pool = new GenericObjectPool(null); pool.setWhenExhaustedAction(GenericObjectPool.WHEN_EXHAUSTED_GROW); pool.setTestOnBorrow(true); pool.setTestOnReturn(true); pool.setTestWhileIdle(true); Is that not sufficient to have DBCP test a connection before releasing it from the pool for use? No. You need to call set the validation query too. E.g.: pool.setValidationQuery(SELECT 1); HTH, Mark Thanks, -M@ --- java.sql.SQLException: Communication link failure: java.io.EOFException, underlying cause: null ** BEGIN NESTED EXCEPTION ** java.io.EOFException STACKTRACE: java.io.EOFException at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1395) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1539) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1930) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1168) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1279) at com.mysql.jdbc.Connection.execSQL(Connection.java:2281) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1634) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93) ... - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [SCXML] getting set datats in the datamodel
Hello I think I´ve done some mixing between two things that doesn´t work together as I hoped it would. I have this Datamodel, the scxml document starts like this: scxml version=1.0 initialstate=INIT xmlns:cs= http://commons.apache.org/scxml; xmlns=http://www.w3.org/2005/07/scxml; datamodel data name=DynamicData NumDat xmlns= id=1 type=Integer0/NumDat /data data name=Indication1 expr=false/ /datamodel snip/- I assign the Indication1 later on: --- state id=StateC onentry log label=Renegade expr='Entering state: StateC'/ assign name=Indication1 expr=true/ /onentry snip/--- And the DynamicData also later: --- state id=StateB onentry log label=Renegade expr='Entering state: StateB'/ log label=Renegade expr=Data(DynamicData,'NumDat')/ assign location=Data(DynamicData,'NumDat') expr=Data(DynamicData,'NumDat')+1/ log label=Renegade expr=Data(DynamicData,'NumDat')/ /onentry snip/--- I implemented a custom context with a notification functionality in the set function (observer observed pattern) but the problem now is that the only time the set function in the context is used is when indications are set. Not when the DynamicData is set. I know that the SCXML works and that the expressions evaluate properly because of the log:labels, my guess is that it´s something with the Data() function that makes these expressions do something different. What? Where is the set for the DynamicData located? How do I notify when my DynamicData has changed? Best regards Linda
Re: [dbcp] java.io.EOFException, underlying cause: null
Hi Mark, I'm just using GenericObjectPool and it does not have a setValidationQuery() method. Do I need to use a more specific object pool class or did you mean that setValidationQuery needs to be called on something else? My method now looks like: GenericObjectPool pool = new GenericObjectPool(null); pool.setWhenExhaustedAction(GenericObjectPool.WHEN_EXHAUSTED_GROW); pool.setTestOnBorrow(true); pool.setTestOnReturn(true); pool.setTimeBetweenEvictionRunsMillis(1); pool.setTestWhileIdle(true); ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(jdbcUrl),null); new PoolableConnectionFactory(connectionFactory,pool,null,null,false,true); return(new PoolingDataSource(pool)); Thanks, -M@ On Apr 20, 2009, at 1:28 AM, Mark Thomas wrote: Matthew Hixson wrote: Occasionally I'll see this exception in our logs. I have setup the pool like so: GenericObjectPool pool = new GenericObjectPool(null); pool.setWhenExhaustedAction(GenericObjectPool.WHEN_EXHAUSTED_GROW); pool.setTestOnBorrow(true); pool.setTestOnReturn(true); pool.setTestWhileIdle(true); Is that not sufficient to have DBCP test a connection before releasing it from the pool for use? No. You need to call set the validation query too. E.g.: pool.setValidationQuery(SELECT 1); HTH, Mark Thanks, -M@ --- java.sql.SQLException: Communication link failure: java.io.EOFException, underlying cause: null ** BEGIN NESTED EXCEPTION ** java.io.EOFException STACKTRACE: java.io.EOFException at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1395) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1539) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1930) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1168) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1279) at com.mysql.jdbc.Connection.execSQL(Connection.java:2281) at com .mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java: 1634) at org .apache .commons .dbcp .DelegatingPreparedStatement .executeQuery(DelegatingPreparedStatement.java:93) ... - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: IOExceptionjavax.net.ssl.SSLException: Unexpected end of handshake data
Verify the server supports explicit SSL, not implicit. Verify you should be setting the protocol to SSL instead of the default TLS. Also, what version of commons-net are you using, 1.4.1 or 2.0? - Original Message - From: Chetan chetanku...@yahoo.com To: Commons Users List user@commons.apache.org Sent: Sunday, April 19, 2009 11:15 PM Subject: Re: IOExceptionjavax.net.ssl.SSLException: Unexpected end of handshake data Hi Steve, The server does not require the client to use certificate, Just using username and password. The certificate is at the server level. Thanks Chetan Imagination is more important than knowledge. Take care, Cheers, Chetan From: Steve Cole sc...@camsbycbs.com To: Commons Users List user@commons.apache.org Sent: Friday, 17 April, 2009 20:45:15 Subject: Re: IOExceptionjavax.net.ssl.SSLException: Unexpected end of handshake data Does the server require the client to use a certificate for authentication? If so, are you setting the FTPSClient KeyManager using a keystore that contains the correct signed certificate? - Original Message - From: Chetan chetanku...@yahoo.com To: user@commons.apache.org Sent: Thursday, April 16, 2009 9:49 PM Subject: IOExceptionjavax.net.ssl.SSLException: Unexpected end of handshake data Hi, I'm trying to make a ftps connection to a server using apache's ftps client, but getting a expection when trying to make the connection. IOExceptionjavax.net.ssl.SSLException: Unexpected end of handshake datajavax.net.ssl.SSLException: Unexpected end of handshake data Can someone help with this. Here is the expection Trying to connect ftps client created Just before connectIOExceptionjavax.net.ssl.SSLException: Unexpected end of handshake datajavax.net.ssl.SSLException at com.sun.net.ssl.internal.ssl.HandshakeInStream.read(Unknown Source) at com.sun.net.ssl.internal.ssl.HandshakeMessage$CertificateMsg.init(Unknown Source) at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at org.apache.commons.net.ftp.FTPSClient.sslNegotiation( at org.apache.commons.net.ftp.FTPSClient._connectAction_( at org.apache.commons.net.SocketClient.connect( at com.accenture.ftps.trail.FtpsTrailClass.main(: Unexpected end of handshake dataFTPSClient.java:240)FTPSClient.java:171)SocketClient.java:178)FtpsTrailC lass.java:35) here is the code int reply; System.out.println(Trying to connect); FTPSClient ftps = new FTPSClient(SSL); System.out.println(ftps client created); //ftps.setAuthValue(SSL); System.out.println(Just before connect); ftps.connect(X,21); System.out.println(Connected); reply = ftps.getReplyCode(); if (!FTPReply.isPositiveCompletion(reply)) { ftps.disconnect(); System.err.println(FTP server refused connection.); System.exit(1); } //ftps.setDefaultTimeout(1000); //ftps.enterRemotePassiveMode(); System.out.println(Before login); ftps.login(,); System.out.println(Connected to server); Thanks in advance Chetan - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org