我试图使用netty jar作为pushy库(https://github.com/relayrides/pushy)的一部分来发送苹果推送通知。它在我当地的tomcat中运行良好。当我尝试在IBM WAS上部署它并启动我的服务器时,它给了我以下异常。
com.ibm.ws.ecs.internal.scan.context.impl.ScannerContextImpl scanJAR无法打开资源io / netty / util / internal / shaded / org / jctools / queues / package-info.class的输入流存档WEB-INF / lib / netty-common-4.1.16.Final.jar
请在我们使用的版本下面找到。
WAS - 8.5.5 Java - 1.7 Netty - 4.1.16
请帮助我理解问题的原因以及如何解决问题。感谢。
答案 0 :(得分:1)
从
看“netty-common-4.1.16.Final.jar”https://mvnrepository.com/artifact/io.netty/netty-common/4.1.16.Final
我看到了这个资源:
网状-共4.1.16.Final.jar / IO /网状/ util的/内部/阴影/组织/ jctools /队列/包info.class
使用java8编译器编译。这似乎是不正确的 - JAR的其他类资源都不是使用java8编译的。
“package-info”的数据(内部报告格式):
/netty-common-4.1.16.Final.jar/io/netty/util/internal/shaded/org/jctools/queues/package-info.class
interface synthetic io.netty.util.internal.shaded.org.jctools.queues.package-info
extends java.lang.Object
Version [ 0x34 0x00 ] ( J2SE 8 )
相同的数据,例如“Log4JLoggerFactory”:
/netty-common-4.1.16.Final.jar/io/netty/util/internal/logging/Log4JLoggerFactory.class
public io.netty.util.internal.logging.Log4JLoggerFactory
extends io.netty.util.internal.logging.InternalLoggerFactory
Version [ 0x32 0x00 ] ( J2SE 6.0 )
[F] public static final INSTANCE : [ Lio/netty/util/internal/logging/InternalLoggerFactory; ]
[M] public deprecated <init> : [ ()V ] ( void )
@java.lang.Deprecated
[M] public newInstance : [ (Ljava/lang/String;)Lio/netty/util/internal/logging/InternalLogger; ]
[M] static <clinit> : [ ()V ] ( void )
您可以尝试使用已删除的资源重新运行吗? (或者,重建为不使用java8?)IBM WebSphere不会处理java8类,除非在足够高的服务级别(8.5.5.9及更高版本)。或者,尝试更高级别的WebSphere服务。