{"action":"created","issue":{"url":"https://api.github.com/repos/alibaba/fastjson/issues/616","repository_url":"https://api.github.com/repos/alibaba/fastjson","labels_url":"https://api.github.com/repos/alibaba/fastjson/issues/616/labels{/name}","comments_url":"https://api.github.com/repos/alibaba/fastjson/issues/616/comments","events_url":"https://api.github.com/repos/alibaba/fastjson/issues/616/events","html_url":"https://github.com/alibaba/fastjson/issues/616","id":153457182,"number":616,"title":"java.lang.ClassNotFoundException: com.alibaba.fastjson.serializer.SerializeFilterable","user":{"login":"onlychoice","id":883232,"avatar_url":"https://avatars.githubusercontent.com/u/883232?v=3","gravatar_id":"","url":"https://api.github.com/users/onlychoice","html_url":"https://github.com/onlychoice","followers_url":"https://api.github.com/users/onlychoice/followers","following_url":"https://api.github.com/users/onlychoice/following{/other_user}","gists_url":"https://api.github.com/users/onlychoice/gists{/gist_id}","starred_url":"https://api.github.com/users/onlychoice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onlychoice/subscriptions","organizations_url":"https://api.github.com/users/onlychoice/orgs","repos_url":"https://api.github.com/users/onlychoice/repos","events_url":"https://api.github.com/users/onlychoice/events{/privacy}","received_events_url":"https://api.github.com/users/onlychoice/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-05-06T14:00:32Z","updated_at":"2016-05-08T11:50:59Z","closed_at":null,"body":"java.lang.ClassNotFoundException: com.alibaba.fastjson.serializer.SerializeFilterable\r\n\tjava.lang.ClassLoader.findClass(ClassLoader.java:531)\r\n\tjava.lang.ClassLoader.loadClass(ClassLoader.java:425)\r\n\tjava.lang.ClassLoader.loadClass(ClassLoader.java:358)\r\n\tjava.lang.Class.getDeclaredConstructors0(Native Method)\r\n\tjava.lang.Class.privateGetDeclaredConstructors(Class.java:2532)\r\n\tjava.lang.Class.getConstructor0(Class.java:2842)\r\n\tjava.lang.Class.newInstance(Class.java:345)\r\n\tcom.alibaba.fastjson.serializer.ASMSerializerFactory.createJavaBeanSerializer(ASMSerializerFactory.java:438)\r\n\tcom.alibaba.fastjson.serializer.SerializeConfig.createASMSerializer(SerializeConfig.java:99)\r\n\tcom.alibaba.fastjson.serializer.SerializeConfig.createJavaBeanSerializer(SerializeConfig.java:137)\r\n\tcom.alibaba.fastjson.serializer.SerializeConfig.getObjectWriter(SerializeConfig.java:425)\r\n\tcom.alibaba.fastjson.serializer.JSONSerializer.getObjectWriter(JSONSerializer.java:320)\r\n\tcom.alibaba.fastjson.serializer.JSONSerializer.write(JSONSerializer.java:263)\r\n\tcom.alibaba.fastjson.JSON.toJSONString(JSON.java:562)\r\n\tcom.alibaba.fastjson.JSON.toJSONString(JSON.java:504)\r\n\tcom.alibaba.fastjson.JSON.toJSONString(JSON.java:469)\r\n\r\n\r\n场景：fastjson由一个URLClassLoader加载，这个ClassLoader的parent是SystemClassLoader。\r\n在由SystemClassLoader加的类A中通过反射生成URLClassLoader加载的一个类B并生成一个对象b，然后调用该对象b的一个接口，这个接口内部调用 JSON.toJSONString。\r\n版本：1.2.11"},"comment":{"url":"https://api.github.com/repos/alibaba/fastjson/issues/comments/217711324","html_url":"https://github.com/alibaba/fastjson/issues/616#issuecomment-217711324","issue_url":"https://api.github.com/repos/alibaba/fastjson/issues/616","id":217711324,"user":{"login":"onlychoice","id":883232,"avatar_url":"https://avatars.githubusercontent.com/u/883232?v=3","gravatar_id":"","url":"https://api.github.com/users/onlychoice","html_url":"https://github.com/onlychoice","followers_url":"https://api.github.com/users/onlychoice/followers","following_url":"https://api.github.com/users/onlychoice/following{/other_user}","gists_url":"https://api.github.com/users/onlychoice/gists{/gist_id}","starred_url":"https://api.github.com/users/onlychoice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onlychoice/subscriptions","organizations_url":"https://api.github.com/users/onlychoice/orgs","repos_url":"https://api.github.com/users/onlychoice/repos","events_url":"https://api.github.com/users/onlychoice/events{/privacy}","received_events_url":"https://api.github.com/users/onlychoice/received_events","type":"User","site_admin":false},"created_at":"2016-05-08T11:50:59Z","updated_at":"2016-05-08T11:50:59Z","body":"这个没啥用，这个可能改变ASMDeserializerFactory的ASMClassLoader，对ASMSerializerFactory不起作用，https://github.com/alibaba/fastjson/blob/708b5c5eb4d2b90d1ee5eba125a77ff3ee8052f4/src/main/java/com/alibaba/fastjson/serializer/ASMSerializerFactory.java#L36\r\n里直接new了ASMClassLoader"}}