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

Java version failed to build on Protobuf 3.5.1.1 #4269

Closed
KaoCC opened this issue Feb 2, 2018 · 7 comments
Closed

Java version failed to build on Protobuf 3.5.1.1 #4269

KaoCC opened this issue Feb 2, 2018 · 7 comments

Comments

@KaoCC
Copy link

KaoCC commented Feb 2, 2018

Environment:

Java 9 (JDK 9.0.4) x64 on Windows 10
Protobuf 3.5.1.1

Error:
ExtensionRegistryFactoryTest.initializationError » ExceptionInInitializer

Details:


Test set: com.google.protobuf.ExtensionRegistryFactoryTest


Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.001 s <<< FAILURE! - in com.google.protobuf.ExtensionRegistryFactoryTest
initializationError(com.google.protobuf.ExtensionRegistryFactoryTest) Time elapsed: 0.001 s <<< ERROR!
java.lang.ExceptionInInitializerError
at com.google.protobuf.ExtensionRegistryFactoryTest.getLiteOnlyClassLoader(ExtensionRegistryFactoryTest.java:253)
at com.google.protobuf.ExtensionRegistryFactoryTest.(ExtensionRegistryFactoryTest.java:59)

@xfxyjwf xfxyjwf added the java label Feb 2, 2018
@languitar
Copy link

languitar commented Sep 10, 2018

Same thing here on java 10 with 3.6.0

@fmauger
Copy link

fmauger commented May 2, 2019

Same issue on Ubuntu Linux 18.04 with protobuf 3.7.1, maven 3.6.0, openjdk-11:

[INFO] Running com.google.protobuf.MapTest
[INFO] Tests run: 36, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.074 s - in com.google.protobuf.MapTest
[INFO] Running com.google.protobuf.ExtensionRegistryFactoryTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.016 s <<< FAILURE! - in com.google.protobuf.ExtensionRegistryFactoryTest
[ERROR] initializationError(com.google.protobuf.ExtensionRegistryFactoryTest)  Time elapsed: 0.014 s  <<< ERROR!
java.lang.ExceptionInInitializerError
	at com.google.protobuf.ExtensionRegistryFactoryTest.getLiteOnlyClassLoader(ExtensionRegistryFactoryTest.java:260)
	at com.google.protobuf.ExtensionRegistryFactoryTest.<clinit>(ExtensionRegistryFactoryTest.java:59)

@leebird
Copy link

leebird commented May 22, 2019

Same issue on Ubuntu 18.04, protobuf 3.7.1, maven 3.6.0, openjdk 11.0.3. Any update?

@leebird
Copy link

leebird commented May 23, 2019

@KaoCC As it has been some time since you saw this bug, have you already solved it?

@KaoCC
Copy link
Author

KaoCC commented May 25, 2019

@leebird Unfortunately no. I remember at some point our project which required Java + Protobuf drastically shifted to C++ and it just worked.

@TeBoring TeBoring assigned ghost Jun 15, 2019
@ghost
Copy link

ghost commented Jun 17, 2019

@ghost ghost closed this as completed Jun 17, 2019
@gricardo99
Copy link

I don't think that change addresses or fixes this error. I'm hitting the same error with same JDK (9.04), but Protobuf 3.10.1, which has the above change, on Ubuntu 16.04. The change also shows added catch for exception SecurityException, but that's not the reported error/exception. The exception is ExceptionInInitializerError. Any recommended workaround would be helpful. Perhaps run with newer JDK?

This issue was closed.
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

6 participants