-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
15
-
x86_64
-
windows_7
A DESCRIPTION OF THE PROBLEM :
This is a bug report that was sent to jdk-dev, it links to a JMockit issue with more info.
Attached is the reproducer from the submitter. It needs Apache Maven to run.
$ cd jmockit-mybatis-bindingexception-sample
$ mvn test
:
[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.882 s <<< FAILURE! - in com.example.mybatis_h2_sample.AppTestSuit
[ERROR] testGetUsers(com.example.mybatis_h2_sample.AppTestExceptionIfRunJUnitAfterTestOk) Time elapsed: 0.023 s <<< ERROR!
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'firstName' not found. Available parameters are [arg1, arg0, param1, param2]
at com.example.mybatis_h2_sample.AppTestExceptionIfRunJUnitAfterTestOk.testGetUsers(AppTestExceptionIfRunJUnitAfterTestOk.java:45)
Caused by: org.apache.ibatis.binding.BindingException: Parameter 'firstName' not found. Available parameters are [arg1, arg0, param1, param2]
at com.example.mybatis_h2_sample.AppTestExceptionIfRunJUnitAfterTestOk.testGetUsers(AppTestExceptionIfRunJUnitAfterTestOk.java:45)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
GitHub Repo: https://github.com/zrlw/jmockit-mybatis-bindingexception-sample.git
IDE: Eclipse 2019-03, 2019-12 or other 4.1x
Tool integration: Maven
Jdk: OpenJDK or Oracle JDK, version >= 1.8
1. git clone the repo.
2. Import into eclipse workspace:
click 'File' -> 'Import...' -> 'Maven' -> 'Existing Maven Projects' -> 'Next',
choose 'jmockit-mybatis-bindingexception-sample' directory for 'Root directory'.
3. Build:
right click the project name on the 'Package Explorer' view,
click 'Maven' -> 'Update Project...'.
4. Test:
right click the project name on the 'Package Explorer' view,
click 'Run As' -> 'Maven test'.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Second testcase should pass 'firstName', 'lastName' as parameter names just like test it alone.
ACTUAL -
Second testcase of the test suit passed 'arg0', 'arg1' to Mybatis which cause BindingException.
FREQUENCY : always
This is a bug report that was sent to jdk-dev, it links to a JMockit issue with more info.
Attached is the reproducer from the submitter. It needs Apache Maven to run.
$ cd jmockit-mybatis-bindingexception-sample
$ mvn test
:
[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.882 s <<< FAILURE! - in com.example.mybatis_h2_sample.AppTestSuit
[ERROR] testGetUsers(com.example.mybatis_h2_sample.AppTestExceptionIfRunJUnitAfterTestOk) Time elapsed: 0.023 s <<< ERROR!
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'firstName' not found. Available parameters are [arg1, arg0, param1, param2]
at com.example.mybatis_h2_sample.AppTestExceptionIfRunJUnitAfterTestOk.testGetUsers(AppTestExceptionIfRunJUnitAfterTestOk.java:45)
Caused by: org.apache.ibatis.binding.BindingException: Parameter 'firstName' not found. Available parameters are [arg1, arg0, param1, param2]
at com.example.mybatis_h2_sample.AppTestExceptionIfRunJUnitAfterTestOk.testGetUsers(AppTestExceptionIfRunJUnitAfterTestOk.java:45)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
GitHub Repo: https://github.com/zrlw/jmockit-mybatis-bindingexception-sample.git
IDE: Eclipse 2019-03, 2019-12 or other 4.1x
Tool integration: Maven
Jdk: OpenJDK or Oracle JDK, version >= 1.8
1. git clone the repo.
2. Import into eclipse workspace:
click 'File' -> 'Import...' -> 'Maven' -> 'Existing Maven Projects' -> 'Next',
choose 'jmockit-mybatis-bindingexception-sample' directory for 'Root directory'.
3. Build:
right click the project name on the 'Package Explorer' view,
click 'Maven' -> 'Update Project...'.
4. Test:
right click the project name on the 'Package Explorer' view,
click 'Run As' -> 'Maven test'.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Second testcase should pass 'firstName', 'lastName' as parameter names just like test it alone.
ACTUAL -
Second testcase of the test suit passed 'arg0', 'arg1' to Mybatis which cause BindingException.
FREQUENCY : always
- duplicates
-
JDK-8240908 RetransformClass does not know about MethodParameters attribute
-
- Resolved
-