Atitit. Series of troubleshooting --- NoClassDefFoundError & #160; & #160; NoClassDefFoundError & #160; ClassNotFoundException, dllnotfoundexception

Source: Internet
Author: User
Tags glassfish

Atitit. troubleshooting series --- NoClassDefFoundError ClassNotFoundException, dllnotfoundexception

Atitit. troubleshooting series --- NoClassDefFoundError ClassNotFoundException

 

 

1. The class exception cannot be found in java. lang. ClassNotFoundException. This exception is thrown when the application tries to construct a class based on the class name in the string format and cannot find the class file with the corresponding name after traversing the CLASSPAH. 1

2. Check whether the class exists... 1

3. Add the class "eclipse" to the class "sysoout", ", and" re-compile "to the class" hanging... 3 ". Go to" OK "... 2

4. Try to use web servers that support complete hot deployment. We recommend glassfish and resin .. Tomcat and jboss only support hot deployment in rare cases to add a new line of out print, so eclipse has re-compiled the class .. usually it's OK... 90% this solution can be used to view the updated version information of the tracking class. If the manual synchronization version is for remote debugging, it is usually better to interrupt the connection... if not, restart the web server .. If not, restart ide... 2

5. Class Library conflict 2

 

 

 

1. Java. lang. ClassNotFoundException cannot find the class exception. This exception is thrown when the application tries to construct a class based on the class name in the string format and cannot find the class file with the corresponding name after traversing the CLASSPAH.

 

 

There is also a NoClassDefFoundError, which means that classload will not be able to load the class ..

 

 

2. Check whether the class exists...

 

Author: old wow's paw Attilax iron, EMAIL: 1466519819@qq.com

Reprinted please indicate Source: http://www.cnblogs.com/attilax/

 

 

3. Add a sysoout class named eclipse, and re-compile it to the class... 3. Go to OK...

Cause: myeclipse bug (local debugging), eclipse or web server bug (remote debugging)

Scenario :::


Occasionally, inconsistency between. java and. class occurs ..

Solution :::

4.
Try to use web servers that support complete hot deployment. We recommend glassfish and resin .. Tomcat and jboss only support hot deployment in rare cases
A new line of out print is added, so eclipse has already re-compiled the class .. It is usually OK... 90%. This solution can be used.
You can use bcompare to view the updated version information of the tracking class and manually synchronize the version.
For remote debugging, it is usually better to interrupt the connection... if not, restart the web server ..
If not, restart ide...

 

 

5. Class Library conflict

For example, the jar package contains a class .. The class directory has a class with the same name .. Attilax is called. Clousre .. But this clousre does not exist in the jar package.

 

The class in jar is started and loaded. As a result, classload cannot find the class under the sub-path ....

 

Solution: Delete the startup class with the same name in the jar package .. Use the class file under the class directory to start. In this way, you can ..

 

 

 

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.