亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

建立表的時候出問題

Error creating bean with name 'entityManagerFactory' defined in class path resource 這個報錯怎么處理的?

正在回答

2 回答

這個錯誤的原因是數據庫鏈接不上,可能是username或者password填寫的不正確

0 回復 有任何疑惑可以回復我~

2017-06-22 10:58:02.611 ?INFO 9984 --- [ ? ? ? ? ? main] com.imooc.GirlApplication ? ? ? ? ? ? ? ?: Starting GirlApplication on PC-20150629HVYU with PID 9984 (D:\fer\girl\target\classes started by Administrator in D:\fer\girl)

2017-06-22 10:58:02.618 ?INFO 9984 --- [ ? ? ? ? ? main] com.imooc.GirlApplication ? ? ? ? ? ? ? ?: The following profiles are active: a

2017-06-22 10:58:02.735 ?INFO 9984 --- [ ? ? ? ? ? main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@1198b989: startup date [Thu Jun 22 10:58:02 CST 2017]; root of context hierarchy

2017-06-22 10:58:06.563 ?INFO 9984 --- [ ? ? ? ? ? main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)

2017-06-22 10:58:06.600 ?INFO 9984 --- [ ? ? ? ? ? main] o.apache.catalina.core.StandardService ? : Starting service [Tomcat]

2017-06-22 10:58:06.603 ?INFO 9984 --- [ ? ? ? ? ? main] org.apache.catalina.core.StandardEngine ?: Starting Servlet Engine: Apache Tomcat/8.5.15

2017-06-22 10:58:07.093 ?INFO 9984 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] ? ? ? : Initializing Spring embedded WebApplicationContext

2017-06-22 10:58:07.094 ?INFO 9984 --- [ost-startStop-1] o.s.web.context.ContextLoader ? ? ? ? ? ?: Root WebApplicationContext: initialization completed in 4368 ms

2017-06-22 10:58:07.543 ?INFO 9984 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean ?: Mapping servlet: 'dispatcherServlet' to [/]

2017-06-22 10:58:07.552 ?INFO 9984 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean ? : Mapping filter: 'characterEncodingFilter' to: [/*]

2017-06-22 10:58:07.553 ?INFO 9984 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean ? : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]

2017-06-22 10:58:07.554 ?INFO 9984 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean ? : Mapping filter: 'httpPutFormContentFilter' to: [/*]

2017-06-22 10:58:07.554 ?INFO 9984 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean ? : Mapping filter: 'requestContextFilter' to: [/*]

Thu Jun 22 10:58:08 CST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

Thu Jun 22 10:58:08 CST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

Thu Jun 22 10:58:08 CST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

Thu Jun 22 10:58:08 CST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

Thu Jun 22 10:58:08 CST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

Thu Jun 22 10:58:08 CST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

Thu Jun 22 10:58:08 CST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

Thu Jun 22 10:58:08 CST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

Thu Jun 22 10:58:08 CST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

Thu Jun 22 10:58:08 CST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

2017-06-22 10:58:08.902 ?INFO 9984 --- [ ? ? ? ? ? main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'

2017-06-22 10:58:08.944 ?INFO 9984 --- [ ? ? ? ? ? main] o.hibernate.jpa.internal.util.LogHelper ?: HHH000204: Processing PersistenceUnitInfo [

name: default

...]

2017-06-22 10:58:09.139 ?INFO 9984 --- [ ? ? ? ? ? main] org.hibernate.Version ? ? ? ? ? ? ? ? ? ?: HHH000412: Hibernate Core {5.0.12.Final}

2017-06-22 10:58:09.144 ?INFO 9984 --- [ ? ? ? ? ? main] org.hibernate.cfg.Environment ? ? ? ? ? ?: HHH000206: hibernate.properties not found

2017-06-22 10:58:09.147 ?INFO 9984 --- [ ? ? ? ? ? main] org.hibernate.cfg.Environment ? ? ? ? ? ?: HHH000021: Bytecode provider name : javassist

2017-06-22 10:58:09.294 ?INFO 9984 --- [ ? ? ? ? ? main] o.hibernate.annotations.common.Version ? : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}

2017-06-22 10:58:09.557 ?INFO 9984 --- [ ? ? ? ? ? main] org.hibernate.dialect.Dialect ? ? ? ? ? ?: HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect

2017-06-22 10:58:09.871 ?WARN 9984 --- [ ? ? ? ? ? main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: 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 org.hibernate.AnnotationException: No identifier specified for entity: com.imooc.Girl

2017-06-22 10:58:09.881 ?INFO 9984 --- [ ? ? ? ? ? main] o.apache.catalina.core.StandardService ? : Stopping service [Tomcat]

2017-06-22 10:58:09.931 ?INFO 9984 --- [ ? ? ? ? ? main] utoConfigurationReportLoggingInitializer :?


Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.

2017-06-22 10:58:09.958 ERROR 9984 --- [ ? ? ? ? ? main] o.s.boot.SpringApplication ? ? ? ? ? ? ? : Application startup failed


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 org.hibernate.AnnotationException: No identifier specified for entity: com.imooc.Girl

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1078) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:857) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]

at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]

at com.imooc.GirlApplication.main(GirlApplication.java:10) [classes/:na]

Caused by: org.hibernate.AnnotationException: No identifier specified for entity: com.imooc.Girl

at org.hibernate.cfg.InheritanceState.determineDefaultAccessType(InheritanceState.java:265) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]

at org.hibernate.cfg.InheritanceState.getElementsToProcess(InheritanceState.java:211) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]

at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:717) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]

at org.hibernate.boot.model.source.internal.annotations.AnnotationMetadataSourceProcessorImpl.processEntityHierarchies(AnnotationMetadataSourceProcessorImpl.java:245) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]

at org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.processEntityHierarchies(MetadataBuildingProcess.java:222) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]

at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:265) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]

at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:847) ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]

at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:874) ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]

at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60) ~[spring-orm-4.3.9.RELEASE.jar:4.3.9.RELEASE]

at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:353) ~[spring-orm-4.3.9.RELEASE.jar:4.3.9.RELEASE]

at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:370) ~[spring-orm-4.3.9.RELEASE.jar:4.3.9.RELEASE]

at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:359) ~[spring-orm-4.3.9.RELEASE.jar:4.3.9.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]

... 16 common frames omitted



Process finished with exit code 1


0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
2小時學會Spring Boot
  • 參與學習       151526    人
  • 解答問題       1132    個

Spring Boot入門視頻教程,你將學會使用Spring Boot快速構建應用程序

進入課程

建立表的時候出問題

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號