org.quartz.JobPersistenceException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

MySQL doesn't support some types of characters (such as emojis) with the utf8 encoding. You need to be on MySQL 5.5+ and force utf8mb4 (everywhere, client and server). You can do this sending the query "SET NAMES utf8mb4". Check this https://goo.gl/3E2qzg

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Tried to use the plugin with MYSQL. Created the db on localhost mysql named "audit2DB" in global configuration: I have the following for the audit2db configuration: JDBC Driver class: com.mysql.jdbc.Driver JDBC Url: jdbc:mysql://127.0.0.1:3306/audit2db User: root Password: <NULL> I can Test the connection successful. I used the script window to generate the DDL file and run it against my db "audit2db" Now, after saving the config and add "audit to db" post build step, and run the build, I got the following error: Not sure why it says DB is not selected. ====================================================== ERROR: Build step failed with exception org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not load an entity: [org.jenkins.plugins.audit2db.internal.model.BuildDetailsImpl#localhost.localdomain/computer/(master)//test/7]; uncategorized SQLException for SQL [select builddetai0_.id as id78_1_, builddetai0_.duration as duration78_1_, builddetai0_.endDate as endDate78_1_, builddetai0_.fullName as fullName78_1_, builddetai0_.name as name78_1_, builddetai0_.node_url as node10_78_1_, builddetai0_.result as result78_1_, builddetai0_.startDate as startDate78_1_, builddetai0_.userId as userId78_1_, builddetai0_.userName as userName78_1_, buildnodei1_.url as url80_0_, buildnodei1_.description as descript2_80_0_, buildnodei1_.displayName as displayN3_80_0_, buildnodei1_.label as label80_0_, buildnodei1_.masterAddress as masterAd5_80_0_, buildnodei1_.masterHostName as masterHo6_80_0_, buildnodei1_.name as name80_0_ from JENKINS_BUILD_DETAILS builddetai0_ left outer join JENKINS_BUILD_NODE buildnodei1_ on builddetai0_.node_url=buildnodei1_.url where builddetai0_.id=?]; SQL state [3D000]; error code [1046]; No database selected; nested exception is java.sql.SQLException: No database selected at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83) at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424) at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) at org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:512) at org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:506) at org.jenkins.plugins.audit2db.internal.data.BuildDetailsHibernateRepository.getBuildDetailsById(BuildDetailsHibernateRepository.java:121) at org.jenkins.plugins.audit2db.internal.data.BuildDetailsHibernateRepository.getBuildDetailsForBuild(BuildDetailsHibernateRepository.java:307) at org.jenkins.plugins.audit2db.internal.DbAuditPublisherImpl.perform(DbAuditPublisherImpl.java:108) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726) at hudson.model.Build$BuildExecution.cleanUp(Build.java:195) at hudson.model.Run.execute(Run.java:1788) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:381) Caused by: java.sql.SQLException: No database selected at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3847) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3783) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2447) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2594) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1901) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2002) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) at org.hibernate.loader.Loader.getResultSet(Loader.java:1869) at org.hibernate.loader.Loader.doQuery(Loader.java:718) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270) at org.hibernate.loader.Loader.loadEntity(Loader.java:1953) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:86) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:76) at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3270) at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:496) at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:477) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1080) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:997) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:990) at org.springframework.orm.hibernate3.HibernateTemplate$1.doInHibernate(HibernateTemplate.java:519) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406) ... 14 more Build step 'Audit job info to Database' marked build as failure Finished: FAILURE
    via by Kevin Cheng,
  • Tried to use the plugin with MYSQL. Created the db on localhost mysql named "audit2DB" in global configuration: I have the following for the audit2db configuration: JDBC Driver class: com.mysql.jdbc.Driver JDBC Url: jdbc:mysql://127.0.0.1:3306/audit2db User: root Password: <NULL> I can Test the connection successful. I used the script window to generate the DDL file and run it against my db "audit2db" Now, after saving the config and add "audit to db" post build step, and run the build, I got the following error: Not sure why it says DB is not selected. ====================================================== ERROR: Build step failed with exception org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not load an entity: [org.jenkins.plugins.audit2db.internal.model.BuildDetailsImpl#localhost.localdomain/computer/(master)//test/7]; uncategorized SQLException for SQL [select builddetai0_.id as id78_1_, builddetai0_.duration as duration78_1_, builddetai0_.endDate as endDate78_1_, builddetai0_.fullName as fullName78_1_, builddetai0_.name as name78_1_, builddetai0_.node_url as node10_78_1_, builddetai0_.result as result78_1_, builddetai0_.startDate as startDate78_1_, builddetai0_.userId as userId78_1_, builddetai0_.userName as userName78_1_, buildnodei1_.url as url80_0_, buildnodei1_.description as descript2_80_0_, buildnodei1_.displayName as displayN3_80_0_, buildnodei1_.label as label80_0_, buildnodei1_.masterAddress as masterAd5_80_0_, buildnodei1_.masterHostName as masterHo6_80_0_, buildnodei1_.name as name80_0_ from JENKINS_BUILD_DETAILS builddetai0_ left outer join JENKINS_BUILD_NODE buildnodei1_ on builddetai0_.node_url=buildnodei1_.url where builddetai0_.id=?]; SQL state [3D000]; error code [1046]; No database selected; nested exception is java.sql.SQLException: No database selected at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83) at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424) at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) at org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:512) at org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:506) at org.jenkins.plugins.audit2db.internal.data.BuildDetailsHibernateRepository.getBuildDetailsById(BuildDetailsHibernateRepository.java:121) at org.jenkins.plugins.audit2db.internal.data.BuildDetailsHibernateRepository.getBuildDetailsForBuild(BuildDetailsHibernateRepository.java:307) at org.jenkins.plugins.audit2db.internal.DbAuditPublisherImpl.perform(DbAuditPublisherImpl.java:108) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726) at hudson.model.Build$BuildExecution.cleanUp(Build.java:195) at hudson.model.Run.execute(Run.java:1788) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:381) Caused by: java.sql.SQLException: No database selected at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3847) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3783) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2447) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2594) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1901) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2002) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) at org.hibernate.loader.Loader.getResultSet(Loader.java:1869) at org.hibernate.loader.Loader.doQuery(Loader.java:718) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270) at org.hibernate.loader.Loader.loadEntity(Loader.java:1953) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:86) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:76) at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3270) at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:496) at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:477) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1080) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:997) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:990) at org.springframework.orm.hibernate3.HibernateTemplate$1.doInHibernate(HibernateTemplate.java:519) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406) ... 14 more Build step 'Audit job info to Database' marked build as failure Finished: FAILURE
    via by Kevin Cheng,
  • Joins/Lookups on CRUD pages
    via by OldShatterhand,
  • i am getting Hibernate error
    via Stack Overflow by Raji
    ,
    • org.quartz.JobPersistenceException: Couldn't determine job existence (DEFAULT.job1): No database selected [See nested exception: java.sql.SQLException: No database selected] at org.quartz.impl.jdbcjobstore.JobStoreSupport.jobExists(JobStoreSupport.java:1118) at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJob(JobStoreSupport.java:1090) at org.quartz.impl.jdbcjobstore.JobStoreSupport$2.execute(JobStoreSupport.java:1048) at org.quartz.impl.jdbcjobstore.JobStoreSupport$45.execute(JobStoreSupport.java:3735) at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3807) at org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:93) at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInLock(JobStoreSupport.java:3731) at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJobAndTrigger(JobStoreSupport.java:1044) at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:832) at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:250) at com.mcafee.quartz.test.CronSchedClient.scheduleCronJob(CronSchedClient.java:64) at com.mcafee.quartz.test.CronSchedClient.main(CronSchedClient.java:140) Caused by: java.sql.SQLException: No database selected at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1072) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3563) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3495) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2693) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2102) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2261) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76) at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.jobExists(StdJDBCDelegate.java:796) at org.quartz.impl.jdbcjobstore.JobStoreSupport.jobExists(JobStoreSupport.java:1116) ... 11 more

    Users with the same issue

    Unknown visitor1 times, last one,
    ivanszkypeter
    470 times, last one,
    slash
    1 times, last one,
    musketyr
    1 times, last one,
    mauritius
    1 times, last one,
    147 more bugmates