Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnsupportedClassVersionError #68

Open
bijoutrouvaille opened this issue Apr 24, 2019 · 5 comments
Open

UnsupportedClassVersionError #68

bijoutrouvaille opened this issue Apr 24, 2019 · 5 comments

Comments

@bijoutrouvaille
Copy link

Running the emulator after firebase setup:emulators:firestore gives the following error:

firebase serve --only firestore                                                                
✔  firestore: started on http://localhost:8080
⚠  firestore: Exception in thread "main"
⚠  firestore: java.lang.UnsupportedClassVersionError: com/google/cloud/datastore/emulator/firestore/CloudFirestore : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
⚠  firestore:
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
⚠  firestore:
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
⚠  firestore:


Error: firestore: emulator has exited with code: 1
@samtstern
Copy link
Contributor

@bijoutrouvaille I think this is a Java version compatibility issue. Do you have Java 8 installed on your machine? What do you get when you run java -version?

@samtstern
Copy link
Contributor

cc @ryanpbrewster I am surprised the error is this ugly.

@bijoutrouvaille
Copy link
Author

@samtstern You are right on both accounts. I had to update my JDK, which apparently is different from the system Java version. And the error is pretty bad. Not a Java guy. Thanks for the quick help. The emulator is running now.

@samtstern
Copy link
Contributor

@bijoutrouvaille glad it worked!

@katowulf
Copy link

katowulf commented Apr 4, 2020

Reopening this to address the error message (not useful) and docs (incomplete). Ran into this today. Found that our setup doc doesn't mention which Java dependency--JRE, JSE, JDK, MRE, WTF, or OMG--is needed (okay, I made some of those up).

Last but not least, no error was shown in the console when it failed. Just "Error... exited with code 1" and I had to hunt down the error in firebase-debug.log, which didn't help either.

Furthermore, download for 14 seems broken on the Java site, which exacerbates the issue.
image

@katowulf katowulf reopened this Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants