- java.lang.reflect.InvocationTargetException
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
- at java.lang.reflect.Method.invoke(Unknown Source)
- at com.controller.DynamicProxy.invoke(DynamicProxy.java:31)
- at $Proxy4.viewRisk(Unknown Source)
- at com.controller.RPDController.viewRisk(RPDController.java:2592)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
- at java.lang.reflect.Method.invoke(Unknown Source)
- Caused by: java.lang.NullPointerException
- at com.controller.CopyOfRPDController.viewRisk(CopyOfRPDController.java:2602)
- ... 38 more
- spring bean,配置以后,都得用bean配置,不能new,否则会有nullPointer
更准确的说,new哪个class,那么这个class所用到的bean都不起作用,为null
所以,不要去new任何bean,都用xml的配置即可!
问题是这样解决的,