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

質問編集履歴

4

POM.XML修正

2021/08/11 04:46

投稿

tarou124
tarou124

スコア2

title CHANGED
File without changes
body CHANGED
@@ -205,7 +205,7 @@
205
205
  </properties>
206
206
 
207
207
  <build>
208
- <finalName>admin</finalName>
208
+ <finalName>XXXXX</finalName>
209
209
  <plugins>
210
210
  <plugin>
211
211
  <groupId>org.springframework.boot</groupId>

3

pom.xmlの追記

2021/08/11 04:46

投稿

tarou124
tarou124

スコア2

title CHANGED
File without changes
body CHANGED
@@ -19,9 +19,225 @@
19
19
  mvn spring-boot:runをしましたが、上記のエラーとなってしまっています。
20
20
  ※ その間に色々なエラーが出ましたが1つずつ解消していきました。
21
21
 
22
+ POM.XMLは以下のようになっています。
23
+ ```pom.xml
24
+ <?xml version="1.0" encoding="UTF-8"?>
25
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
26
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
22
- コードは全て載せられないのですが、thymeleafに関する設定だとpom.xmlに以下を入れています。
27
+ <modelVersion>4.0.0</modelVersion>
28
+
29
+ <groupId>XXXX</groupId>
30
+ <artifactId>XXXX</artifactId>
31
+ <version>1.0.11-SNAPSHOT</version>
32
+ <packaging>war</packaging>
33
+
23
- 他に必要な定義などありますでしょうか‥?
34
+ <name>XXXX</name>
35
+
24
- <dependency>
36
+ <parent>
25
37
  <groupId>org.springframework.boot</groupId>
38
+ <artifactId>spring-boot-starter-parent</artifactId>
39
+ <version>2.5.0</version>
40
+ </parent>
41
+
42
+ <dependencies>
43
+
44
+ <dependency>
45
+ <groupId>com.example</groupId>
46
+ <artifactId>XXXX-XXXX</artifactId>
47
+ <version>1.0.11-SNAPSHOT</version>
48
+ </dependency>
49
+
50
+ <dependency>
51
+ <groupId>org.springframework.boot</groupId>
52
+ <artifactId>spring-boot-starter-web</artifactId>
53
+ </dependency>
54
+ <dependency>
55
+ <groupId>org.springframework.boot</groupId>
26
- <artifactId>spring-boot-starter-thymeleaf</artifactId>
56
+ <artifactId>spring-boot-starter-thymeleaf</artifactId>
27
- </dependency>
57
+ </dependency>
58
+
59
+ <dependency>
60
+ <groupId>org.springframework.boot</groupId>
61
+ <artifactId>spring-boot-starter-data-jpa</artifactId>
62
+ </dependency>
63
+
64
+ <dependency>
65
+ <groupId>org.webjars</groupId>
66
+ <artifactId>bootstrap</artifactId>
67
+ <version>3.2.0</version>
68
+ <scope>provided</scope>
69
+ </dependency>
70
+ <dependency>
71
+ <groupId>org.lazyluke</groupId>
72
+ <artifactId>log4jdbc-remix</artifactId>
73
+ <version>0.2.7</version>
74
+ <scope>provided</scope>
75
+ </dependency>
76
+ <dependency>
77
+ <groupId>org.projectlombok</groupId>
78
+ <artifactId>lombok</artifactId>
79
+ <version>1.18.20</version>
80
+ <scope>provided</scope>
81
+ </dependency>
82
+ <dependency>
83
+ <groupId>org.springframework.boot</groupId>
84
+ <artifactId>spring-boot-starter-test</artifactId>
85
+ <scope>test</scope>
86
+ </dependency>
87
+ <dependency>
88
+ <groupId>mysql</groupId>
89
+ <artifactId>mysql-connector-java</artifactId>
90
+ <scope>runtime</scope>
91
+ </dependency>
92
+ <dependency>
93
+ <groupId>org.apache.velocity</groupId>
94
+ <artifactId>velocity</artifactId>
95
+ <version>1.7</version>
96
+ <scope>compile</scope>
97
+ </dependency>
98
+ <dependency>
99
+ <groupId>org.springframework</groupId>
100
+ <artifactId>spring-context-support</artifactId>
101
+ <scope>compile</scope>
102
+ </dependency>
103
+ <dependency>
104
+ <groupId>org.springframework.boot</groupId>
105
+ <artifactId>spring-boot-starter-mail</artifactId>
106
+ <version>1.2.1.RELEASE</version>
107
+ <scope>provided</scope>
108
+ </dependency>
109
+ <dependency>
110
+ <groupId>javax.mail</groupId>
111
+ <artifactId>mail</artifactId>
112
+ <version>1.4</version>
113
+ <scope>compile</scope>
114
+ </dependency>
115
+ <dependency>
116
+ <groupId>org.springframework.boot</groupId>
117
+ <artifactId>spring-boot-starter-security</artifactId>
118
+ <scope>provided</scope>
119
+ </dependency>
120
+ <dependency>
121
+ <groupId>org.springframework.security</groupId>
122
+ <artifactId>spring-security-core</artifactId>
123
+ <version>3.2.5.RELEASE</version>
124
+ </dependency>
125
+ <dependency>
126
+ <groupId>org.springframework.security</groupId>
127
+ <artifactId>spring-security-web</artifactId>
128
+ <version>3.2.5.RELEASE</version>
129
+ </dependency>
130
+ <dependency>
131
+ <groupId>org.springframework.security</groupId>
132
+ <artifactId>spring-security-config</artifactId>
133
+ <version>3.2.5.RELEASE</version>
134
+ </dependency>
135
+ <dependency>
136
+ <groupId>org.apache.poi</groupId>
137
+ <artifactId>poi</artifactId>
138
+ <version>3.11</version>
139
+ <scope>provided</scope>
140
+ </dependency>
141
+ <dependency>
142
+ <groupId>org.apache.poi</groupId>
143
+ <artifactId>poi-ooxml</artifactId>
144
+ <version>3.11</version>
145
+ <scope>provided</scope>
146
+ </dependency>
147
+ <dependency>
148
+ <groupId>org.apache.poi</groupId>
149
+ <artifactId>poi-ooxml-schemas</artifactId>
150
+ <version>3.11</version>
151
+ <scope>provided</scope>
152
+ </dependency>
153
+ <dependency>
154
+ <groupId>org.apache.poi</groupId>
155
+ <artifactId>poi-scratchpad</artifactId>
156
+ <version>3.11</version>
157
+ <scope>provided</scope>
158
+ </dependency>
159
+ <dependency>
160
+ <groupId>org.bbreak.excella</groupId>
161
+ <artifactId>excella-core</artifactId>
162
+ <version>1.10</version>
163
+ </dependency>
164
+ <dependency>
165
+ <groupId>org.bbreak.excella</groupId>
166
+ <artifactId>excella-reports</artifactId>
167
+ <version>1.8</version>
168
+ </dependency>
169
+ <dependency>
170
+ <groupId>org.springframework.boot</groupId>
171
+ <artifactId>spring-boot-starter-tomcat</artifactId>
172
+ <scope>provided</scope>
173
+ </dependency>
174
+ <dependency>
175
+ <groupId>org.apache.httpcomponents</groupId>
176
+ <artifactId>httpclient</artifactId>
177
+ </dependency>
178
+ <dependency>
179
+ <groupId>org.apache.commons</groupId>
180
+ <artifactId>commons-lang3</artifactId>
181
+ <version>3.4</version>
182
+ </dependency>
183
+
184
+ <!--API, java.xml.bind module -->
185
+ <dependency>
186
+ <groupId>jakarta.xml.bind</groupId>
187
+ <artifactId>jakarta.xml.bind-api</artifactId>
188
+ <version>2.3.2</version>
189
+ </dependency>
190
+ <!--Runtime, com.sun.xml.bind module -->
191
+ <dependency>
192
+ <groupId>org.glassfish.jaxb</groupId>
193
+ <artifactId>jaxb-runtime</artifactId>
194
+ <version>2.3.2</version>
195
+ </dependency>
196
+ <dependency>
197
+ <groupId>org.springframework.boot</groupId>
198
+ <artifactId>spring-boot-starter-validation</artifactId>
199
+ </dependency>
200
+ </dependencies>
201
+
202
+ <properties>
203
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
204
+ <java.version>11</java.version>
205
+ </properties>
206
+
207
+ <build>
208
+ <finalName>admin</finalName>
209
+ <plugins>
210
+ <plugin>
211
+ <groupId>org.springframework.boot</groupId>
212
+ <artifactId>spring-boot-maven-plugin</artifactId>
213
+ <dependencies>
214
+ <dependency>
215
+ <groupId>org.springframework</groupId>
216
+ <artifactId>springloaded</artifactId>
217
+ <version>1.2.8.RELEASE</version>
218
+ </dependency>
219
+ </dependencies>
220
+ <configuration>
221
+ <mainClass>XXXX</mainClass>
222
+ </configuration>
223
+ </plugin>
224
+
225
+ <plugin>
226
+ <artifactId>maven-compiler-plugin</artifactId>
227
+ <version>3.7.0</version>
228
+ <configuration>
229
+ <source>10</source>
230
+ <target>10</target>
231
+ <release>10</release>
232
+ <forceJavacCompilerUse>true</forceJavacCompilerUse>
233
+ <compilerArgs>
234
+ <arg>-Werror</arg>
235
+ <arg>-verbose</arg>
236
+ </compilerArgs>
237
+ </configuration>
238
+ </plugin>
239
+ </plugins>
240
+ </build>
241
+ </project>
242
+
243
+ ```

2

追記

2021/08/11 04:44

投稿

tarou124
tarou124

スコア2

title CHANGED
File without changes
body CHANGED
@@ -12,4 +12,16 @@
12
12
  Caused by: java.io.FileNotFoundException: class path resource [org/thymeleaf/dialect/IExpressionEnhancingDialect.class] cannot be opened because it does not exist
13
13
 
14
14
 
15
-
15
+
16
+
17
+ 追記:
18
+ すみません。javaを1.7→11、SpringBootを1.2→2.5にupdateして、
19
+ mvn spring-boot:runをしましたが、上記のエラーとなってしまっています。
20
+ ※ その間に色々なエラーが出ましたが1つずつ解消していきました。
21
+
22
+ コードは全て載せられないのですが、thymeleafに関する設定だとpom.xmlに以下を入れています。
23
+ 他に必要な定義などありますでしょうか‥?
24
+ <dependency>
25
+ <groupId>org.springframework.boot</groupId>
26
+ <artifactId>spring-boot-starter-thymeleaf</artifactId>
27
+ </dependency>

1

ログの修正

2021/08/11 04:23

投稿

tarou124
tarou124

スコア2

title CHANGED
File without changes
body CHANGED
@@ -2,36 +2,14 @@
2
2
  pom.xmlで何か指定が必要なのでしょうか?
3
3
  SpringBootのバージョンは2.5です。
4
4
 
5
- org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [jp.co.XXX.XXX.XXX]; nested exception is java.io.FileNotFoundException: class path resource [org/thymeleaf/dialect/IExpressionEnhancingDialect.class] cannot be opened because it does not exist
6
- at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:189)
7
- at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:331)
8
- at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:247)
9
- at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311)
10
- at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:112)
11
- at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:746)
12
- at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:564)
13
- at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145)
14
- at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
15
- at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:438)
16
- at org.springframework.boot.SpringApplication.run(SpringApplication.java:337)
17
- at org.springframework.boot.SpringApplication.run(SpringApplication.java:1336)
18
- at org.springframework.boot.SpringApplication.run(SpringApplication.java:1325)
19
- at jp.co.XXX.XXX.XXX.XXXX(App.java:10)
5
+
6
+ org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [jp.co.XXX.XXX.XXX];
7
+ nested exception is java.io.FileNotFoundException: class path resource [org/thymeleaf/dialect/IExpressionEnhancingDialect.class] cannot be opened because it does not exist
8
+
9
+
10
+
11
+
20
12
  Caused by: java.io.FileNotFoundException: class path resource [org/thymeleaf/dialect/IExpressionEnhancingDialect.class] cannot be opened because it does not exist
21
- at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:187)
13
+
22
- at org.springframework.core.type.classreading.SimpleMetadataReader.getClassReader(SimpleMetadataReader.java:55)
23
- at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:49)
24
- at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103)
25
- at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.createMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:86)
26
- at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.getMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:73)
27
- at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:81)
28
- at org.springframework.context.annotation.ConfigurationClassParser.asSourceClass(ConfigurationClassParser.java:696)
29
- at org.springframework.context.annotation.ConfigurationClassParser$SourceClass.getInterfaces(ConfigurationClassParser.java:1024)
30
- at org.springframework.context.annotation.ConfigurationClassParser.processInterfaces(ConfigurationClassParser.java:386)
31
- at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:332)
32
- at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:250)
33
- at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:199)
14
+
34
- at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:304)
35
- at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:250)
36
- at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:207)
15
+
37
- at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:175)