Maven package uploads return HTTP 500 on OneDev 16.7.2 with MariaDB due to a JDBC parameter binding error #3135
kobe opened 2 months ago

Environment

  • OneDev: 1dev/server:16.7.2
  • Database: MariaDB 10.6.18
  • Hibernate dialect: org.hibernate.dialect.MariaDBDialect
  • JDBC driver: mariadb-java-client-2.3.0.jar, included in the image at /app/site/lib/
  • Data directory: /opt/leosys/onedev/data on the host, mounted at /opt/onedev in the container
  • MariaDB SQL mode: NO_BACKSLASH_ESCAPES is absent from both global and session settings.

Steps to reproduce

Use Maven deploy:deploy-file to upload a JAR to a project's Maven registry. For example, upload com.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:

Could not set parameter at position 4 (values was '4.2.1.0')

The error occurs while MavenPackHandler.uploadBlob calls DefaultPackService.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.2 image contains mariadb-java-client-2.3.0.jar at /app/site/lib/. Replacing the JDBC driver has not been tested, so its version is an investigation lead rather than a confirmed cause.

1/1
Type
Bug
Priority
Major
Assignee
Affected Versions
16.7.2
Labels
No labels
Issue Votes (0)
Watchers (2)
Reference
OD-3135
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover