My group is trying to build a server using Apache Thrift but we are having strange compilation issues. In the generated Java files from Thrift, the following lines are present:
public static class Client extends shared.BasicServer.Client implements org.apache.thrift.TServiceClient, Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
These are defined as inner classes. When I try to build the project in Eclipse, it actually creates the .class files and the program runs, but Eclipse still says there are various errors related to these lines, including the following:
Bound mismatch: The type Backend.Client is not a valid substitute for the bounded parameter of the type TServiceClientFactory Backend.java /server/src/thrift line 42 Java Problem
The type TServiceClient cannot be a superinterface of Client; a superinterface must be an interface Backend.java /server/src/thrift line 41 Java Problem
I believe this is because org.apache.thrift.TServiceClient is actually an abstract class, not an interface, and yet Client is trying to implement it. However, as I said before, the program compiles and works, and I don't really understand how.
Does anyone have any idea how to get rid of/suppress these errors? I have a feeling there is some simple option I should be passing to my build configuration.