Problemas criação tabela banco de dados

1 resposta
devops

Boa noite pessoal, tento criar uma tabela no banco e obtive problemas. Como possibilitar essa criação?
Eu utilizo Win 8, Wamp Server, MySQL Workbench e o Eclipse com Springboot configurado. Tentei de tudo aqui mas não corrigi.

Arquivo pom.xml:

<?xml version="1.0" encoding="UTF-8"?>


4.0.0

org.springframework.boot
spring-boot-starter-parent
2.1.8.RELEASE


com.eventoapp
eventoapp
0.0.1-SNAPSHOT
eventoapp
jar
Demo project for Spring Boot

<properties>
	<java.version>1.8</java.version>
</properties>

<dependencies>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-thymeleaf</artifactId>
	</dependency>
	
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-web</artifactId>
	</dependency>

	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-security</artifactId>
	</dependency>
	
	<dependency>
		<groupId>org.springframework.session</groupId>
		<artifactId>spring-session-core</artifactId>
	</dependency>

	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-devtools</artifactId>
		<scope>runtime</scope>
		<optional>true</optional>
	</dependency>
	
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-test</artifactId>
		<scope>test</scope>
	</dependency>	
	
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
	
	<dependency>
	<groupId>mysql</groupId>
	<artifactId>mysql-connector-java</artifactId>
	<version>5.1.40</version>
	<scope>compile</scope>
	</dependency>
	
	<dependency>
		<groupId>org.postgresql</groupId>
		<artifactId>postgresql</artifactId>
		<version>9.4.1208</version>
	</dependency>
	
	<dependency>
		<groupId>org.apache.commons</groupId>
		<artifactId>commons-dbcp2</artifactId>
		<version>${commons-dbcp2.version}</version>
		<scope>compile</scope>
	</dependency>
</dependencies>
	
<build>
	<plugins>
		<plugin>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-maven-plugin</artifactId>
		</plugin>
	</plugins>
</build>
_____________________________________________________________________________

Log do teste:

. ____ _ __ _ _
/\ / __ _ () __ __ _ \ \ \
( ( )_
_ | '_ | '| | ’ / ` | \ \ \
\/ )| |)| | | | | || (| | ) ) ) )
’ |
| .__|| ||| |_, | / / / /
=========|
|==============|/=////
:: Spring Boot :: (v2.1.8.RELEASE)

2019-09-22 00:40:38.501  INFO 2088  [  restartedMain] c.e.eventoapp.EventoappApplication       : Starting EventoappApplication on Ayrtun with PID 2088 (started by Ayrtun Augusto in C:\Users\Ayrtun Augusto\eclipse-workspace\eventoapp)

2019-09-22 00:40:38.512  INFO 2088  [  restartedMain] c.e.eventoapp.EventoappApplication       : No active profile set, falling back to default profiles: default

2019-09-22 00:40:38.846  INFO 2088  [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set spring.devtools.add-properties to false to disable

2019-09-22 00:40:38.846  INFO 2088  [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the logging.level.web property to DEBUG

2019-09-22 00:40:42.884  INFO 2088  [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.

2019-09-22 00:40:42.962  INFO 2088  [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 55ms. Found 0 repository interfaces.

2019-09-22 00:40:44.732  INFO 2088  [  restartedMain] trationDelegate$BeanPostProcessorChecker : Bean org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$9693047] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2019-09-22 00:40:46.903  INFO 2088  [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)

2019-09-22 00:40:47.019  INFO 2088  [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]

2019-09-22 00:40:47.020  INFO 2088  [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.24]

2019-09-22 00:40:47.635  INFO 2088  [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext

2019-09-22 00:40:47.635  INFO 2088  [  restartedMain] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 8789 ms

2019-09-22 00:40:48.369  INFO 2088  [  restartedMain] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [

name: default

]

2019-09-22 00:40:48.771  INFO 2088  [  restartedMain] org.hibernate.Version                    : HHH000412: Hibernate Core {5.3.11.Final}

2019-09-22 00:40:48.776  INFO 2088  [  restartedMain] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found

2019-09-22 00:40:49.369  INFO 2088  [  restartedMain] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}

Sun Sep 22 00:40:50 BRT 2019 WARN: Establishing SSL connection without servers 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 isnt 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.

2019-09-22 00:40:50.524  INFO 2088  [  restartedMain] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect

Hibernate: drop table if exists evento

Sun Sep 22 00:40:52 BRT 2019 WARN: Establishing SSL connection without servers 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 isnt 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.

Hibernate: drop table if exists hibernate_sequence

Hibernate: create table evento (codigo bigint not null, data varchar(255), horario varchar(255), local varchar(255), nome varchar(255), primary key (codigo)) engine=MyISAM

Sun Sep 22 00:40:52 BRT 2019 WARN: Establishing SSL connection without servers 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 isnt 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.

Hibernate: create table hibernate_sequence (next_val bigint) engine=MyISAM

Hibernate: insert into hibernate_sequence values ( 1 )

2019-09-22 00:40:52.742  INFO 2088  [  restartedMain] o.h.t.schema.internal.SchemaCreatorImpl  : HHH000476: Executing import script org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl@3eb90051

2019-09-22 00:40:52.752  INFO 2088  [  restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit default

2019-09-22 00:40:52.858  INFO 2088  [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729

2019-09-22 00:40:54.029  INFO 2088  [  restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService applicationTaskExecutor

2019-09-22 00:40:54.280  WARN 2088  [  restartedMain] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning

2019-09-22 00:40:54.504  INFO 2088  [  restartedMain] o.s.b.a.w.s.WelcomePageHandlerMapping    : Adding welcome page template: index

2019-09-22 00:40:55.590  INFO 2088  [  restartedMain] .s.s.UserDetailsServiceAutoConfiguration :

Using generated security password: 3b1b22af-dcb6-46cc-84fd-8e464125d4e9

2019-09-22 00:40:56.028 INFO 2088 — [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@57357a26, org.springframework.security.web.context.SecurityContextPersistenceFilter@540ffc65, org.springframework.security.web.header.HeaderWriterFilter@5b8f1a65, org.springframework.security.web.csrf.CsrfFilter@1c05a3ce, org.springframework.security.web.authentication.logout.LogoutFilter@394e256c, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@7cd5f386, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@737bdc1c, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter@48e922b9, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@766d43da, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@6312ab54, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@7ed1bca7, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@7b267a87, org.springframework.security.web.session.SessionManagementFilter@597f41a1, org.springframework.security.web.access.ExceptionTranslationFilter@7abde785, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@6dd2575d]
2019-09-22 00:40:56.565 INFO 2088 — [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ‘’
2019-09-22 00:40:56.573 INFO 2088 — [ restartedMain] c.e.eventoapp.EventoappApplication : Started EventoappApplication in 19.98 seconds (JVM running for 24.336)

1 Resposta

Jothar_Aleksander

Nesse log que tu postou não há erros, só alertas. Como está o Hibernate.cfg.xml?

Criado 22 de setembro de 2019
Ultima resposta 22 de set. de 2019
Respostas 1
Participantes 2