Maven package uploads return HTTP 500 on OneDev 16.7.2 with MariaDB due to a JDBC parameter binding error
#3135
-
Root cause and workaround
The HTTP 500 error was caused by the MariaDB JDBC driver bundled with the OneDev image. The image includes
mariadb-java-client-2.3.0.jarat/app/site/lib/.Upgrading OneDev from 16.7.0 to 16.7.2 did not resolve the issue: the same test upload still failed with the JDBC parameter binding error.
I then replaced the bundled MariaDB JDBC driver with MariaDB Connector/J 3.5.6 and restarted OneDev. The same
com.arcsoft.face:arcsoft-sdk-face:4.2.1.0artifact uploaded successfully. I subsequently uploaded all 33 JARs successfully, with no failures.Please consider updating the MariaDB JDBC driver bundled with the official image, or checking compatibility between the bundled driver and the SQL generated by the current Hibernate version.
| Type |
Bug
|
| Priority |
Major
|
| Assignee | |
| Affected Versions |
16.7.2
|
| Labels |
No labels
|
Issue Votes (0)
Environment
1dev/server:16.7.2org.hibernate.dialect.MariaDBDialectmariadb-java-client-2.3.0.jar, included in the image at/app/site/lib//opt/leosys/onedev/dataon the host, mounted at/opt/onedevin the containerNO_BACKSLASH_ESCAPESis absent from both global and session settings.Steps to reproduce
Use Maven
deploy:deploy-fileto upload a JAR to a project's Maven registry. For example, uploadcom.arcsoft.face:arcsoft-sdk-face:4.2.1.0(approximately 80 KB).Actual result
The upload returns HTTP 500, and Maven reports that the JAR could not be transferred. The OneDev log reports:
The error occurs while
MavenPackHandler.uploadBlobcallsDefaultPackService.findByNameAndVersion.A larger JAR also fails with HTTP 500. The 80 KB JAR still fails after upgrading OneDev to 16.7.2.
Expected result
The Maven package uploads successfully. If the package is invalid, OneDev returns a clear client error instead of HTTP 500.
Additional information
The unmounted
1dev/server:16.7.2image containsmariadb-java-client-2.3.0.jarat/app/site/lib/. Replacing the JDBC driver has not been tested, so its version is an investigation lead rather than a confirmed cause.