zymap commented on PR #3997:
URL: https://github.com/apache/bookkeeper/pull/3997#issuecomment-1605911642

   > > It seems I met the same issue mentioned here 
[protocolbuffers/protobuf#11986](https://github.com/protocolbuffers/protobuf/issues/11986)
   > > Pulsar errors:
   > > Caused by: java.lang.IllegalAccessError: class 
org.apache.bookkeeper.proto.DataFormats$BookieServiceInfoFormat$Endpoint tried 
to access method 'com.google.protobuf.LazyStringArrayList 
com.google.protobuf.LazyStringArrayList.emptyList()' 
(org.apache.bookkeeper.proto.DataFormats$BookieServiceInfoFormat$Endpoint and 
com.google.protobuf.LazyStringArrayList are in unnamed module of loader 'app')
   > 
   > @zymap I wonder what the resolution is? Perhaps there's an option to 
downgrade protobuf to 3.21.x ?
   
   @lhotari I found the reason for this error. It is caused by the 
protobuf-java version. In the generated code, it uses `emptyList()`
   ```
   auth_ =
               com.google.protobuf.LazyStringArrayList.emptyList();
           extensions_ =
               com.google.protobuf.LazyStringArrayList.emptyList();
   ```
   
   In the pulsar side, we are using 3.19.6, which the `emptyList()` method is 
package private 
https://github.com/protocolbuffers/protobuf/blob/5cba162a5d93f8df786d828621019e03e50edb4f/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java#L70
   
   They have exposed the method to the public since 3.22.0 
https://github.com/protocolbuffers/protobuf/commit/c658e27529ccf4a000724ab3622f1b807c85449b
   
   This means if we want to change upgrade protobuf to 3.22.0+, we must require 
all the sub-project, which depends on the bookkeeper to upgrade protobuf to 
3.22.0+. It should not be acceptable in a minor release. 
   So I will exclude this PR from the 4.16.2 release and include it in the next 
major release.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to