当前位置: 代码迷 >> J2SE >> 一个很特别的ClassNotFound错误
  详细解决方案

一个很特别的ClassNotFound错误

热度:191   发布时间:2016-04-24 12:31:09.0
一个很特别的ClassNotFound异常
nc.bs.framework.exception.FrameworkRuntimeException: Unexpected error(ClassNotFound)
at nc.bs.framework.comn.serv.ServiceDispatcher.execCall(ServiceDispatcher.java:110)
at nc.bs.framework.comn.serv.CommonServletDispatcher.doGet(CommonServletDispatcher.java:75)
at nc.bs.framework.comn.serv.CommonServletDispatcher.doPost(CommonServletDispatcher.java:95)
Caused by: java.lang.ClassNotFoundException: class is not found: nc.ui.drp.hf204010.InvoiceApplyBillField classloader is null at nc.bs.framework.comn.NetObjectInputStream$NCObjectInputStream.resolveClass(NetObjectInputStream.java:80)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1543)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1465)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1698)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1917)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1841)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1718)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1633)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1298)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
at nc.bs.framework.common.InvocationInfo.readExternal(InvocationInfo.java:418)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1758)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1716)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
at nc.bs.framework.comn.NetObjectInputStream.readObjectOverride(NetObjectInputStream.java:235)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:343)
at nc.bs.framework.comn.serv.ServiceDispatcher.readObject(ServiceDispatcher.java:397)
at nc.bs.framework.comn.serv.ServiceDispatcher.execCall(ServiceDispatcher.java:90)
... 2 more

我是在用友公司做开发的,但是这个问题独立与公司产品。如题 这个类很明显在classpath里面是有的 路径没错,看了一遍又一片,class文件就在那里,可是一运行就提示类找不到,还有很特别的一句 classloader is null

------解决方案--------------------
classloader 是null的话就会用bootstrap类加载器去加载,这个加载器只查找jdk安装目录,不会扫描classpath