org.springframework.beans.factory.BeanCreationException

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.

  • Spring Boot + MySQL5: Errcode 13
    via Stack Overflow by user2035039
    ,
  • Can't refresh MySQL DB structure
    via by Unknown author,
  • JDBC:Connection Issue When Run program
    via Stack Overflow by hamel123
    ,
  • After End Of Result set error?
    via by Unknown author,
  • GitHub comment 598#140930847
    via GitHub by g0t4
    ,
    • org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1583)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1076)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:851)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE] at org.kehrbusch.butler.authentication.app.Bootstrapper.main(Bootstrapper.java:18)[classes/:na] Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:954)[hibernate-entitymanager-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:882)[hibernate-entitymanager-5.0.11.Final.jar:5.0.11.Final] at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60)[spring-orm-4.3.3.RELEASE.jar:4.3.3.RELEASE] at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:353)[spring-orm-4.3.3.RELEASE.jar:4.3.3.RELEASE] at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:373)[spring-orm-4.3.3.RELEASE.jar:4.3.3.RELEASE] at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:362)[spring-orm-4.3.3.RELEASE.jar:4.3.3.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1642)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1579)[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE] ... 16 more Caused by: org.hibernate.exception.GenericJDBCException: Error accessing column metadata: butler-test.u_authority at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:95)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.convertSQLException(InformationExtractorJdbcDatabaseMetaDataImpl.java:99)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.getColumn(InformationExtractorJdbcDatabaseMetaDataImpl.java:481)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.tool.schema.extract.internal.TableInformationImpl.getColumn(TableInformationImpl.java:68)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.mapping.Table.sqlAlterStrings(Table.java:456)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.tool.schema.internal.SchemaMigratorImpl.migrateTable(SchemaMigratorImpl.java:254)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigrationToTargets(SchemaMigratorImpl.java:170)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigration(SchemaMigratorImpl.java:60)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:134)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:101)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:472)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:879)[hibernate-entitymanager-5.0.11.Final.jar:5.0.11.Final] ... 22 more Caused by: java.sql.SQLException: Error on delete of 'C:\xampp\tmp\#sql1068_9_2.MYI' (Errcode: 13 - Permission denied) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:963)[mysql-connector-java-5.1.39.jar:5.1.39] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3966)[mysql-connector-java-5.1.39.jar:5.1.39] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3902)[mysql-connector-java-5.1.39.jar:5.1.39] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:875)[mysql-connector-java-5.1.39.jar:5.1.39] at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1991)[mysql-connector-java-5.1.39.jar:5.1.39] at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:3403)[mysql-connector-java-5.1.39.jar:5.1.39] at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:470)[mysql-connector-java-5.1.39.jar:5.1.39] at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3105)[mysql-connector-java-5.1.39.jar:5.1.39] at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2336)[mysql-connector-java-5.1.39.jar:5.1.39] at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2729)[mysql-connector-java-5.1.39.jar:5.1.39] at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545)[mysql-connector-java-5.1.39.jar:5.1.39] at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2503)[mysql-connector-java-5.1.39.jar:5.1.39] at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1369)[mysql-connector-java-5.1.39.jar:5.1.39] at com.mysql.jdbc.DatabaseMetaData$2.forEach(DatabaseMetaData.java:2430)[mysql-connector-java-5.1.39.jar:5.1.39] at com.mysql.jdbc.DatabaseMetaData$2.forEach(DatabaseMetaData.java:2341)[mysql-connector-java-5.1.39.jar:5.1.39] at com.mysql.jdbc.IterateBlock.doForAll(IterateBlock.java:50)[mysql-connector-java-5.1.39.jar:5.1.39] at com.mysql.jdbc.DatabaseMetaData.getColumns(DatabaseMetaData.java:2339)[mysql-connector-java-5.1.39.jar:5.1.39] at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.getColumn(InformationExtractorJdbcDatabaseMetaDataImpl.java:454)[hibernate-core-5.0.11.Final.jar:5.0.11.Final] ... 32 more

    Users with the same issue

    ivanszkypeterivanszkypeter
    470 times, last one,
    linxiaolonglinxiaolong
    1 times, last one,
    rocdayrocday
    1 times, last one,
    slashslash
    1 times, last one,
    zbalintzbalint
    4 times, last one,
    145 more bugmates