zoukankan      html  css  js  c++  java
  • Caused by: java.lang.NullPointerException, java.lang.reflect.InvocationTargetExc

    1. java.lang.reflect.InvocationTargetException  
    2.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
    3.     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
    4.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
    5.     at java.lang.reflect.Method.invoke(Unknown Source)  
    6.     at com.controller.DynamicProxy.invoke(DynamicProxy.java:31)  
    7.     at $Proxy4.viewRisk(Unknown Source)  
    8.     at com.controller.RPDController.viewRisk(RPDController.java:2592)  
    9.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
    10.     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
    11.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
    12.     at java.lang.reflect.Method.invoke(Unknown Source) 
      1. Caused by: java.lang.NullPointerException  
      2.     at com.controller.CopyOfRPDController.viewRisk(CopyOfRPDController.java:2602)  
      3.     ... 38 more 
      4. spring bean,配置以后,都得用bean配置,不能new,否则会有nullPointer
        更准确的说,new哪个class,那么这个class所用到的bean都不起作用,为null
        所以,不要去new任何bean,都用xml的配置即可!
        问题是这样解决的,
  • 相关阅读:
    可持久化线段树学习笔记
    P1084 疫情控制
    Educational Codeforces Round 71 (Rated for Div. 2)
    Codeforces Round #587 (Div. 3)
    luogu P1886滑动窗口
    Codeforces Round #574 (Div. 2)
    luogu P1880 [NOI1995]石子合并
    [JZOJ3521]道路覆盖--状压DP
    [NOIP2018模拟赛10.19]只会暴力报告
    [NOIP2018模拟赛10.18]自闭报告
  • 原文地址:https://www.cnblogs.com/itworkers/p/5760666.html
Copyright © 2011-2022 走看看