質問編集履歴

1

一部、質問内容を変更しました。

2018/05/05 06:50

投稿

Saggitarie
Saggitarie

スコア9

test CHANGED
File without changes
test CHANGED
@@ -24,11 +24,35 @@
24
24
 
25
25
 
26
26
 
27
- 重大: A child container failed during start [土 5月 05 15:07:41 JST 2018]
28
-
29
- 重大: A child container failed during start [土 5月 05 15:07:41 JST 2018]
30
-
31
- 重大: The required Server component failed to start so Tomcat is unable to start. [土 5月 05 15:07:41 JST 2018]
27
+
28
+
29
+ 重大: A child container failed during start [土 5月 05 15:38:13 JST 2018]
30
+
31
+ 重大: A child container failed during start [土 5月 05 15:38:13 JST 2018]
32
+
33
+ 重大: The required Server component failed to start so Tomcat is unable to start. [土 5月 05 15:38:13 JST 2018]
34
+
35
+ 情報: Pausing ProtocolHandler ["http-nio-8080"] [土 5月 05 15:38:13 JST 2018]
36
+
37
+ 情報: Pausing ProtocolHandler ["ajp-nio-8009"] [土 5月 05 15:38:13 JST 2018]
38
+
39
+ 情報: サービス [Catalina] を停止します [土 5月 05 15:38:13 JST 2018]
40
+
41
+ 情報: Destroying ProtocolHandler ["http-nio-8080"] [土 5月 05 15:38:13 JST 2018]
42
+
43
+ 情報: Destroying ProtocolHandler ["ajp-nio-8009"] [土 5月 05 15:38:13 JST 2018]
44
+
45
+ WARNING: An illegal reflective access operation has occurred
46
+
47
+ WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/Applications/Eclipse_4.7.3.app/Contents/tomcat/9/lib/catalina.jar) to field java.io.ObjectStreamClass$Caches.localDescs
48
+
49
+ WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase
50
+
51
+ WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
52
+
53
+ WARNING: All illegal access operations will be denied in a future release
54
+
55
+
32
56
 
33
57
 
34
58
 
@@ -44,49 +68,81 @@
44
68
 
45
69
 
46
70
 
71
+ (III) 「src」→「main」→「webapp」→「WEB-INF」下にweb.xmlを設置
72
+
73
+
74
+
75
+ web.xml
76
+
47
77
  ```xml
48
78
 
49
- <?xml version="1.0" encoding="UTF-8"?>
50
-
51
-
52
-
53
- <beans xmlns="http://www.springframework.org/schema/beans"
54
-
55
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
56
-
57
- xmlns:aop="http://www.springframework.org/schema/aop"
58
-
59
- xmlns:context="http://www.springframework.org/schema/context"
60
-
61
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
62
-
63
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
64
-
65
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
66
-
67
-
68
-
69
- <!-- DIするBeanクラスを登録 -->
70
-
71
- <bean id="sample" class="sample.SampleBean" />
72
-
73
- <bean id="sample2" class="sample.SampleBean2" />
74
-
75
-
76
-
77
- <!-- AOPの設定 -->
78
-
79
- <!--
80
-
81
- <aop:aspectj-autoproxy />
82
-
83
- <context:component-scan base-package="sample"/>
84
-
85
- -->
86
-
87
-
88
-
89
- </beans>
79
+ <?xml version="1.0" encoding="ISO-8859-1"?>
80
+
81
+ <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
82
+
83
+ <display-name>SampleSpring4</display-name>
84
+
85
+ <context-param>
86
+
87
+ <param-name>contextConfigLocation</param-name>
88
+
89
+ <param-value>classpath:spring/application-config.xml</param-value>
90
+
91
+ </context-param>
92
+
93
+ <listener>
94
+
95
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
96
+
97
+ </listener>
98
+
99
+ <servlet>
100
+
101
+ <servlet-name>dispatcherServlet</servlet-name>
102
+
103
+ <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
104
+
105
+ <init-param>
106
+
107
+ <param-name>contextConfigLocation</param-name>
108
+
109
+ <param-value>/WEB-INF/mvc-config.xml</param-value>
110
+
111
+ </init-param>
112
+
113
+ <load-on-startup>1</load-on-startup>
114
+
115
+ </servlet>
116
+
117
+ <servlet-mapping>
118
+
119
+ <servlet-name>dispatcherServlet</servlet-name>
120
+
121
+ <url-pattern>/</url-pattern>
122
+
123
+ </servlet-mapping>
124
+
125
+ <servlet>
126
+
127
+ <description></description>
128
+
129
+ <display-name>SampleServlet</display-name>
130
+
131
+ <servlet-name>SampleServlet</servlet-name>
132
+
133
+ <servlet-class>sample.SampleServlet</servlet-class>
134
+
135
+ </servlet>
136
+
137
+ <servlet-mapping>
138
+
139
+ <servlet-name>SampleServlet</servlet-name>
140
+
141
+ <url-pattern>/SampleServlet</url-pattern>
142
+
143
+ </servlet-mapping>
144
+
145
+ </web-app>
90
146
 
91
147
  ```
92
148
 
@@ -94,376 +150,294 @@
94
150
 
95
151
 
96
152
 
97
- (III) 「src」→「main」→「webapp」→「WEB-INF」下にweb.xmlを設置
98
-
99
-
100
-
101
- web.xml
153
+ (IV) pom.xml
154
+
155
+
102
156
 
103
157
  ```xml
104
158
 
105
- <?xml version="1.0" encoding="ISO-8859-1"?>
106
-
107
- <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
108
-
109
- <display-name>SampleSpring4</display-name>
110
-
111
- <context-param>
112
-
113
- <param-name>contextConfigLocation</param-name>
114
-
115
- <param-value>classpath:spring/application-config.xml</param-value>
116
-
117
- </context-param>
118
-
119
- <listener>
120
-
121
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
122
-
123
- </listener>
124
-
125
- <servlet>
126
-
127
- <servlet-name>dispatcherServlet</servlet-name>
128
-
129
- <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
130
-
131
- <init-param>
132
-
133
- <param-name>contextConfigLocation</param-name>
134
-
135
- <param-value>/WEB-INF/mvc-config.xml</param-value>
136
-
137
- </init-param>
138
-
139
- <load-on-startup>1</load-on-startup>
140
-
141
- </servlet>
142
-
143
- <servlet-mapping>
144
-
145
- <servlet-name>dispatcherServlet</servlet-name>
146
-
147
- <url-pattern>/</url-pattern>
148
-
149
- </servlet-mapping>
150
-
151
- <servlet>
152
-
153
- <description></description>
154
-
155
- <display-name>SampleServlet</display-name>
156
-
157
- <servlet-name>SampleServlet</servlet-name>
158
-
159
- <servlet-class>sample.SampleServlet</servlet-class>
160
-
161
- </servlet>
162
-
163
- <servlet-mapping>
164
-
165
- <servlet-name>SampleServlet</servlet-name>
166
-
167
- <url-pattern>/SampleServlet</url-pattern>
168
-
169
- </servlet-mapping>
170
-
171
- </web-app>
159
+ <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">
160
+
161
+ <modelVersion>4.0.0</modelVersion>
162
+
163
+ <groupId>org.springframework.samples.service.service</groupId>
164
+
165
+ <artifactId>SampleSpring3</artifactId>
166
+
167
+ <version>0.0.1-SNAPSHOT</version>
168
+
169
+ <packaging>war</packaging>
170
+
171
+
172
+
173
+ <properties>
174
+
175
+
176
+
177
+ <!-- Generic properties -->
178
+
179
+ <java.version>1.6</java.version>
180
+
181
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
182
+
183
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
184
+
185
+
186
+
187
+ <!-- Web -->
188
+
189
+ <jsp.version>2.2</jsp.version>
190
+
191
+ <jstl.version>1.2</jstl.version>
192
+
193
+ <servlet.version>2.5</servlet.version>
194
+
195
+
196
+
197
+ <!-- Spring -->
198
+
199
+ <spring-framework.version>4.0.7.RELEASE</spring-framework.version>
200
+
201
+
202
+
203
+ <!-- Hibernate / JPA -->
204
+
205
+ <hibernate.version>4.2.1.Final</hibernate.version>
206
+
207
+
208
+
209
+ <!-- Logging -->
210
+
211
+ <logback.version>1.0.13</logback.version>
212
+
213
+ <slf4j.version>1.7.5</slf4j.version>
214
+
215
+
216
+
217
+ <!-- Test -->
218
+
219
+ <junit.version>4.11</junit.version>
220
+
221
+
222
+
223
+ <!-- AOP -->
224
+
225
+ <org.aspectj-version>1.8.4</org.aspectj-version>
226
+
227
+
228
+
229
+ </properties>
230
+
231
+
232
+
233
+ <dependencies>
234
+
235
+
236
+
237
+ <!-- Spring MVC -->
238
+
239
+ <dependency>
240
+
241
+ <groupId>org.springframework</groupId>
242
+
243
+ <artifactId>spring-webmvc</artifactId>
244
+
245
+ <version>${spring-framework.version}</version>
246
+
247
+ </dependency>
248
+
249
+
250
+
251
+ <!-- Other Web dependencies -->
252
+
253
+ <dependency>
254
+
255
+ <groupId>javax.servlet</groupId>
256
+
257
+ <artifactId>jstl</artifactId>
258
+
259
+ <version>${jstl.version}</version>
260
+
261
+ </dependency>
262
+
263
+ <dependency>
264
+
265
+ <groupId>javax.servlet</groupId>
266
+
267
+ <artifactId>servlet-api</artifactId>
268
+
269
+ <version>${servlet.version}</version>
270
+
271
+ <scope>provided</scope>
272
+
273
+ </dependency>
274
+
275
+ <dependency>
276
+
277
+ <groupId>javax.servlet.jsp</groupId>
278
+
279
+ <artifactId>jsp-api</artifactId>
280
+
281
+ <version>${jsp.version}</version>
282
+
283
+ <scope>provided</scope>
284
+
285
+ </dependency>
286
+
287
+
288
+
289
+ <!-- Spring and Transactions -->
290
+
291
+ <dependency>
292
+
293
+ <groupId>org.springframework</groupId>
294
+
295
+ <artifactId>spring-tx</artifactId>
296
+
297
+ <version>${spring-framework.version}</version>
298
+
299
+ </dependency>
300
+
301
+
302
+
303
+ <!-- Logging with SLF4J & LogBack -->
304
+
305
+ <dependency>
306
+
307
+ <groupId>org.slf4j</groupId>
308
+
309
+ <artifactId>slf4j-api</artifactId>
310
+
311
+ <version>${slf4j.version}</version>
312
+
313
+ <scope>compile</scope>
314
+
315
+ </dependency>
316
+
317
+ <dependency>
318
+
319
+ <groupId>ch.qos.logback</groupId>
320
+
321
+ <artifactId>logback-classic</artifactId>
322
+
323
+ <version>${logback.version}</version>
324
+
325
+ <scope>runtime</scope>
326
+
327
+ </dependency>
328
+
329
+
330
+
331
+ <!-- Hibernate -->
332
+
333
+ <dependency>
334
+
335
+ <groupId>org.hibernate</groupId>
336
+
337
+ <artifactId>hibernate-entitymanager</artifactId>
338
+
339
+ <version>${hibernate.version}</version>
340
+
341
+ </dependency>
342
+
343
+
344
+
345
+
346
+
347
+ <!-- Test Artifacts -->
348
+
349
+ <dependency>
350
+
351
+ <groupId>org.springframework</groupId>
352
+
353
+ <artifactId>spring-test</artifactId>
354
+
355
+ <version>${spring-framework.version}</version>
356
+
357
+ <scope>test</scope>
358
+
359
+ </dependency>
360
+
361
+ <dependency>
362
+
363
+ <groupId>junit</groupId>
364
+
365
+ <artifactId>junit</artifactId>
366
+
367
+ <version>${junit.version}</version>
368
+
369
+ <scope>test</scope>
370
+
371
+ </dependency>
372
+
373
+
374
+
375
+ <!-- AOP -->
376
+
377
+ <dependency>
378
+
379
+ <groupId>org.springframework</groupId>
380
+
381
+ <artifactId>spring-aop</artifactId>
382
+
383
+ <version>${spring-framework.version}</version>
384
+
385
+ </dependency>
386
+
387
+
388
+
389
+ <dependency>
390
+
391
+ <groupId>org.aspectj</groupId>
392
+
393
+ <artifactId>aspectjrt</artifactId>
394
+
395
+ <version>${org.aspectj-version}</version>
396
+
397
+ </dependency>
398
+
399
+
400
+
401
+ <dependency>
402
+
403
+ <groupId>org.aspectj</groupId>
404
+
405
+ <artifactId>aspectjweaver</artifactId>
406
+
407
+ <version>${org.aspectj-version}</version>
408
+
409
+ </dependency>
410
+
411
+
412
+
413
+ </dependencies>
414
+
415
+ </project>
416
+
417
+
172
418
 
173
419
  ```
174
420
 
175
-
176
-
177
-
178
-
179
- (IV) pom.xml
180
-
181
-
182
-
183
- ```xml
184
-
185
- <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">
186
-
187
- <modelVersion>4.0.0</modelVersion>
188
-
189
- <groupId>org.springframework.samples.service.service</groupId>
190
-
191
- <artifactId>SampleSpring3</artifactId>
192
-
193
- <version>0.0.1-SNAPSHOT</version>
194
-
195
- <packaging>war</packaging>
196
-
197
-
198
-
199
- <properties>
200
-
201
-
202
-
203
- <!-- Generic properties -->
204
-
205
- <java.version>1.6</java.version>
206
-
207
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
208
-
209
- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
210
-
211
-
212
-
213
- <!-- Web -->
214
-
215
- <jsp.version>2.2</jsp.version>
216
-
217
- <jstl.version>1.2</jstl.version>
218
-
219
- <servlet.version>2.5</servlet.version>
220
-
221
-
222
-
223
- <!-- Spring -->
224
-
225
- <spring-framework.version>4.0.7.RELEASE</spring-framework.version>
226
-
227
-
228
-
229
- <!-- Hibernate / JPA -->
230
-
231
- <hibernate.version>4.2.1.Final</hibernate.version>
232
-
233
-
234
-
235
- <!-- Logging -->
236
-
237
- <logback.version>1.0.13</logback.version>
238
-
239
- <slf4j.version>1.7.5</slf4j.version>
240
-
241
-
242
-
243
- <!-- Test -->
244
-
245
- <junit.version>4.11</junit.version>
246
-
247
-
248
-
249
- <!-- AOP -->
250
-
251
- <org.aspectj-version>1.8.4</org.aspectj-version>
252
-
253
-
254
-
255
- </properties>
256
-
257
-
258
-
259
- <dependencies>
260
-
261
-
262
-
263
- <!-- Spring MVC -->
264
-
265
- <dependency>
266
-
267
- <groupId>org.springframework</groupId>
268
-
269
- <artifactId>spring-webmvc</artifactId>
270
-
271
- <version>${spring-framework.version}</version>
272
-
273
- </dependency>
274
-
275
-
276
-
277
- <!-- Other Web dependencies -->
278
-
279
- <dependency>
280
-
281
- <groupId>javax.servlet</groupId>
282
-
283
- <artifactId>jstl</artifactId>
284
-
285
- <version>${jstl.version}</version>
286
-
287
- </dependency>
288
-
289
- <dependency>
290
-
291
- <groupId>javax.servlet</groupId>
292
-
293
- <artifactId>servlet-api</artifactId>
294
-
295
- <version>${servlet.version}</version>
296
-
297
- <scope>provided</scope>
298
-
299
- </dependency>
300
-
301
- <dependency>
302
-
303
- <groupId>javax.servlet.jsp</groupId>
304
-
305
- <artifactId>jsp-api</artifactId>
306
-
307
- <version>${jsp.version}</version>
308
-
309
- <scope>provided</scope>
310
-
311
- </dependency>
312
-
313
-
314
-
315
- <!-- Spring and Transactions -->
316
-
317
- <dependency>
318
-
319
- <groupId>org.springframework</groupId>
320
-
321
- <artifactId>spring-tx</artifactId>
322
-
323
- <version>${spring-framework.version}</version>
324
-
325
- </dependency>
326
-
327
-
328
-
329
- <!-- Logging with SLF4J & LogBack -->
330
-
331
- <dependency>
332
-
333
- <groupId>org.slf4j</groupId>
334
-
335
- <artifactId>slf4j-api</artifactId>
336
-
337
- <version>${slf4j.version}</version>
338
-
339
- <scope>compile</scope>
340
-
341
- </dependency>
342
-
343
- <dependency>
344
-
345
- <groupId>ch.qos.logback</groupId>
346
-
347
- <artifactId>logback-classic</artifactId>
348
-
349
- <version>${logback.version}</version>
350
-
351
- <scope>runtime</scope>
352
-
353
- </dependency>
354
-
355
-
356
-
357
- <!-- Hibernate -->
358
-
359
- <dependency>
360
-
361
- <groupId>org.hibernate</groupId>
362
-
363
- <artifactId>hibernate-entitymanager</artifactId>
364
-
365
- <version>${hibernate.version}</version>
366
-
367
- </dependency>
368
-
369
-
370
-
371
-
372
-
373
- <!-- Test Artifacts -->
374
-
375
- <dependency>
376
-
377
- <groupId>org.springframework</groupId>
378
-
379
- <artifactId>spring-test</artifactId>
380
-
381
- <version>${spring-framework.version}</version>
382
-
383
- <scope>test</scope>
384
-
385
- </dependency>
386
-
387
- <dependency>
388
-
389
- <groupId>junit</groupId>
390
-
391
- <artifactId>junit</artifactId>
392
-
393
- <version>${junit.version}</version>
394
-
395
- <scope>test</scope>
396
-
397
- </dependency>
398
-
399
-
400
-
401
- <!-- AOP -->
402
-
403
- <dependency>
404
-
405
- <groupId>org.springframework</groupId>
406
-
407
- <artifactId>spring-aop</artifactId>
408
-
409
- <version>${spring-framework.version}</version>
410
-
411
- </dependency>
412
-
413
-
414
-
415
- <dependency>
416
-
417
- <groupId>org.aspectj</groupId>
418
-
419
- <artifactId>aspectjrt</artifactId>
420
-
421
- <version>${org.aspectj-version}</version>
422
-
423
- </dependency>
424
-
425
-
426
-
427
- <dependency>
428
-
429
- <groupId>org.aspectj</groupId>
430
-
431
- <artifactId>aspectjweaver</artifactId>
432
-
433
- <version>${org.aspectj-version}</version>
434
-
435
- </dependency>
436
-
437
-
438
-
439
- </dependencies>
440
-
441
- </project>
442
-
443
-
421
+ ### 試したこと
422
+
423
+
424
+
425
+ [Tomcat始動時のエラー](https://teratail.com/questions/29683)
426
+
427
+ この方の記事を参考にtomcat の設定ファイル「server.xml」に存在しないパスのプロジェクトがある可能性があったのでそれを確認しました。
428
+
429
+
430
+
431
+ server.xml
432
+
433
+ ```xml
434
+
435
+ <Context docBase="SampleSpring" path="/SampleSpring" reloadable="false" source="org.eclipse.jst.jee.server:SampleSpring"/>
436
+
437
+ <Context docBase="SpringSample3" path="/SampleSpring4_2" reloadable="false" source="org.eclipse.jst.jee.server:SpringSample3"/>
444
438
 
445
439
  ```
446
440
 
447
- ### 試したこと
448
-
449
-
450
-
451
- [Tomcat始動時のエラー](https://teratail.com/questions/29683)
452
-
453
- この方の記事を参考にtomcat の設定ファイル「server.xml」に存在しないパスのプロジェクトがある可能性があったのでそれを確認しました。
454
-
455
-
456
-
457
- server.xml
458
-
459
- ```xml
460
-
461
- <Context docBase="SampleSpring" path="/SampleSpring" reloadable="false" source="org.eclipse.jst.jee.server:SampleSpring"/>
462
-
463
- <Context docBase="SpringSample3" path="/SampleSpring4_2" reloadable="false" source="org.eclipse.jst.jee.server:SpringSample3"/>
464
-
465
- ```
466
-
467
441
 
468
442
 
469
443
  *SampleSpring3のパスが全く関係のない「SampleSpring4_2」をさしていたので、pom.xmlのartifactidを「SampleSpring3」に変更しました。しかし、再度実行をしてもエラーが消えません。