Problem with a class loading on the line (Java.lang.NoClassDefFoundError)

Source: Internet
Author: User
I. BackgroundIn late February 2012, the application of the container from JBoss replaced by jetty.
Second, failureA few days ago the classmate asked me to see a problem, screenshot as follows: Roughly described as, the line has 3 servers, the second server has been in the alarm, and the number of alarm bars has been increasing.
The situation is very urgent and must be resolved immediately and immediately. third, the processing process
The first reaction is to look at the impact of the business, found that the business is very biased, is a management function. Look at the business volume, today sent two, why would have been increasing it. It turns out that this logic can be triggered on a regular basis. This is an asynchronous release of the message, when the first time to send, there is a problem, there is a local, and then start sending a scheduled time. Almost every 10s at a time. So the anomaly data has been increasing, alarming constantly. The following are roughly as follows:

 org.apache.activemq.management.jmsstatsimpl This class does not exist, and later to eclipse Ctrl+shift+t there is a view of this kind, is in the package Apache.activemq-5.3.0-patch.jar. Then I went to the online environment, the war opened to see whether there are Apache.activemq-5.3.0-patch.jar, is there. Then I am very entangled, this is why. Class load Order. Later, see it with another colleague. Find out the cause of the problem. Originally  JMSStatsImpl  relied on javax.management.j2ee.statistics.Stats, this is a j2ee0.4 version of an interface class. Maven configuration:                <dependency>                  <groupid>com.alibaba.external</groupid >                 <artifactid >java.j2ee</artifactId>                  <version>1.4</version>                  <scope& Gt;provided</scope>                  </dependency> is not introduced into the jetty container through provided. (Jetty and JBoss is different) why did not consider the introduction of the Java package, we want to use the Java package, the direct application of the relevant interface package, such as the use of the interface packet JMS directly apply the JMS jar. The above class is considered a legacy. (biased logic, test without concern) Iv. ThinkingIn dealing with such an urgent failure of the line, there are generally the following steps: (Of course, alternating) first, to confirm the scope of impact, to quell the impact. Second, find out the cause and solve it quickly (if there is a short-term change plan, take a short-term solution) ( can find a cow to solve, then hurry to find, do not delay the restoration of the best timeThird, completely resolved. However, everything is good for a rainy day, but there is no guarantee that there will be no emergency. v. Copyright Declaration This article can be reproduced freely, please retain the author's relevant information. Author: Works for Alibaba seal God

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.