-
Bug
-
Resolution: Fixed
-
Major
-
None
-
CentOS7
Jenkins 2.332.3
openjdk 1.8.0_292
MySQL 5.7.13
-
-
1161.v89a_7dcec5d31
After upgrading pipeline-maven-plugin to v3.11.0 , and restarting Jenkins server, I got the following error:
Jun 24, 2022 8:44:22 AM INFO com.zaxxer.hikari.HikariDataSource
HikariPool-1 - Starting...
Jun 24, 2022 8:44:23 AM INFO com.zaxxer.hikari.HikariDataSource
HikariPool-1 - Start completed.
Jun 24, 2022 8:44:23 AM WARNING org.jenkinsci.plugins.pipeline.maven.GlobalPipelineMavenConfig getDao
Exception creating database dao, skip
java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:782)
at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:666)
at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:94)
at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)
at org.jenkinsci.plugins.pipeline.maven.dao.AbstractPipelineMavenPluginDao.initializeDatabase(AbstractPipelineMavenPluginDao.java:500)
Caused: org.jenkinsci.plugins.pipeline.maven.util.RuntimeSqlException
at org.jenkinsci.plugins.pipeline.maven.dao.PipelineMavenPluginMySqlDao.handleDatabaseInitialisationException(PipelineMavenPluginMySqlDao.java:91)
at org.jenkinsci.plugins.pipeline.maven.dao.AbstractPipelineMavenPluginDao.initializeDatabase(AbstractPipelineMavenPluginDao.java:502)
at org.jenkinsci.plugins.pipeline.maven.dao.AbstractPipelineMavenPluginDao.<init>(AbstractPipelineMavenPluginDao.java:90)
at org.jenkinsci.plugins.pipeline.maven.dao.PipelineMavenPluginMySqlDao.<init>(PipelineMavenPluginMySqlDao.java:73)
Caused: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.jenkinsci.plugins.pipeline.maven.GlobalPipelineMavenConfig.getDao(GlobalPipelineMavenConfig.java:339)
Caused: java.sql.SQLException: Exception connecting to 'jdbc:mysql://mysrv/Jenkins_jobs?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC' with credentials 'e10362c6-ea13-4e51-ac39-05f3124afce7' (jenkins/***) and DAO PipelineMavenPluginMySqlDao
at org.jenkinsci.plugins.pipeline.maven.GlobalPipelineMavenConfig.getDao(GlobalPipelineMavenConfig.java:343)
at org.jenkinsci.plugins.pipeline.maven.NonProductionGradeDatabaseWarningAdministrativeMonitor.isActivated(NonProductionGradeDatabaseWarningAdministrativeMonitor.java:19)
at jenkins.model.Jenkins.lambda$getActiveAdministrativeMonitors$4(Jenkins.java:2311)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
After downgrading pipeline-maven-plugin to v3.10.0 and restarting Jenkins server, the database is successfully restarted :
Jun 24, 2022 9:18:39 AM INFO org.jenkinsci.plugins.pipeline.maven.GlobalPipelineMavenConfig getDao
Connect to database jdbc:mysql://mysrv/Jenkins_jobs?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC with username jenkins and properties {dataSource.useServerPrepStmts=true, dataSource.useLocalSessionState=true, dataSource.cacheResultSetMetadata=true, dataSource.cacheServerConfiguration=true, dataSource.elideSetAutoCommits=true, dataSource.rewriteBatchedStatements=true, dataSource.prepStmtCacheSqlLimit=2048, dataSource.maintainTimeStats=false, dataSource.prepStmtCacheSize=250, dataSource.cachePrepStmts=true}
Jun 24, 2022 9:18:39 AM INFO com.zaxxer.hikari.HikariDataSource
HikariPool-1 - Starting...
Jun 24, 2022 9:18:39 AM INFO com.zaxxer.hikari.HikariDataSource
HikariPool-1 - Start completed.
How is it possible to fix this exception thrown by pipeline-maven-plugin v3.11.0 ?
Thanks in advance
- links to