Subject Invalid clumplet Buffer Structure
Author nagypapi
We have an interesting scenario connecting to a firebird database when
using fbwrappingdatasource:

We are using:

- jaybird 2.1.1, later 2.1.3

- fb 2.0.3 superserver, later 2.1.0 RC2 superserver on winXP HUN.

- jre 1.6.0_02

We have a database server on the network with multiple clients
connecting to it.

If we connect to our client's database (on the client's network) from
our network through VPN, everything works fine.

If we connect from _any_ computer on our clients network to the same
database (on the client's network) we get the following error:

org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544382. Invalid
clumplet buffer structure: buffer end before end of clumplet -
clumplet too long
Reason: Invalid clumplet buffer structure: buffer end before end of
clumplet - clumplet too long
at
org.firebirdsql.pool.AbstractFBConnectionPoolDataSource.allocateConnection(AbstractFBConnectionPoolDataSource.java:312)
at
org.firebirdsql.pool.PooledConnectionQueue.addConnection(PooledConnectionQueue.java:490)
at
org.firebirdsql.pool.PooledConnectionQueue.start(PooledConnectionQueue.java:153)
at
org.firebirdsql.pool.AbstractConnectionPool.getQueue(AbstractConnectionPool.java:204)
at
org.firebirdsql.pool.AbstractFBConnectionPoolDataSource.getPooledConnection(AbstractFBConnectionPoolDataSource.java:379)
at
org.firebirdsql.pool.FBWrappingDataSource.getConnection(FBWrappingDataSource.java:216)


The connection code is:

fbwds = new org.firebirdsql.jdbc.FBWrappingDataSource();
fbwds.setDatabase(urlDbase);
fbwds.setUserName(user);
fbwds.setPassword(pass);
fbwds.setRoleName(role);
fbwds.setEncoding(encoding);
//encoding is either ISO8859_2 or UTF8
fbwds.setIdleTimeoutMinutes(30);
fbwds.setPooling(true);
fbwds.setMinSize(1);
fbwds.setMaxSize(1);

try {
fbwds.setLoginTimeout(10);
} catch (Exception e) {
e.printStackTrace();
}

Connection conn=getConnection();
conn.close();


But if we change our code to use DriverManager instead of connection
pooling:

Class.forName("org.firebirdsql.jdbc.FBDriver");
connProps=new java.util.Properties();
connProps.setProperty("user", user);
connProps.setProperty("password", pass);
if(role!=null) connProps.setProperty("role", role);
conn=DriverManager.getConnection(url+dbase+"?lc_ctype=ISO8859_2",connProps);

Everything works fine, even at all of our cllient's computers.

Do you have any idea what causes this?

Thank you,
John