{"action":"opened","issue":{"url":"https://api.github.com/repos/shidongwa/blog-comments/issues/60","repository_url":"https://api.github.com/repos/shidongwa/blog-comments","labels_url":"https://api.github.com/repos/shidongwa/blog-comments/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/shidongwa/blog-comments/issues/60/comments","events_url":"https://api.github.com/repos/shidongwa/blog-comments/issues/60/events","html_url":"https://github.com/shidongwa/blog-comments/issues/60","id":332785521,"node_id":"MDU6SXNzdWUzMzI3ODU1MjE=","number":60,"title":"ClassNotFoundException and NoClassDefFoundError — 老实说","user":{"login":"shidongwa","id":315525,"node_id":"MDQ6VXNlcjMxNTUyNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/315525?v=4","gravatar_id":"","url":"https://api.github.com/users/shidongwa","html_url":"https://github.com/shidongwa","followers_url":"https://api.github.com/users/shidongwa/followers","following_url":"https://api.github.com/users/shidongwa/following{/other_user}","gists_url":"https://api.github.com/users/shidongwa/gists{/gist_id}","starred_url":"https://api.github.com/users/shidongwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shidongwa/subscriptions","organizations_url":"https://api.github.com/users/shidongwa/orgs","repos_url":"https://api.github.com/users/shidongwa/repos","events_url":"https://api.github.com/users/shidongwa/events{/privacy}","received_events_url":"https://api.github.com/users/shidongwa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-15T13:59:54Z","updated_at":"2018-06-15T13:59:54Z","closed_at":null,"author_association":"OWNER","body":"https://shidonghua.work/2017/02/18/iteye-193/ \n\n From: http://jroller.com/sjivan/entry/difference_between_classnotfoundexception_and_noclassdeffounderror   A ClassNotFoundException is thrown when the reported class is not found by the ClassLoader. This typically means that the class is missing from the CLASSPATH. It could also mean that the class in question is trying to be loaded from another class which was loaded in a parent classloader and hence the class from the child classloader is not visible. This is sometimes the case when working in more complex environments like an App Server (WebSphere is infamous for such classloader issues).    People often tend to confuse java.lang.NoClassDefFoundError with java.lang.ClassNotFoundException however there’s an important distinction. For example an exception (an error really since java.lang.NoClassDefFoundError is a subclass of java.lang.Error) likejava.lang.NoClassDefFoundError:org/apache/activemq/ActiveMQConnectionFactory  does not mean that the ActiveMQConnectionFactory class is not in the CLASSPATH. In fact its quite the opposite. It means that the class ActiveMQConnectionFactory was found by the ClassLoader however when trying to load the class, it ran into an error reading the class definition. This typically happens when the class in question has static blocks or members which use a Class that’s not found by the ClassLoader. So to find the culprit, view the source of the class in question (ActiveMQConnectionFactory in this case) and look for code using static blocks or static members.   On examining the code, say you find a line of code like below, make sure that the class SomeClass in in your CLASSPATH.      private static SomeClass foo = new SomeClass();注： 这种情况主要是编译时是有SomeClass的，运行时被删除找不到了就会报这种错误。"}}
{"actor":{"display_login":"shidongwa"}}