web-dev-qa-db-ja.com

重大:Tomcat 7でJarエントリ[module-info.class]を処理できません&& Java 8

Tomcat 7、Java 8 && Eclipseバージョン:Luna Service Release 1(4.4.1)にwarファイルをデプロイしました

実行中、次のエラーが表示されます。

情報:validateJarFile(D:\ EclipseWorkspace.metadata.plugins\org.Eclipse.wst.server.core\tmp0\wtpwebapps\administration\WEB-INF\lib\javax.el-api-3.0.0.jar)-jar notロードされました。サーブレット仕様3.0、セクション10.7.2を参照してください。問題のあるクラス:javax/el/Expression.class 2018年10月30日4:03:19 PM org.Apache.catalina.startup.ContextConfig processAnnotationsJar SEVERE:Jarエントリを処理できません[module-info .class] Jarから[jar:file:/ D:/AdminUiAngularEclipseWorkspace/.metadata/.plugins/org.Eclipse.wst.server.core/tmp0/wtpwebapps/code-connect-administration/WEB-INF/lib/yasson- 1.0.jar!/]アノテーションorg.Apache.Tomcat.util.bcel.classfile.ClassFormatException:定数プール内の無効なバイトタグ:org.Apache.Tomcat.util.bcel.classfile.Constant.readConstant(Constant.Javaで19 :136)org.Apache.Tomcat.util.bcel.classfile.ClassParser.readConstantPool(ClassParser.Java:208)at org.Apache.Tomcat.util.bcel.classfile.ConstantPool。(ConstantPool.Java:59)でorgで.Apache.Tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.Java:118)(org.Apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.Java:2058)(org.Apache.catalina.startup.ContextConfig) .processAnnotationsJar(ContextConfig.Java:19 34)org.Apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.Java:1900)at org.Apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.Java:1885)at org.Apache.catalina.startup.ContextConfig .webConfig(ContextConfig.Java:1317)(org.Apache.catalina.startup.ContextConfig.configureStart(ContextConfig.Java:876)(org.Apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.Java:374)(org。)) Apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.Java:117)(org.Apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.Java:90)(org.Apache.catalina.core.StandardContext.startInternal(StandardContext。 Java:5378)org.Apache.catalina.util.LifecycleBase.start(LifecycleBase.Java:150)at org.Apache.catalina.core.ContainerBase $ StartChild.call(ContainerBase.Java:1575)at org.Apache.catalina .core.ContainerBase $ StartChild.call(ContainerBase.Java:1565)at Java.util.concurrent.FutureTask.run(FutureTask.Java:266)at Java.u til.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.Java:1142)at Java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.Java:617)at Java.lang.Thread.run(Thread.Java:745)

2018年10月30日4:03:19 PM org.Apache.catalina.startup.ContextConfig processAnnotationsJar SEVERE:Jarエントリ[module-info.class]をJar [jar:file: /D:/AdminUiAngularEclipseWorkspace/.metadata/.plugins/org.Eclipse.wst.server.core/tmp0/wtpwebapps/code-connect-administration/WEB-INF/lib/javax.json-1.1.jar!/]アノテーション用org.Apache.Tomcat.util.bcel.classfile.ClassFormatException:定数プールの無効なバイトタグ:org.Apache.Tomcat.util.bcel.classfile.Constant.readConstant(Constant.Java:136)でorg.Apacheで19。 Tomcat.util.bcel.classfile.ConstantPool。(ConstantPool.Java:59)(org.Apache.Tomcat.util.bcel.classfile.ClassParser.readConstantPool(ClassParser.Java:208)(org.Apache.Tomcat.util.bcel)) .classfile.ClassParser.parse(ClassParser.Java:118)at org.Apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.Java:2058)at org.Apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.Java:1934 )org.Apache.catalina.startup.ContでextConfig.processAnnotationsUrl(ContextConfig.Java:1900)at org.Apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.Java:1885)at org.Apache.catalina.startup.ContextConfig.webConfig(ContextConfig.Java:1317)at org .Apache.catalina.startup.ContextConfig.configureStart(ContextConfig.Java:876)at org.Apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.Java:374)at org.Apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport .Java:117)org.Apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.Java:90)at org.Apache.catalina.core.StandardContext.startInternal(StandardContext.Java:5378)at org.Apache.catalina。 util.LifecycleBase.start(LifecycleBase.Java:150)at org.Apache.catalina.core.ContainerBase $ StartChild.call(ContainerBase.Java:1575)at org.Apache.catalina.core.ContainerBase $ StartChild.call(ContainerBase。 Java:1565)Java.util.concurrent.FutureTask.run(FutureTask.Java:266)at Java.util.concurrent.ThreadPoolExecutor.runWo Java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.Java:617)のJava.lang.Thread.run(Thread.Java:745)のrker(ThreadPoolExecutor.Java:1142)

2018年10月30日4:03:20 PM org.Apache.catalina.startup.ContextConfig processAnnotationsJar SEVERE:Jarエントリ[module-info.class]をJar [jar:file:から処理できません/D:/AdminUiAngularEclipseWorkspace/.metadata/.plugins/org.Eclipse.wst.server.core/tmp0/wtpwebapps/code-connect-administration/WEB-INF/lib/javax.json.bind-api-1.0.jar! /]注釈org.Apache.Tomcat.util.bcel.classfile.ClassFormatException:定数プールの無効なバイトタグ:org.Apache.Tomcat.util.bcel.classfile.Constant.readConstant(Constant.Java:136)で19 org.Apache.Tomcat.util.bcel.classfile.ConstantPool。(ConstantPool.Java:59)org.Apache.Tomcat.util.bcel.classfile.ClassParser.readConstantPool(ClassParser.Java:208)at org.Apache.Tomcat org.Apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfigのorg.Apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.Java:2058)の.util.bcel.classfile.ClassParser.parse(ClassParser.Java:118) .Java:1934)org.Apache.catalina.sta rtup.ContextConfig.processAnnotationsUrl(ContextConfig.Java:1900)at org.Apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.Java:1885)at org.Apache.catalina.startup.ContextConfig.webConfig(ContextConfig.Java:1317) org.Apache.catalina.startup.ContextConfig.configureStart(ContextConfig.Java:876)でorg.Apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.Java:374)でorg.Apache.catalina.util.LifecycleSupport.fireLifecycleEventで(LifecycleSupport.Java:117)org.Apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.Java:90)org.Apache.catalina.core.StandardContext.startInternal(StandardContext.Java:5378)at org.Apache。 catalina.util.LifecycleBase.start(LifecycleBase.Java:150)at org.Apache.catalina.core.ContainerBase $ StartChild.call(ContainerBase.Java:1575)at org.Apache.catalina.core.ContainerBase $ StartChild.call( ContainerBase.Java:1565)Java.util.concurrent.FutureTask.run(FutureTask.Java:266)at Java.util.concurrent.ThreadPoolExecu tor.runWorker(ThreadPoolExecutor.Java:1142)at Java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.Java:617)at Java.lang.Thread.run(Thread.Java:745)

2018年10月30日4:03:20 PM org.Apache.catalina.startup.ContextConfig processAnnotationsJar SEVERE:Jarエントリ[module-info.class]をJar [jar:file:から処理できません/D:/AdminUiAngularEclipseWorkspace/.metadata/.plugins/org.Eclipse.wst.server.core/tmp0/wtpwebapps/code-connect-administration/WEB-INF/lib/javax.json-api-1.1.jar!/]注釈の場合org.Apache.Tomcat.util.bcel.classfile.ClassFormatException:定数プールの無効なバイトタグ:org.Apache.Tomcat.util.bcel.classfile.Constant.readConstant(Constant.Java:136)の19。 org.Apache.Tomcat.util.bcel.classfile.ClassParser.readConstantPool(ClassParser.Java:208)(org.Apache.Tomcat.util)のApache.Tomcat.util.bcel.classfile.ConstantPool。(ConstantPool.Java:59) .bcel.classfile.ClassParser.parse(ClassParser.Java:118)(org.Apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.Java:2058)(org.Apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.Java)) :1934)org.Apache.catalina.startup。 org.Apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.Java:1885)のorg.Apache.catalina.startup.ContextConfig.webConfig(ContextConfig.Java:1317)のorgのConfigConfig.processAnnotationsUrl(ContextConfig.Java:1900) .Apache.catalina.startup.ContextConfig.configureStart(ContextConfig.Java:876)at org.Apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.Java:374)at org.Apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport .Java:117)org.Apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.Java:90)at org.Apache.catalina.core.StandardContext.startInternal(StandardContext.Java:5378)at org.Apache.catalina。 util.LifecycleBase.start(LifecycleBase.Java:150)(org.Apache.catalina.core.ContainerBase $ StartChild.call(ContainerBase.Java:1575)at org.Apache.catalina.core.ContainerBase $ StartChild.call(ContainerBase。 Java:1565)Java.util.concurrent.FutureTask.run(FutureTask.Java:266)at Java.util.concurrent.ThreadPoolExecutor.r unworker(ThreadPoolExecutor.Java:1142)at Java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.Java:617)at Java.lang.Thread.run(Thread.Java:745)

これについて助けてもらえますか?.

3
kanchetime

Tomcatのバージョンをアップグレードしてみてください。これは fixed in:

- trunk for 9.0.0.M18 onwards
- 8.5.x for 8.5.12 onwards
- 8.0.x for 8.0.42 onwards
- 7.0.x for 7.0.76 onwards

これが機能しない理由は、Tomcatの古いバージョンでモジュール化された(module-info.classファイルで)依存関係を使用しているためです。 Tomcat(bcelライブラリ)は、@WebServletなどの注釈を見つけようとしてクラスファイルをスキャンしようとしますが、不明なバイトコードを検出します。

組み込みのTomcatを開始するためにorg.Apache.Tomcat.maven:Tomcat7-maven-pluginを使用している場合は、この 手順 を実行できます。

10