Xfile 错误记录 object is not an instance of declaring class
2014-02-06 13:12
417 查看
就这么一个傻的不行的错误 我找了好久。翻译来看是
就是反射异常 ,没有实例化。但是我查看了配置文件。始终想不明白。怎么就没有实例化。最后发现我真的是台粗心了。public interface HelloService { public void sayHello(String name); } public class HelloServiceImp { public void sayHello(String name) { System.out.println("hello"+name); } } 一看就知道接口没有被实例化,我调用了接口 但是接口找不到实例化对象。所以报错只需要将接口实例化就好了public class HelloServiceImp implements HelloService{ public void sayHello(String name) { System.out.println("hello"+name); } } 当我发现的时候,我无语了。居然会忘记。
就是反射异常 ,没有实例化。但是我查看了配置文件。始终想不明白。怎么就没有实例化。最后发现我真的是台粗心了。public interface HelloService { public void sayHello(String name); } public class HelloServiceImp { public void sayHello(String name) { System.out.println("hello"+name); } } 一看就知道接口没有被实例化,我调用了接口 但是接口找不到实例化对象。所以报错只需要将接口实例化就好了public class HelloServiceImp implements HelloService{ public void sayHello(String name) { System.out.println("hello"+name); } } 当我发现的时候,我无语了。居然会忘记。
相关文章推荐
- 项目启动后,访问报 object is not an instance of declaring class 错误
- java反射错误:object is not an instance of declaring class
- 使用反射报异常:object is not an instance of declaring class解决方案
- object is not an instance of declaring class 反射异常
- HIbernate 3.2 java.lang.IllegalArgumentException: object is not an instance of declaring class
- java axis调用cxf 的坑object is not an instance of declaring class while invoking public
- spring的 object is not an instance of declaring class
- java.lang.IllegalArgumentException: object is not an instance of declaring class
- hibernate 4 object is not an instance of declaring class
- 反射获取方法时:object is not an instance of declaring class
- 异常笔记(2)--object is not an instance of declaring class while invoking public abstract java.lang.Long
- nested exception is java.lang.IllegalArgumentException: object is not an instance of declaring class
- object is not an instance of declaring class&argument type mismatch
- object is not an instance of declaring class 反射异常
- 报错:object is not an instance of declaring class
- object is not an instance of declaring class while invoking public abstract…的解决
- object is not an instance of declaring class
- object is not an instance of declaring class
- java.lang.IllegalArgumentException: object is not an instance of declaring class
- Java反射:object is not an instance of declaring c...