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

NCLOB support is broken for JDBC 11gR2 #53

Closed
javornikolov opened this issue Mar 17, 2013 · 4 comments
Closed

NCLOB support is broken for JDBC 11gR2 #53

javornikolov opened this issue Mar 17, 2013 · 4 comments
Labels
Milestone

Comments

@javornikolov
Copy link
Contributor

This is blocker for #28.

Example of failing snipped is described in #28.

The problem with NCLOB is that there is oracle.sql.NCLOB data type in JDBC 11.2 which didn't exist in earlier version of JDBC.

Some ideas for workarounds:

  • Bump up JDBC version to 11.2. Then it will be possible to explicitly use java.sql.NCLOB in code.
  • Modify TypeNormaliserFactory lookup to search for parent classes too. Currently there is only exact match lookup. (oracle.sql.NCLOB is subclass of oracle.sql.CLOB.)
  • Use String or something else instead of Class as key in TypeNormaliserFactory map
@benilovj
Copy link
Member

Bump up JDBC version to 11.2. Then it will be possible to explicitly use java.sql.NCLOB in code.

Wouldn't this would break 10g support?

Modify TypeNormaliserFactory lookup to search for parent classes too. Currently there is only exact match lookup. (oracle.sql.NCLOB is subclass of oracle.sql.CLOB.)

That would add complexity to TypeNormaliserFactory but has the advantage of being a localised change.

Use String or something else instead of Class as key in TypeNormaliserFactory map

is a simpler solution than 2, also fairly limited in scope since the type normaliser is only used in the oracle and teradata environments. This is probably my preference as well.

@javornikolov
Copy link
Contributor Author

In the pool request #54 you can see both the "String" approach which also preserves compatibility with old code. And also in a comment - some attampt for the parent classes lookup (can be refined a bit).

And I think bumping up driver to 11gR2 is a non brainier for me - I'm anyway using it since it solves the problem with time part of dates. It's compatible with 10g databases. What could break is setups using the old version of the driver.
But maybe it would be good at least for a while to be able to run dbfit against both 10g driver and 11g driver. This will allow switching in case of some other issue is discovered.

@benilovj
Copy link
Member

I plan to dump maven very shortly and move to gradle - a friend of mine has
already spiked the transformation (https://github.com/crasu/dbfit). Gradle
should make it trivially simple to have two builds - one with the 10g driver and
another with the 11g driver.

javornikolov added a commit to javornikolov/dbfit that referenced this issue Mar 19, 2013
Implemented by ancestors lookup class search in TypeNormaliserFactory
@benilovj
Copy link
Member

fixed with #54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants