com.sun.jdi.InvocationException occurred invoking method

前端 未结 16 1262
迷失自我
迷失自我 2020-12-13 01:38

I just want to create an object of class, but got this error when debugging. Can anybody tell me what the problem is? The location of this code is in some Spring(2.5) Servic

16条回答
  •  我在风中等你
    2020-12-13 02:10

    I also faced the same problem. In my case I was hitting a java.util.UnknownFormatConversionException. I figured this out only after putting a printStackTrace call. I resolved it by changing my code as shown below.

    from:

    StringBuilder sb = new StringBuilder();
    sb.append("***** Test Details *****\n");
    String.format("[Test: %1]", sb.toString());
    

    to:

    String.format("[Test: %s]", sb.toString());
    

提交回复
热议问题