我无法连接到JDBC。尝试连接时出现以下错误:
Wed Jul 25 16:37:30 IST 2018 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.
[2m2018-07-25 16:37:30.821[0;39m [32m INFO[0;39m [35m10908[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.hibernate.tool.hbm2ddl.TableMetadata [0;39m [2m:[0;39m HHH000261: Table found: user_experior_dev_sdk.audit_config_request
[2m2018-07-25 16:37:30.821[0;39m [32m INFO[0;39m [35m10908[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.hibernate.tool.hbm2ddl.TableMetadata [0;39m [2m:[0;39m HHH000037: Columns: [app_session_id, device_id, condition_status, created_at, task_id, capture_type, id, ip_address, rejection_criteria, message, version_key, status]
[2m2018-07-25 16:37:30.835[0;39m [32m INFO[0;39m [35m10908[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.hibernate.tool.hbm2ddl.TableMetadata [0;39m [2m:[0;39m HHH000261: Table found: user_experior_dev_sdk.audit_crash_log_request
[2m2018-07-25 16:37:30.835[0;39m [32m INFO[0;39m [35m10908[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.hibernate.tool.hbm2ddl.TableMetadata [0;39m [2m:[0;39m HHH000037: Columns: [crash_log, app_session_id, device_id, crash_log_s3_url, created_at, task_id, id, ip_address, rejection_criteria, message, version_key, status]
[2m2018-07-25 16:37:30.849[0;39m [32m INFO[0;39m [35m10908[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.hibernate.tool.hbm2ddl.TableMetadata [0;39m [2m:[0;39m HHH000261: Table found: user_experior_dev_sdk.audit_rejected_recordings
[2m2018-07-25 16:37:30.849[0;39m [32m INFO[0;39m [35m10908[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.hibernate.tool.hbm2ddl.TableMetadata [0;39m [2m:[0;39m HHH000037: Columns: [screen_zip_name, app_session_id, screen_desc, device_id, created_at, task_id, ip_address, message, version_key, screen_duration, screen_zip_s3_url, id, rejection_criteria]
[2m2018-07-25 16:37:30.860[0;39m [32m INFO[0;39m [35m10908[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.hibernate.tool.hbm2ddl.TableMetadata [0;39m [2m:[0;39m HHH000261: Table found: user_experior_dev_sdk.batch_processing_records
[2m2018-07-25 16:37:30.861[0;39m [32m INFO[0;39m [35m10908[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.hibernate.tool.hbm2ddl.TableMetadata [0;39m [2m:[0;39m HHH000037: Columns: [screen_zip_name, screen_zip_s3_key, screen_desc, is_video_present, created_at, task_id, ip_address, priority, message, upload_activity_id, job_instance_id, user_task_id, version_key, screen_duration, screen_zip_s3_url, updated_at, is_error, events_file_found, id, is_subscription_updated, status]
[2m2018-07-25 16:37:30.870[0;39m [32m INFO[0;39m [35m10908[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.hibernate.tool.hbm2ddl.TableMetadata [0;39m [2m:[0;39m HHH000261: Table found: user_experior_dev_sdk.device_details
[2m2018-07-25 16:37:30.871[0;39m [32m INFO[0;39m [35m10908[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.hibernate.tool.hbm2ddl.TableMetadata [0;39m [2m:[0;39m HHH000037: Columns: [api_level, device_id, user_id, mac_address, os_version, model, id, manufacturer]
[2m2018-07-25 16:37:30.871[0;39m [33m WARN[0;39m [35m10908[0;39m [2m---[0;39m [2m[ main][0;39m [36mationConfigEmbeddedWebApplicationContext[0;39m [2m:[0;39m 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.HibernateException: Missing column: connection_speed in user_experior_dev_sdk.device_details
[2m2018-07-25 16:37:30.881[0;39m [32m INFO[0;39m [35m10908[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.apache.catalina.core.StandardService [0;39m [2m:[0;39m Stopping service Tomcat
[2m2018-07-25 16:37:30.906[0;39m [33m WARN[0;39m [35m10908[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.s.boot.SpringApplication [0;39m [2m:[0;39m Error handling failed (Error creating bean with name 'zuulRefreshRoutesListener' defined in class org.springframework.cloud.netflix.zuul.ZuulProxyConfiguration: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.config.internalCacheAdvisor' defined in class path resource [org/springframework/cache/annotation/ProxyCachingConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cache.interceptor.BeanFactoryCacheOperationSourceAdvisor]: Factory method 'cacheAdvisor' threw exception; nested exception is java.lang.NullPointerException)
[2m2018-07-25 16:37:30.907[0;39m [31mERROR[0;39m [35m10908[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.s.boot.SpringApplication [0;39m [2m:[0;39m 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.HibernateException: Missing column: connection_speed in user_experior_dev_sdk.device_details
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
下面是我的POM文件:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.test</groupId>
<artifactId>user-experior-jobs</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>User Experior Jobs</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.0.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<dependencies>
<dependency>
<groupId>com.userexperior.common</groupId>
<artifactId>user-experior-common</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
<!-- <exclusions> <exclusion> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId> </exclusion> </exclusions> -->
</dependency>
<!-- <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId>
<version>2.2.3</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId> <version>2.2.3</version> </dependency>
<dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId>
<version>2.2.3</version> </dependency> -->
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-redis</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-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<!-- <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy</artifactId>
</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-batch</artifactId>
</dependency>
<!-- Spring Batch unit test -->
<dependency>
<groupId>org.springframework.batch</groupId>
<artifactId>spring-batch-test</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<version>2.2.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpmime -->
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-io -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.3.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.5</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.11</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-logging/commons-logging -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.7</java.version>
<jackson.version>2.6.0</jackson.version>
<start-class>com.userexperior.jobs.UserExperiorJobsApplication</start-class>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerId>groovy-eclipse-compiler</compilerId>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-compiler</artifactId>
<version>2.8.0-01</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-batch</artifactId>
<version>2.1.8-01</version>
</dependency>
</dependencies>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<versionRange>
[3.1,)
</versionRange>
<goals>
<goal>testCompile</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<repositories>
<repository>
<id>spring-milestones</id>
<url>http://repo.spring.io/libs-milestone-local</url>
</repository>
</repositories>
我已将其配置为连接到我创建的数据库,但是它仍从另一个数据库获取,并出现上述错误。
我创建并指向的数据库是:user_experior_local_sdk
。
错误处显示:Table found: user_experior_dev_sdk