Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-7769

Fix warnings from DB CLI

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: EJBCA 7.0.0
    • Fix Version/s: EJBCA 7.0.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      EJBCA Team Bob - 2019 w2

      Description

      Since the upgrade of Hibernate to 5.4, we are getting warnings that we can ignore:

      HHH10001002: Using Hibernate built-in connection pool (not for production use!)
      Could not fetch the SequenceInformation from the database
      java.sql.SQLSyntaxErrorException: Unknown table 'sequences' in information_schema
      	at org.mariadb.jdbc.internal.SQLExceptionMapper.get(SQLExceptionMapper.java:138)
      	at org.mariadb.jdbc.internal.SQLExceptionMapper.throwException(SQLExceptionMapper.java:106)
      	at org.mariadb.jdbc.MySQLStatement.executeQueryEpilog(MySQLStatement.java:268)
      	at org.mariadb.jdbc.MySQLStatement.execute(MySQLStatement.java:296)
      	at org.mariadb.jdbc.MySQLStatement.executeQuery(MySQLStatement.java:310)
      	at org.mariadb.jdbc.MySQLStatement.executeQuery(MySQLStatement.java:369)
      	at org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorLegacyImpl.extractMetadata(SequenceInformationExtractorLegacyImpl.java:42)
      	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl.sequenceInformationList(JdbcEnvironmentImpl.java:403)
      	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl.<init>(JdbcEnvironmentImpl.java:268)
      	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:114)
      	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
      	at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101)
      	at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
      	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
      	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
      	at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:152)
      	at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286)
      	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243)
      	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
      	at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:175)
      	at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:118)
      	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:903)
      	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:934)
      	at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:56)
      	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
      	at org.ejbca.database.DatabaseSchemaScriptCommand.createEntityManagerFactorySilenceWarnings(DatabaseSchemaScriptCommand.java:91)
      	at org.ejbca.database.DatabaseSchemaScriptCommand.createSqlScripts(DatabaseSchemaScriptCommand.java:155)
      	at org.ejbca.database.DatabaseSchemaScriptCommand.execute(DatabaseSchemaScriptCommand.java:73)
      	at org.ejbca.database.CliCommandHelper.executeCommand(CliCommandHelper.java:144)
      	at org.ejbca.database.CliCommandHelper.searchAndRun(CliCommandHelper.java:64)
      	at org.ejbca.database.DatabaseCli.main(DatabaseCli.java:22)
      Caused by: org.mariadb.jdbc.internal.common.QueryException: Unknown table 'sequences' in information_schema
      	at org.mariadb.jdbc.internal.mysql.MySQLProtocol.getResult(MySQLProtocol.java:982)
      	at org.mariadb.jdbc.internal.mysql.MySQLProtocol.executeQuery(MySQLProtocol.java:1042)
      	at org.mariadb.jdbc.MySQLStatement.execute(MySQLStatement.java:289)
      	... 27 more
      

      These are logged using log4j, so they can be turned off. Investigate which class is logging them and decrease the log level to WARN or ERROR (currently, it is INFO).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              samuel Samuel Lidén Borell
              Reporter:
              samuel Samuel Lidén Borell
              Verified by:
              Andrey Sergeev
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 30 minutes Original Estimate - 30 minutes
                  30m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 15 minutes
                  1h 15m