信息: Loading validation configurations from [file [G:\bpsms\bpsms\target\classes\resources\valid\custom_rules.xml],file [G:\bpsms\bpsms\target\classes\resources\valid\formValid.xml],file [G:\bpsms\bpsms\target\classes\resources\valid\validation.xml],file [G:\bpsms\bpsms\target\classes\resources\valid\validator-rules.xml]]
java.lang.IllegalArgumentException: [Assertion failed] - this expression must be true
at org.springframework.util.Assert.isTrue(Assert.java:65)
at org.springframework.util.Assert.isTrue(Assert.java:77)
at org.haze.bpsms.balance.MetalReturnInformationServiceTest.testSelectOne(MetalReturnInformationServiceTest.java:107)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
IDEA冲java开发,selectone中报错
解决办法:
查询的id必须要在数据库中存在
本文分析了在使用IDEA进行Java开发时遇到的一个特定异常情况:在MetalReturnInformationServiceTest类的testSelectOne方法中调用selectone时发生的IllegalArgumentException错误。文章详细解释了解决此类问题的方法,即确保查询的ID在数据库中确实存在。
2506

被折叠的 条评论
为什么被折叠?



