Subject Re: FBServiceManager classes doesn't work with Firebird 2.5
Author sp64_asaon
We finally compiled the Jaybird version from the trunk. For now all
tests with PURE_JAVA connections succeeded, but we discovered some
problems with Firebird Embedded Server:


1. FBManager.createDatabase()
In order to use the UTF-8 charset we need a page size of at least 8KB
(max key size). To achieve this, we duplicated the FBManager-class and
inserted the following lines into .createDatabase():
dpb.addArgument(DatabaseParameterBuffer.PAGE_SIZE, 8192);
dpb.addArgument(DatabaseParameterBuffer.SWEEP_INTERVAL, 0);
If we use these additional arguments, we get this exception:
org.firebirdsql.gds.GDSException: Invalid clumplet buffer structure:
buffer end before end of clumplet - clumplet too long
at
org.firebirdsql.gds.impl.jni.JniGDSImpl.native_isc_create_database(Nativ\
e Method)
at
org.firebirdsql.gds.impl.jni.BaseGDSImpl.iscCreateDatabase(BaseGDSImpl.j\
ava:256)
...
FYI: This problem also exists in Jaybird 2.1 with FB 2.1 Embedded (the
problem arised, since we would like to use UTF-8 instead of Win1252)


2. DatabaseMetaData.getTables()
Calling this method results in the following exception:
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544569. Dynamic
SQL Error
SQL error code = -303
arithmetic exception, numeric overflow, or string truncation
string right truncation
at
org.firebirdsql.jdbc.AbstractPreparedStatement.internalExecute(AbstractP\
reparedStatement.java:751)
at
org.firebirdsql.jdbc.AbstractPreparedStatement.executeMetaDataQuery(Abst\
ractPreparedStatement.java:710)
at
org.firebirdsql.jdbc.AbstractDatabaseMetaData.doQuery(AbstractDatabaseMe\
taData.java:6170)
at
org.firebirdsql.jdbc.AbstractDatabaseMetaData.getTables(AbstractDatabase\
MetaData.java:2411)
...
Caused by: org.firebirdsql.gds.GDSException: Dynamic SQL Error
SQL error code = -303
arithmetic exception, numeric overflow, or string truncation
string right truncation
at
org.firebirdsql.gds.impl.jni.JniGDSImpl.native_isc_dsql_execute2(Native
Method)
at
org.firebirdsql.gds.impl.jni.BaseGDSImpl.iscDsqlExecute2(BaseGDSImpl.jav\
a:409)
at
org.firebirdsql.gds.impl.GDSHelper.executeStatement(GDSHelper.java:226)
at
org.firebirdsql.jdbc.AbstractPreparedStatement.internalExecute(AbstractP\
reparedStatement.java:747)
...


3. Jaybird 2.2 cannot be used with FB 2.1 Embedded
Although this is not a real problem for us, we would like to mention
that it causes the following error:
org.firebirdsql.gds.impl.jni.InternalError:
FirebirdApiBinding:Initialize() - Entry-point fb_cancel_operation not
found
at org.firebirdsql.gds.impl.jni.JniGDSImpl.nativeInitilize(Native
Method)
at
org.firebirdsql.gds.impl.jni.JniGDSImpl.attemptToLoadAClientLibraryFromL\
ist(JniGDSImpl.java:92)
at
org.firebirdsql.gds.impl.jni.EmbeddedGDSImpl.<init>(EmbeddedGDSImpl.java\
:31)
at
org.firebirdsql.gds.impl.jni.EmbeddedGDSImpl.<init>(EmbeddedGDSImpl.java\
:21)
at
org.firebirdsql.gds.impl.jni.EmbeddedGDSFactoryPlugin.getGDS(EmbeddedGDS\
FactoryPlugin.java:40)
at
org.firebirdsql.gds.impl.GDSFactory.getGDSForType(GDSFactory.java:219)
at
org.firebirdsql.jca.FBManagedConnectionFactory.getGDS(FBManagedConnectio\
nFactory.java:115)
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:125)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
...


Thanks in advance.

Stephan



[Non-text portions of this message have been removed]