Server 5.2.1 errors

Getting this a lot upon startup of smartclient:

org.apache.commons.dbcp.SQLNestedException: Borrow prepareStatement from pool failed 
    	at org.apache.commons.dbcp.PoolingConnection.prepareStatement(PoolingConnection.java:113) 
    	at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:281) 
    	at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:313) 
    	at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:281) 
    	at com.servoy.j2db.dataprocessing.Zu.Za(Zu.java:1055) 
    	at com.servoy.j2db.dataprocessing.Zu.Za(Zu.java:224) 
    	at com.servoy.j2db.dataprocessing.Zu.access$4(Zu.java:568) 
    	at com.servoy.j2db.dataprocessing.Zx.run(Zx.java:1) 
    	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) 
    	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) 
    	at java.util.concurrent.FutureTask.run(Unknown Source) 
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source) 
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) 
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) 
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
    	at java.lang.Thread.run(Unknown Source) 
    Caused by: java.sql.SQLException: [Sybase][ODBC Driver][SQL Anywhere]Connection was terminated 
    	at ianywhere.ml.jdbcodbc.jdbc3.IConnection.nativePrepareStatement(Native Method) 
    	at ianywhere.ml.jdbcodbc.jdbc3.IConnection.prepareStatement(IConnection.java:475) 
    	at com.servoy.j2db.Za.Za.Zp.prepareStatement(Zp.java:33) 
    	at org.apache.commons.dbcp.PoolingConnection.makeObject(PoolingConnection.java:285) 
    	at com.servoy.j2db.Za.Za.Zi.borrowObject(Zi.java:108) 
    	at org.apache.commons.dbcp.PoolingConnection.prepareStatement(PoolingConnection.java:107) 
    	... 15 more

Running on Windows server 2008. Never sow this before upgrading to 5.2.1 from 5.1.4. I have the new security turned off, and use a custom login screen. Sometimes it prevents the login form from loading, sometimes it’s OK. Any ideas?

somehow sybase has terminated the connection, normally sybase doesnt do that (other databases like mysql has that as default behavior)

what kind of "Query validation type " did you specify on the network admin page for that connection?
Why do you use the odbc driver to connect to sybase? cant you use a all java one?

Query validation is “exception validation”. I’m using the odbc driver to try to eek out better performance: http://www.sybase.com/detail?id=1037304
Been using that driver for a while. Strange it doesn’t always happen.

dont use exception validation, but query validation like a simple select from a table (that has no or 1 result)

this happens because maybe a connection is idle for quite some time, and then the other side just closes the connection.
When you use exception validation, you are just to late to catch this, because the exception happens after the fact.