-
Notifications
You must be signed in to change notification settings - Fork 190
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
Frontend Vaadin Mssql error #1662
Comments
Hey guys, thanks for Hawkbit! We use it since 0.3.0M6 and we are happy with it. However, we are in the process of migrating from 0.3.0M7 to 0.3.0 and we just hit the same error @meladon1337 described. On top of that, we had to add the following dependency to the JAR:
Otherwise Hawkbit won't start ( You can verify this by downloading the 0.3.0 hawkbit-update-server JAR from Maven central or just by poking the one present inside the hawkbit-update-server Docker image. Do you have plans to fix this issue? And if so, are you planning to release the fix in the 0.3.0 final version? Since Vaadin may be dropped in the upcoming versions we may decide to stay on 0.3.0 for a while. Thanks in advance! |
Unfortunately, these queries are generated by JPA. ROW_NUMBER isn't a column of a table we create. I suppose that it is something mssql specific that JPA uses. |
Did you have the same issue and this flyway dependency had fixed that? Or you have completely different issue - at the migration phase? |
No, I don't think they are the same issue. I have created #1692 to track the flywayexception. |
Hello @avgustinmm, I seem to have missed the notification email I got from your replies due to an email rule. Anyway, I understand you guys don't test using MSSQL but I think I found the reason why this is happening. Today I had some more time to look into it and found that the previous Hawkbit maintainers had this issue a few years ago due to EclipseLink: See the following issue and how he fixed it (undo the EclipseLink version upgrade). However, it seems that the EclipseLink maintainers did not fix it and the version used by Hawkbit was bumped at some point (right now version 0.3.0 uses the latest EclipseLink version available). As I see things, the MS SQL support in Hawkbit is currently broken. Now, I know this is not really up to you guys to fix, but I think Hawkbit (as a project) needs to make a decision about this going forward and perhaps indicate it in the README if you decide to discontinue support for that database. |
Yes, indeed we test mostly with H2 and MySQL |
@avgustinmm, I have solved the issue by building a version of the eclipselink dependency containing the fix suggested by Kai. The error is no longer visible in the logs. However, since I am not the one who opened this issue I can't close it. Thanks for the help though! |
Many frontend actions cause the ui to fail when executing database calls to azure mssql Database:
Internal Exception: com.microsoft.sqlserver.jdbc.SQLServerException: ORDER BY items must appear in the select list if SELECT DISTINCT is specified.
Feb 21 12:51:48 java[1683674]: Error Code: 145
Feb 21 12:51:48 java[1683674]: Call: SELECT DISTINCT t1.id, t1.tenant, t1.colour, t1.created_at, t1.created_by, t1.description, t1.last_modified_at, t1.last_modified_by, t1.name, t1.optlock_revision FROM sp_target t0, sp_target_target_tag t2, sp_target_tag t1 WHERE (((t0.controller_id = ?) AND (t1.tenant = ?)) AND (((t2.tag = t1.id) AND (t0.id = t2.target)) AND (t0.tenant = ?))) ORDER BY ROW_NUMBER() OVER (ORDER BY (SELECT null)) OFFSET ? ROWS FETCH NEXT ? ROWS ONLY
Feb 21 12:51:48 java[1683674]: bind => [5 parameters bound]
Feb 21 12:51:48 java[1683674]: Query: ReadAllQuery(referenceClass=JpaTargetTag sql="SELECT DISTINCT t1.id, t1.tenant, t1.colour, t1.created_at, t1.created_by, t1.description, t1.last_modified_at, t1.last_modified_by, t1.name, t1.optlock_revision FROM sp_target t0, sp_target_target_tag t2, sp_target_tag t1 WHERE (((t0.controller_id = ?) AND (t1.tenant = ?)) AND (((t2.tag = t1.id) AND (t0.id = t2.target)) AND (t0.tenant = ?))) ORDER BY ROW_NUMBER() OVER (ORDER BY (SELECT null)) OFFSET ? ROWS FETCH NEXT ? ROWS ONLY")
It seems that the ROW_NUMBER() should be part of the select list.
The text was updated successfully, but these errors were encountered: