-
Notifications
You must be signed in to change notification settings - Fork 1.5k
JSqlParserQueryEnhancer
fails with ClassCastException
during query introspection
#3869
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
Comments
Are you can actually run this method and it works without a problem, but only fails in test? |
@schauder Thanks for the reply. Could you help me how to verify that? I can tell you the error occurs the same even if I explicitly establish the JSqlParser dependency: <dependency>
<groupId>com.github.jsqlparser</groupId>
<artifactId>jsqlparser</artifactId>
<version>5.1</version>
</dependency> |
|
Thanks. No difference at all (between runtime and test). Same |
Sorry, I'm confused about what exception is thrown in which scenario. Could you please provide a reproducer? Preferable in form of a GitHub repository? |
Sorry, I've updated the comment. Just forget about what I wrote before, I mixed it with other problem |
In order to understand why we get a failure in test but not in main, I'd like to see a reproducer. |
I'm trying to build one, it is a difficult task because I'm getting this error in a big project... trying to extract only the required parts |
Having the full stack trace would help us to identify the actual cause. |
JSqlParserQueryEnhancer
fails with ClassCastException
during query introspection
|
Thanks a lot. The exception message indicates that there is an older version of JSqlParser (pre 4.7) as in 4.7 The fix for you @thmasker is to make sure you have no dependency mismatches on the class path and upgrade to a newer JSqlParser version. I assume you might have a shaded jar on the class path that carries an earlier JSqlParser version. |
Closes: #3869 Original pull request: #3870 Signed-off-by: Diego Pedregal <[email protected]>
Closes: #3869 Original pull request: #3870 Signed-off-by: Diego Pedregal <[email protected]>
Thanks @mp911de for the help. I'll try to find the hidden library |
Closes: #3869 Original pull request: #3870 Signed-off-by: Diego Pedregal <[email protected]>
Closes: #3869 Original pull request: #3870 Signed-off-by: Diego Pedregal <[email protected]>
Closes: #3869 Original pull request: #3870 Signed-off-by: Diego Pedregal <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
I have a repository which includes a method to call a PostgreSQL function:
This compiles and works without problem. However, tests fail due to:
I found out that the casting failure is produced in class
JSqlParserQueryEnhancer
, line 240:And I think it could be fixed by updating it to:
The text was updated successfully, but these errors were encountered: