在必须切换到Firebase Admin 4.0.0 SDK之后,我在服务器上得到了这个。任何人都知道我可以切换回旧的server-sdk依赖关系,或者解决这个异常的方法吗?我在此期间向FB报告过,但是想让服务器再次运行......此刻我似乎完全卡住了。
java.lang.NoClassDefFoundError: com/google/firebase/database/collection/LLRBNode$NodeVisitor
at com.google.firebase.database.snapshot.PriorityUtilities.NullPriority(PriorityUtilities.java:13)
at com.google.firebase.database.snapshot.NodeUtilities.NodeFromJSON(NodeUtilities.java:12)
at com.google.firebase.database.core.Repo.updateInfo(Repo.java:540)
at com.google.firebase.database.core.Repo.onServerInfoUpdate(Repo.java:494)
at com.google.firebase.database.core.Repo.onDisconnect(Repo.java:485)
at com.google.firebase.database.connection.PersistentConnectionImpl.onDisconnect(PersistentConnectionImpl.java:409)
at com.google.firebase.database.connection.Connection.close(Connection.java:82)
at com.google.firebase.database.connection.Connection.onReset(Connection.java:199)
at com.google.firebase.database.connection.Connection.onControlMessage(Connection.java:152)
at com.google.firebase.database.connection.Connection.onMessage(Connection.java:110)
at com.google.firebase.database.connection.WebsocketConnection.appendFrame(WebsocketConnection.java:226)
at com.google.firebase.database.connection.WebsocketConnection.handleIncomingFrame(WebsocketConnection.java:271)
at com.google.firebase.database.connection.WebsocketConnection.access$500(WebsocketConnection.java:20)
at com.google.firebase.database.connection.WebsocketConnection$WSClientTubesock$2.run(WebsocketConnection.java:67)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
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)
Caused by: java.lang.ClassNotFoundException: com.google.firebase.database.collection.LLRBNode$NodeVisitor
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 21 more
稍后:
Tue Nov 08 14:49:06 CET 2016 [ERROR] RunLoop: Uncaught exception in Firebase Database runloop (3.0.0). Please report to support@firebase.com
java.lang.NullPointerException
at com.google.firebase.database.core.Repo.addEventCallback(Repo.java:518)
at com.google.firebase.database.Query$3.run(Query.java:195)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
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)
答案 0 :(得分:3)
Firebase has just released version 4.0.1 of firebase-admin. This adds the missing classes and appears to work correctly.
This could have been managed better. Version 4.0.0 of firebase-admin should have been tested, and in addition, it does not make sense to kill the old dependency at the same time as adding a new one - there should be some time (at least a few days) where people are not forced to upgrade.
答案 1 :(得分:1)
让我自己在POM文件中使用此添加工作(您仍然可以使用最新的firebase实现):
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-server-sdk</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-server-sdk</artifactId>
<version>3.0.1</version>
</dependency>
答案 2 :(得分:0)
今天早上遇到了完全相同的问题。显然,Firebase将firebase-server-sdk的版本更新为3.0.2,这是一个空包,强制切换到firebase-admin 4.0.0。 您仍然可以使用firebase-server-sdk 3.0.1。 在您的maven文件中:
<version>[3.0.1,)</version>
我有相同版本的
{{1}}
这使得它拉3.0.2而不是3.0.1因为它是最新的
一旦解决了firebase-admin的问题,切换到它可能是一个好主意
答案 3 :(得分:0)
我解决了这个问题,有必要将版本更新到4.0.1 !!