Eclipse java. lang. NoClassDefFoundError: org/dom4j/io/SAXReade error Solution

Source: Internet
Author: User

Why did I import the dom4j jar package in the Eclipse project but still fail to instantiate the SAXReader class?

Cause: the jar package is not imported correctly.

One of the methods to import the jar package correctly:

1. Drag the jar package directly to the WebRoot/WEB-INF/lib directory of the project:

After the dialog box is displayed, select Copy or Link. (If you have a fixed Jar directory, you can use Link. If you want to use the project wherever it is migrated, you 'd better use Copy):

2. Right-click the jar file in the project and add it to the Build Path of the project: <Strong? Http: kf ware vc "target =" _ blank "class =" keylink "> VcD4KPHA + pgltzybzcm9 "" alt = "\">

3. Run it again. It should be okay. If the problem persists, restart the Server:


Related Article

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: 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.