Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FBBigDecimal, unsupported field sqltype: 481 [JDBC462] #501

Closed
firebird-automations opened this issue Nov 28, 2016 · 8 comments
Closed

FBBigDecimal, unsupported field sqltype: 481 [JDBC462] #501

firebird-automations opened this issue Nov 28, 2016 · 8 comments

Comments

@firebird-automations
Copy link

Submitted by: John Kilin (johnkilin)

I have the FB Server 2.5 with database in sql dialect 1.
When I try to select the field with type numeric(15, 2) by Jaybird-3.0.0-beta-1-JDK_1.8 i receive error:
Caused by: java.sql.SQLException: FBBigDecimal, unsupported field sqltype: 481
at org.firebirdsql.jdbc.field.FBBigDecimalField.<init>(FBBigDecimalField.java:54)
at org.firebirdsql.jdbc.field.FBField.createField(FBField.java:261)
at org.firebirdsql.jdbc.field.FBField.createField(FBField.java:244)
at org.firebirdsql.jdbc.AbstractResultSet.prepareVars(AbstractResultSet.java:253)
at org.firebirdsql.jdbc.AbstractResultSet.<init>(AbstractResultSet.java:130)
at org.firebirdsql.jdbc.FBResultSet.<init>(FBResultSet.java:46)
at org.firebirdsql.jdbc.FBStatement.getResultSet(FBStatement.java:885)
at org.firebirdsql.jdbc.FBStatement.getResultSet(FBStatement.java:865)
at org.firebirdsql.jdbc.FBStatement.executeQuery(FBStatement.java:229)
at org.pentaho.di.core.database.Database.openQuery(Database.java:1716)

Commits: c9497c0 75f7b60

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Thanks! The FBBigDecimalField has a nice TODO to check for dialect 1 support, so it looks like I forgot to do that.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 3.0.0-beta-2 [ 10802 ]

Fix Version: Jaybird 3.0.0 [ 10440 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

In dialect 1 NUMERIC(15,2) is actually a double field; in Jaybird 2.2 this would lead to FBDoubleField being used, but due to an improvement in datatype identification Jaybird 3 now uses FBBigDecimalField which then doesn't support the fact dialect 1 uses double. To fix this, Jaybird 3 will also use FBDoubleField for this.

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

On closer scrutiny, I will extend FBBigDecimalField instead so it correctly handles this case for dialect 1.

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Fixed: c9497c0

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Author

Commented by: John Kilin (johnkilin)

Great, thanks! The fix is working.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment