質問するログイン新規登録

質問編集履歴

1

エラーメッセージの修正

2020/04/16 06:07

投稿

show76
show76

スコア11

title CHANGED
File without changes
body CHANGED
@@ -12,34 +12,39 @@
12
12
  教えていただけると嬉しいです。
13
13
 
14
14
  ```エラーメッセージ
15
+ Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
16
+ 2020-04-16 15:03:05.932 ERROR 16144 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed
15
17
 
16
- . ____ _ __ _ _
17
- /\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
18
- ( ( )\___ | '_ | '_| | '_ / _` | \ \ \ \
19
- \/ ___)| |_)| | | | | || (_| | ) ) ) )
20
- ' |____| .__|_| |_|_| |_\__, | / / / /
21
- =========|_|==============|___/=/_/_/_/
22
- :: Spring Boot :: (v2.1.14.BUILD-SNAPSHOT)
23
-
24
- 2020-04-16 14:05:00.866 INFO 22844 --- [ restartedMain] com.example.demo.DemoApplication : Starting DemoApplication on MyComputer with PID 22844 (C:\Users\kumai\OneDrive\仕事\個人\JAVA\WorkspaceJAVA\demo\target\classes started by kumai in C:\Users\kumai\OneDrive\仕事\個人\JAVA\WorkspaceJAVA\demo)
25
- 2020-04-16 14:05:00.870 INFO 22844 --- [ restartedMain] com.example.demo.DemoApplication : No active profile set, falling back to default profiles: default
26
- 2020-04-16 14:05:00.924 INFO 22844 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
27
- 2020-04-16 14:05:00.925 INFO 22844 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
28
- 2020-04-16 14:05:02.597 INFO 22844 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
29
- 2020-04-16 14:05:02.625 INFO 22844 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
30
- 2020-04-16 14:05:02.625 INFO 22844 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.31]
31
- 2020-04-16 14:05:02.763 INFO 22844 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
32
- 2020-04-16 14:05:02.763 INFO 22844 --- [ restartedMain] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1838 ms
33
- 2020-04-16 14:05:02.902 INFO 22844 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
34
- 2020-04-16 14:05:03.039 INFO 22844 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
35
- 2020-04-16 14:05:03.069 WARN 22844 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'itemController': Unsatisfied dependency expressed through field 'itemService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'itemService': Unsatisfied dependency expressed through field 'itemMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'itemMapper' defined in file [C:\Users\kumai\OneDrive\仕事\個人\JAVA\WorkspaceJAVA\demo\target\classes\com\example\demo\mapper\ItemMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker': Invocation of init method failed; nested exception is org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement #1 of URL [file:/C:/Users/kumai/OneDrive/%e4%bb%95%e4%ba%8b/%e5%80%8b%e4%ba%ba/JAVA/WorkspaceJAVA/demo/target/classes/schema.sql]: CREATE TABLE IF NOT EXISTS item ( id bigint(20) NOT NULL AUTO_INCREMENT, name varchar(255), price real, vendor varchar(255), PRIMARY KEY (id), ) ENGINE=InnoDB DEFAULT CHARSET=utf8; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: SQLステートメントに文法エラーがあります "CREATE TABLE IF NOT EXISTS ITEM ( ID BIGINT(20) NOT NULL AUTO_INCREMENT, NAME VARCHAR(255), PRICE REAL, VENDOR VARCHAR(255), PRIMARY KEY (ID), )[*] ENGINE=INNODB DEFAULT CHARSET=UTF8"; 期待されるステートメント "identifier"
18
+ org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'itemController': Unsatisfied dependency expressed through field 'itemService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'itemService': Unsatisfied dependency expressed through field 'itemMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'itemMapper' defined in file [C:\Users\kumai\OneDrive\仕事\個人\JAVA\WorkspaceJAVA\demo\target\classes\com\example\demo\mapper\ItemMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker': Invocation of init method failed; nested exception is org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement #1 of URL [file:/C:/Users/kumai/OneDrive/%e4%bb%95%e4%ba%8b/%e5%80%8b%e4%ba%ba/JAVA/WorkspaceJAVA/demo/target/classes/schema.sql]: CREATE TABLE IF NOT EXISTS item ( id bigint(20) NOT NULL AUTO_INCREMENT, name varchar(255), price real, vendor varchar(255), PRIMARY KEY (id), ) ENGINE=InnoDB DEFAULT CHARSET=utf8; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: SQLステートメントに文法エラーがあります "CREATE TABLE IF NOT EXISTS ITEM ( ID BIGINT(20) NOT NULL AUTO_INCREMENT, NAME VARCHAR(255), PRICE REAL, VENDOR VARCHAR(255), PRIMARY KEY (ID), )[*] ENGINE=INNODB DEFAULT CHARSET=UTF8"; 期待されるステートメント "identifier"
36
19
  Syntax error in SQL statement "CREATE TABLE IF NOT EXISTS ITEM ( ID BIGINT(20) NOT NULL AUTO_INCREMENT, NAME VARCHAR(255), PRICE REAL, VENDOR VARCHAR(255), PRIMARY KEY (ID), )[*] ENGINE=INNODB DEFAULT CHARSET=UTF8"; expected "identifier"; SQL statement:
37
20
  CREATE TABLE IF NOT EXISTS item ( id bigint(20) NOT NULL AUTO_INCREMENT, name varchar(255), price real, vendor varchar(255), PRIMARY KEY (id), ) ENGINE=InnoDB DEFAULT CHARSET=utf8 [42001-200]
38
- 2020-04-16 14:05:03.072 INFO 22844 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
39
- 2020-04-16 14:05:03.086 INFO 22844 --- [ restartedMain] ConditionEvaluationReportLoggingListener :
21
+ at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:598) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
22
+ at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
23
+ at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:376) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
24
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1404) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
25
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
26
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
27
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
28
+ at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$108/1776081523.getObject(Unknown Source) ~[na:na]
29
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
30
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
31
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
32
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:847) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
33
+ at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) ~[spring-context-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
34
+ at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
35
+ at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.1.14.BUILD-SNAPSHOT.jar:2.1.14.BUILD-SNAPSHOT]
36
+ at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744) [spring-boot-2.1.14.BUILD-SNAPSHOT.jar:2.1.14.BUILD-SNAPSHOT]
37
+ at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391) [spring-boot-2.1.14.BUILD-SNAPSHOT.jar:2.1.14.BUILD-SNAPSHOT]
38
+ at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.1.14.BUILD-SNAPSHOT.jar:2.1.14.BUILD-SNAPSHOT]
39
+ at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.1.14.BUILD-SNAPSHOT.jar:2.1.14.BUILD-SNAPSHOT]
40
+ at org.springframework.boot.SpringApplication.run(SpringApplication.java:1204) [spring-boot-2.1.14.BUILD-SNAPSHOT.jar:2.1.14.BUILD-SNAPSHOT]
41
+ at com.example.demo.DemoApplication.main(DemoApplication.java:10) [classes/:na]
42
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_40]
43
+ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_40]
44
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_40]
45
+ at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_40]
46
+ at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.1.14.BUILD-SNAPSHOT.jar:2.1.14.BUILD-SNAPSHOT]
40
47
 
41
- Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
42
- 2020-04-16 14:05:03.102 ERROR 22844 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed
43
48
 
44
49
 
45
50
  ```