質問編集履歴

1

エラーメッセージの修正

2020/04/16 06:07

投稿

show76
show76

スコア11

test CHANGED
File without changes
test CHANGED
@@ -26,61 +26,71 @@
26
26
 
27
27
  ```エラーメッセージ
28
28
 
29
+ Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
29
30
 
30
-
31
- . ____ _ __ _ _
32
-
33
- /\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
34
-
35
- ( ( )\___ | '_ | '_| | '_ / _` | \ \ \ \
31
+ 2020-04-16 15:03:05.932 ERROR 16144 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed
36
-
37
- \/ ___)| |_)| | | | | || (_| | ) ) ) )
38
-
39
- ' |____| .__|_| |_|_| |_\__, | / / / /
40
-
41
- =========|_|==============|___/=/_/_/_/
42
-
43
- :: Spring Boot :: (v2.1.14.BUILD-SNAPSHOT)
44
32
 
45
33
 
46
34
 
47
- 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)
48
-
49
- 2020-04-16 14:05:00.870 INFO 22844 --- [ restartedMain] com.example.demo.DemoApplication : No active profile set, falling back to default profiles: default
50
-
51
- 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
52
-
53
- 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'
54
-
55
- 2020-04-16 14:05:02.597 INFO 22844 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
56
-
57
- 2020-04-16 14:05:02.625 INFO 22844 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
58
-
59
- 2020-04-16 14:05:02.625 INFO 22844 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.31]
60
-
61
- 2020-04-16 14:05:02.763 INFO 22844 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
62
-
63
- 2020-04-16 14:05:02.763 INFO 22844 --- [ restartedMain] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1838 ms
64
-
65
- 2020-04-16 14:05:02.902 INFO 22844 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
66
-
67
- 2020-04-16 14:05:03.039 INFO 22844 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
68
-
69
- 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"
35
+ 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"
70
36
 
71
37
  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:
72
38
 
73
39
  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]
74
40
 
75
- 2020-04-16 14:05:03.072 INFO 22844 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
41
+ 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]
76
42
 
77
- 2020-04-16 14:05:03.086 INFO 22844 --- [ restartedMain] ConditionEvaluationReportLoggingListener :
43
+ at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
44
+
45
+ at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:376) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
46
+
47
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1404) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
48
+
49
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
50
+
51
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
52
+
53
+ 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]
54
+
55
+ at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$108/1776081523.getObject(Unknown Source) ~[na:na]
56
+
57
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
58
+
59
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
60
+
61
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
62
+
63
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:847) ~[spring-beans-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
64
+
65
+ at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) ~[spring-context-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
66
+
67
+ at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.15.BUILD-SNAPSHOT.jar:5.1.15.BUILD-SNAPSHOT]
68
+
69
+ 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]
70
+
71
+ at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744) [spring-boot-2.1.14.BUILD-SNAPSHOT.jar:2.1.14.BUILD-SNAPSHOT]
72
+
73
+ at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391) [spring-boot-2.1.14.BUILD-SNAPSHOT.jar:2.1.14.BUILD-SNAPSHOT]
74
+
75
+ at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.1.14.BUILD-SNAPSHOT.jar:2.1.14.BUILD-SNAPSHOT]
76
+
77
+ at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.1.14.BUILD-SNAPSHOT.jar:2.1.14.BUILD-SNAPSHOT]
78
+
79
+ at org.springframework.boot.SpringApplication.run(SpringApplication.java:1204) [spring-boot-2.1.14.BUILD-SNAPSHOT.jar:2.1.14.BUILD-SNAPSHOT]
80
+
81
+ at com.example.demo.DemoApplication.main(DemoApplication.java:10) [classes/:na]
82
+
83
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_40]
84
+
85
+ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_40]
86
+
87
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_40]
88
+
89
+ at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_40]
90
+
91
+ 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]
78
92
 
79
93
 
80
-
81
- Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
82
-
83
- 2020-04-16 14:05:03.102 ERROR 22844 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed
84
94
 
85
95
 
86
96