OK I think a few things seem wrong here:

1. I'm not sure why you have the protobuf runtime source code in your
project, I'd suggest not doing that and referencing it as a jar through
maven.

2. The jar you referenced has a pom that is doing that and I suspect you're
confusing the classloader because that is using version 3.16.1
https://repo1.maven.org/maven2/org/mobilitydata/gtfs-realtime-bindings/0.0.8/gtfs-realtime-bindings-0.0.8.pom

3. I'd look into generating your proto files JIT using a maven plugin like
so: https://www.xolstice.org/protobuf-maven-plugin/

Hope that helps!

- D

On Wed, Oct 5, 2022 at 4:58 AM Markus Keggel <[email protected]> wrote:

> I added a Repo here:
>
> https://github.com/mkeggel/gtfsrt
>
> Thank you for looking into it.
>
> Markus
>
> Am Di., 4. Okt. 2022 um 23:45 Uhr schrieb 'Derek Perez' via Protocol
> Buffers <[email protected]>:
>
>> Do you have the ability to setup a simple reproducing github project so
>> we can try and replicate the issue here?
>>
>> On Tuesday, October 4, 2022 at 2:40:21 PM UTC-7 [email protected] wrote:
>>
>>> Dear List,
>>>
>>> I desperately try to generate JAVA classes for Protocol buffers. I
>>> tried protobuf-21.7, protobuf-21.6 and the latest protobuf-main but there
>>> are always two classes that are faulty:
>>>
>>> com.google.protobuf.GeneratedMessageLite
>>>
>>> Line 1307:       if (instance.extensions != FieldSet.emptySet()) {
>>>
>>> Incompatible operand types
>>> FieldSet<GeneratedMessageLite.ExtensionDescriptor> and
>>> FieldSet<FieldSet.FieldDescriptorLite<FieldSet.FieldDescriptorLite<T>>>
>>>
>>> and class com.google.protobuf.GeneratedMessageV3
>>>
>>> Line 1679: ? (FieldSet<FieldDescriptor>) FieldSet.emptySet()
>>>
>>> Cannot cast from
>>> FieldSet<FieldSet.FieldDescriptorLite<FieldSet.FieldDescriptorLite<T>>> to
>>> FieldSet<Descriptors.FieldDescriptor>
>>>
>>> Is there anyone who can solve this? I am unable to fix this.
>>>
>>> Thank you very much for your help,
>>>
>>> Markus
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Protocol Buffers" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/protobuf/eq8MrtH9l1c/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/protobuf/b4959d63-ef7e-405e-ba67-16b1f1d7a20cn%40googlegroups.com
>> <https://groups.google.com/d/msgid/protobuf/b4959d63-ef7e-405e-ba67-16b1f1d7a20cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/CAJGs%2Bi%2BQDdtCDQWQ4Gy1jiQR7rRSvxoRsyW6VLo88jC6Bb2bhg%40mail.gmail.com.

Reply via email to