You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating our project protobuf-java to 4.26.0 within my project, we noticed a serious runtime error in production: Code from an external dependency we're using is throwing a ClassNotFoundException while accessing the newBuilder() method of a generated class:
java.lang.NoClassDefFoundError: com/google/protobuf/GeneratedMessageV3$ExtendableMessageOrBuilder
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
at no.ecc.vectortile.VectorTileEncoder.encode(VectorTileEncoder.java:359)
This is a serious problem since there are many Java libraries floating around, which internally use Protobuf.
Describe the solution you'd like
In my opinion, the easiest way to fix the incompatibility would be to reintroduce GeneratedMessageV3 as a (deprecated) alias for GeneratedMessage, but maybe there are better alternatives?
The text was updated successfully, but these errors were encountered:
The protobuf team has been looking at better migration paths for this first major version bump since the introduction of proto3 and future major version bumps. We'll publish the plan soon at https://protobuf.dev/support/version-support/
The exact date and version numbers are still TBD, but this quarter (between now and 7/1/24) we will make a a set of releases that allow gencode from a new patch release of the 3.25.- line to work with runtimes from the 4.-.- release (and all v4 releases following).
Because we're getting to this a bit slowly, we will also be extending support for 3.25.- to Q1 of 2026 to allow plenty of time for users to migrate.
What language does this apply to?
Java
Describe the problem you are trying to solve.
After updating our project protobuf-java to
4.26.0
within my project, we noticed a serious runtime error in production: Code from an external dependency we're using is throwing aClassNotFoundException
while accessing thenewBuilder()
method of a generated class:This is a serious problem since there are many Java libraries floating around, which internally use Protobuf.
Describe the solution you'd like
In my opinion, the easiest way to fix the incompatibility would be to reintroduce
GeneratedMessageV3
as a (deprecated) alias forGeneratedMessage
, but maybe there are better alternatives?The text was updated successfully, but these errors were encountered: