访问module-info.class java.lang.IllegalArgumentException,Payara Server时出现异常

时间:2017-07-18 07:21:58

标签: java java-ee-7 eclipse-kepler payara

当我尝试payara illegalArgumentException服务器module-info.class 2017-07-17T20:06:58.042+0530|Info: Created HTTP listener http-listener-1 on host/port 0.0.0.0:8080 2017-07-17T20:06:58.057+0530|Info: Created HTTP listener http-listener-2 on host/port 0.0.0.0:8181 2017-07-17T20:06:58.057+0530|Info: Created HTTP listener admin-listener on host/port 0.0.0.0:4848 2017-07-17T20:06:58.073+0530|Info: Created virtual server server 2017-07-17T20:06:58.073+0530|Info: Created virtual server __asadmin 2017-07-17T20:06:58.709+0530|Info: Setting JAAS app name glassfish-web 2017-07-17T20:06:58.709+0530|Info: Virtual server server loaded default web module 2017-07-17T20:06:59.010+0530|Info: Java security manager is disabled. 2017-07-17T20:06:59.011+0530|Info: Entering Security Startup Service. 2017-07-17T20:06:59.013+0530|Info: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper. 2017-07-17T20:06:59.094+0530|Info: Security Service(s) started successfully. 2017-07-17T20:07:00.849+0530|Info: Initializing Mojarra 2.2.14 ( 20161114-2152 unable to get svn info) for context '' 2017-07-17T20:07:02.397+0530|Severe: Exception while visiting module-info.class of size 281 java.lang.IllegalArgumentException at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:170) at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:153) at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:424) at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:359) at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.handleEntry(ReadableArchiveScannerAdapter.java:165) at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.onSelectedEntries(ReadableArchiveScannerAdapter.java:127) at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:345) at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:68) at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:304) at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:293) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 2017-07-17T20:07:02.461+0530|Severe: Exception while visiting module-info.class of size 330 java.lang.IllegalArgumentException at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:170) at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:153) at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:424) at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:359) at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.handleEntry(ReadableArchiveScannerAdapter.java:165) at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.onSelectedEntries(ReadableArchiveScannerAdapter.java:127) at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:345) at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:68) at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:304) at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:293) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 2017-07-17T20:07:02.461+0530|Severe: Exception while visiting module-info.class of size 449 java.lang.IllegalArgumentException at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:170) at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:153) at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:424) at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:359) at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.handleEntry(ReadableArchiveScannerAdapter.java:165) at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.onSelectedEntries(ReadableArchiveScannerAdapter.java:127) at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:345) at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:68) at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:304) at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:293) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 2017-07-17T20:07:02.477+0530|Severe: Exception while visiting module-info.class of size 267 java.lang.IllegalArgumentException at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:170) at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:153) at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.<init>(ClassReader.java:424) at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:359) at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.handleEntry(ReadableArchiveScannerAdapter.java:165) at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.onSelectedEntries(ReadableArchiveScannerAdapter.java:127) at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:345) at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:68) at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:304) at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:293) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 2017-07-17T20:07:02.539+0530|Info: Loading application [__admingui] at [/] 2017-07-17T20:07:02.555+0530|Info: Loading application __admingui done in 5,492 ms 2017-07-17T20:07:02.850+0530|Info: WELD-000900: 2.4.1 (Final) 2017-07-17T20:07:03.459+0530|Info: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds. 2017-07-17T20:07:03.475+0530|Info: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds. 2017-07-17T20:07:04.820+0530|Info: Cannot find the resource bundle for the name com.sun.logging.enterprise.system.core.naming for class org.glassfish.concurrent.runtime.deployer.ConcurrentObjectFactory using org.glassfish.main.concurrent.impl [41] 2017-07-17T20:07:05.185+0530|Info: Loading application [test-service] at [/test-service] 2017-07-17T20:07:05.524+0530|Info: test-service was successfully deployed in 3,672 milliseconds. 发生错误时,

1. Kepler Service Release 2
2. JDK 1.8 with Java compiler level set to 1.7 in Eclipse
3. pom.xml




<dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
            <version>7.0</version>
            <scope>provided</scope>
        </dependency> 
        <dependency>
            <groupId>javax.json</groupId>
            <artifactId>javax.json-api</artifactId>
            <version>1.1</version>
        </dependency>

        <dependency>
            <groupId>org.glassfish</groupId>
            <artifactId>javax.json</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.2</version>
            <scope>test</scope>
        </dependency>


4. Payara Server 4.1.1.171

使用环境,

  position: fixed;
  top: 64px;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: auto;
  z-index: 99;
  background: #fff;

无法加载应用程序,可能的原因是什么?如何解决?

2 个答案:

答案 0 :(得分:1)

使用Java 7(u80)或Java 8(u121,u151)时,Payara版本无法消除此错误:

  • 4.1.2.172
  • 4.1.1.171.0.1
  • 5.0 beta 1

相反,带有Java 8GlassFish 5(u151)消除了类不兼容错误。

答案 1 :(得分:0)

Payara服务器从payara-4.1.2.172降级到payara-4.1.1.171.0.1是修复,可能的原因是服务器之间的编译器不匹配,其中payara-4.1.1.171.0.1Java 7配合得很好。来自社区的更多解释将有助于更清楚地了解可能的错误原因。