1) override problem
When I learned how to use Maven to manage projects, I tried to change an existing thrift project to a Maven project. As a result, after the dependency library is added, the code automatically generated by Thrift suddenly reported more than one hundred errors, in addition, all the errors were caused by override. At first, I thought it was a problem caused by the dependency Library added by Maven (because I just learned Maven). As a result, I had to go over the dependent library for a long time and failed to solve the problem. Later, I tried to search Baidu (thrift error: Must overwrite the superclass) and found that this was not a thrift problem, but a jdk1.5 issue. The blog on the Internet was written like this:
@ Override is already available in JDK 5, but there is a small bug, that is, it does not support the implementation of the interface. I think this is not override, and JDK 6 corrected this bug, you can add @ override to both the method override of the parent class and the implementation of the interface.
The suggestion in this article is to modify the Java compile settings of the project. Before modification:
After modification:
Solve the problem.
2) jar package reference conflict
This problem also occurs when thrift is used. When I tried to merge thrift interface code into the mapred task code, thrift interface code also reported hundreds of errors. After careful locating, A jar package reference conflict is found.