【发布时间】:2017-12-16 01:47:49
【问题描述】:
让我更清楚地说明这一点。我已经在 Tomcat 8、firebase-admin 库版本 5.2.0、JSF 2.2、jersey-json 1.18.1 和 Jersey 1.14 中使用 Java 8 设置了我的项目。 服务器启动时出现如下错误:
jul 11, 2017 5:23:47 PM org.apache.catalina.core.StandardContext loadOnStartup
GRAVE: Servlet [Jersey Web Application] in web application [/core-web-app] threw load() exception
java.lang.ArrayIndexOutOfBoundsException: 2560
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at com.sun.jersey.spi.scanning.AnnotationScannerListener.onProcess(AnnotationScannerListener.java:136)
at com.sun.jersey.spi.scanning.servlet.WebAppResourcesScanner$2.f(WebAppResourcesScanner.java:104)
at com.sun.jersey.core.util.Closing.f(Closing.java:71)
I realized that this error takes places when i Have the folowing code in my class:
Task<UserRecord> task = FirebaseAuth.getInstance().createUser(request)
.addOnSuccessListener(userRecord -> {
System.out.println("Successfully created new user: " + userRecord.getUid());
try {
createLocalAccount(account, userRecord.getUid());
} catch (Exception exception) {
exception.printStackTrace();
}
})
.addOnFailureListener(e -> {
System.err.println("Error creating new user: " + e.getMessage());
});
如果删除上面的代码,服务器启动时不会显示错误。 Jersey 和 Firebase Admin lib 之间是否存在冲突?我该如何解决这个问题?
【问题讨论】:
标签: java jersey tomcat8 firebase-admin