Java. Lang. nosuchmethoderror: anlr. Collections. Ast. Getline () Solution

Source: Internet
Author: User

In a project, the anlr component is required to import the antlr-2.7.2.jar from the Lib of struts 2. After running, the following error is prompted:

Java. Lang. nosuchmethoderror: anlr. Collections. Ast. Getline () I

So I guess the AST in version 2.7.2 does not use the Getline method. Please try an anlr of a higher version. Import the antlr-2.7.6.jar from the Lib of hibernate 3, and the above error no longer appears after running. Therefore, the problem occurs because the anlr version is incorrect. The problem is solved, and the cause is also found. How can this problem be proved? In the outline view of Eclipse, we can see that ast of version 2.7.6 has a public abstract Getline () method, but that of version 2.7.2 does not.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.