-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
When H2SchemaMetaDataLoader load column meta data, it will cause NullPointerException #24276
Comments
Hi @XinShepherd, thank you for your feedback. Can you try to fix this bug? |
|
@linghengqian Thank you very much for your sharing, which means that the H2 2.x version has corrected the design errors in 1.x, and ShardingSphere currently supports it according to 2.x. |
Thanks @linghengqian . So do you mean that I need to upgrade my H2 version from V1 to V2 ? Now shardingsphere-jdbc can work with this error, but I don't know if it will cause other errors. |
|
Thanks a lot @linghengqian . I upgrade my H2 version now and it works. And also, I will make a PR in the future if necessary. |
|
Considering the excessive number of CVEs for h2database 1.x, the current issue seems meaningless. |
Bug Report
Which version of ShardingSphere did you use?
5.2.1
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
H2 version
Expected behavior
H2 Dialect load table meta data successfully
Actual behavior
Dialect load table meta data error.
the exception is:
Reason analyze (If you can)
I have used the original datasource (not shardingDatasource) to init my tables in H2, and then H2SchemaMetaDataLoader will load the meta data from the datasource.
And then I debug the source code H2SchemaMetaDataLoader.java at line 112 which is the root cause , just like below
From the screenshot,we can find that the dataTypeMap does not contains the dataType
'4'
, because the dataTypeMap is the TYPE_NAME to DATA_TYPE mappings, just like belowSolution
In my option, if we can directly use the value of dataType, and not get from dataTypeMap ?
The text was updated successfully, but these errors were encountered: