Remember a jar package conflict

Source: Internet
Author: User

Preface: Never refer to a different version of the two jar packages in the same project, otherwise this could be a big pit.

When doing the net-work project, the Help Center uses Lucene, so it introduces the lucene-5.5.1 package and deletes the lucene-3.0.0 package that originally existed in the project.

Since the paoding-1.0.0 package was previously used in the project, and Paoding relies on Lucene, it was not aware of the problem, and it directly lucene-3.0.0 the package

It's erased. Finally, the Help center under the lucene-5.5.1, only to find paoding function can not be used, because paoding-1.0.0 only support lucene-3.0.0

, but under the lucene-3.0.0 of the package again to add back. Note that this time in our project there are both lucene-5.5.1 and lucene-3.0.0 two versions of the

Jar package .... At this time, I went to the use of lucene-5.5.1 's Help center function, found Help Center search function also error, always reported Nosuchmethodexception,

No matter how the cleanup, recompile, always this error. Tossing a morning, the lucene-3.0.0 package is completely removed from the project (removed from Lib, not removed from the classpath).

As can be seen, although the code of the Help Center import all the lucene-5.5.1 class, but in the virtual machine, or the use of some lucene-3.0.0 classes, so always quote nosuchmethodexception,

OK, the problem has been found, that is, two different versions of the jar package conflict .... At this time, also faced with an embarrassment, to use lucene-5.5.1, then paoding can not be used normally, to use lucene-3.0.0 words,

The search function of the Help center needs to be adjusted to the 3.0.0 version .... paoding-2.0.4 and lucene-4.8.0 have been found on the internet, and the combination is used, and the lucene-4.8.0 API is relative to

lucene-5.5.1 API changes are relatively small, help center search function, as long as a small adjustment can be. End!

Remember a jar package conflict

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.