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

[Bug]: Oracle DB Queries fail when columns include BLOB/CLOB datatype #1173

Open
1 task done
placidic opened this issue Sep 19, 2024 · 1 comment
Open
1 task done

Comments

@placidic
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When querying a oracle DB which returns a CLOB/BLOB datatype, the parsing engine fails and an "Oops..." error message is displayed to the user.

log files include the following

2024-09-12 18:57:39.863 ERROR o.l.api.framework.exception.GlobalExceptionHandler#lambda$doLog$8:155 POST /api/v1/query/execute [plugin-executor-7]:
133org.springframework.core.codec.CodecException: Type definition error: [simple type, class oracle.jdbc.OracleConnection]
134at org.springframework.http.codec.json.AbstractJackson2Encoder.encodeValue(AbstractJackson2Encoder.java:256)
135Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
136Assembly trace from producer [reactor.core.publisher.MonoMapFuseable] :
137reactor.core.publisher.Mono.map
138org.springframework.http.codec.json.AbstractJackson2Encoder.lambda$encode$7(AbstractJackson2Encoder.java:158)
139Error has been observed at the following site(s):
 
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Direct self-reference leading to cycle (through reference chain: org.lowcoder.api.query.view.QueryResultView["data"]->java.util.ArrayList[0]->java.util.LinkedHashMap["SEND_DATA"]->oracle.sql.BLOB["dbaccess"]->oracle.jdbc.driver.T4CConnection["wrapper"])
 

Expected Behavior

Query should run and parse Successfully with CLOB/BLOB Datatypes

Steps to reproduce

  1. Create and Oracle Data Source Connection
  2. Query an Oracle table containing a BLOB/CLOB Column in the resultset.

Environment

Lowcoder Self Hosted 2.4.5

Additional Information

After looking at the source code here for the oracle plugin: oraclePlugin/pom.xml

It appears that it is running v11.2.0.4 of the ojdbc6.jar library. This is woefully out of date and later versions appear to have resolved this issue, such as discussed On this Thread

Latest Oracle drivers are located here

@placidic
Copy link
Author

placidic commented Sep 19, 2024

It may also be worth providing the user an option between which Oracle driver to use, and supporting multiple Oracle drivers, as there is a known backwards compatibility issue with newer Oracle drivers on older stacks. I'd recommend 23ai, 21c and 19c if that approach were developed. For a single driver I would recommend 19c for compatibility.

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

No branches or pull requests

1 participant