bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
8.84k stars 9.13k forks source link

Unable to upload mysql driver to Datasource in JasperServer #5861

Closed SagitAlec closed 3 years ago

SagitAlec commented 3 years ago

Which chart: jasperreports-10.2.3

Describe the bug When I try to upload the mysql driver in datasource, it show this error.

[could not execute statement; SQL [n/a]; constraint [UK_emu9w2irh08lh7kw07be7u1vp]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement]

However, I don't understand what it means and can't find any solution to solve this. As it worked in ver.10.0.0, and this driver is the workable driver (mysql-connector-java-8.0.16.jar) for my DB so far

To Reproduce

  1. Right click to create Datasource file in any folder in the server
  2. Choose Mysql driver (Non-installed) or other driver
  3. Click add driver and click the choose file in the pop-up
  4. After choosing the file and click upload, the error is shown

Kubernetes 1.12+ Helm 3.1.0

carrodher commented 3 years ago

I was able to follow the steps described without any issues: Screenshot 2021-03-22 at 08 37 29

I downloaded the MySQL connector from this URL (https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.16/mysql-connector-java-8.0.16.jar) just to use the same version. In the UI it seems everything is correct.

Then I checked the container logs where some errors appeared:

$ kubectl logs -f jasperserver-jasperreports-bdbd8b869-455vn
2021-03-22T07:34:15,928 ERROR SecureExceptionHandlerImpl,http-nio-8080-exec-6:116 - There was an error on the server. Try again or contact site administrators. (Error UID: 6150ee4e-7c6d-4cbf-9394-e6068bdaca72)
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

But it seems an issue related to the application itself (or the connector) rather than the Helm Chart, I am not sure if there is something we can do at the Helm Chart level to fix the issue.

SagitAlec commented 3 years ago

Thx for the reply, we'll try another way to overcome it