org.springframework.dao.InvalidDataAccessApiUsageException: No value supplied for the SQL parameter 'employeeId': Invalid property 'employeeId' of bean class [com.spring.jdbc.model.Order]: Bean property 'employeeId' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?

  1. 0

    org.springframework.dao.InvalidDataAccessApiUsageException: No value supplied for the SQL parameter

    Stack Overflow | 2 months ago | javatechnology
    org.springframework.dao.InvalidDataAccessApiUsageException: No value supplied for the SQL parameter 'employeeId': Invalid property 'employeeId' of bean class [com.spring.jdbc.model.Order]: Bean property 'employeeId' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
  2. 0

    最新评论 - 孤旅者 - 博客园

    cnblogs.com | 12 months ago
    org.springframework.dao.InvalidDataAccessApiUsageException: No value supplied for the SQL parameter 'userId': Invalid property 'userId' of bean class [com.wanggc.springbatch.sample.multitypessinglefile.pojo.User]: Bean property 'userId' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
  3. 0

    SqlParameterSource ps = new BeanPropertySqlParameterSource(admin)²»Ã÷Òì³£_java_µçÄÔƵµÀ- Ψ²Å½ÌÓýÍø

    hn1c.com | 12 months ago
    org.springframework.dao.InvalidDataAccessApiUsageException: No value supplied for the SQL parameter 'aNumber': Invalid property 'aNumber' of bean class [com.mat.vo.Admin]: Bean property 'aNumber' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to perform batch update in Spring with a list of maps?

    Stack Overflow | 3 years ago
    org.springframework.dao.InvalidDataAccessApiUsageException: No value supplied for the SQL parameter 'website': Invalid property 'website' of bean class [org.springframework.util.LinkedCaseInsensitiveMap]: Bean property 'website' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
  6. 0

    I have a simple javabean with: { private Long aId; public Long getAId() { return aId; } public void setAId(Long id) { aId = id; } } And in my sql string i have to refer to ':AId' instead of ':aId' as I usally do. public void insertItem(Item item) throws SQLException { final String sql = "INSERT INTO ITEM (I_ID, I_TITLE, I_A_ID, I_PUB_DATE, I_PUBLISHER, I_SUBJECT, I_DESC, I_SRP, I_COST, I_AVAIL, I_ISBN, I_PAGE, I_BACKING, I_DIMENSIONS, I_IMAGE)" + "VALUES (:id, :title, :AId, :pubDate, :publisher, :subject, :desc, :srp, :cost, :avail, :isbn, :page, :backing, :dimensions, :image)"; SqlParameterSource paramSource = new BeanPropertySqlParameterSource( item); this.namedParameterJdbcTemplate.update(sql, paramSource); } If i use aId this is what happens: 11:34:32,218 ERROR [DbPopulator] Exception while handling request: org.springframework.dao.InvalidDataAccessApiUsageException: No value supplied for the SQL parameter 'aId': Invalid property 'aId' of bean class [pt.uc.dei.generic.component.pojo.Item]: Bean property 'aId' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter? at org.springframework.jdbc.core.namedparam.NamedParameterUtils.buildValueArray(NamedParameterUtils.java:289) at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.update(NamedParameterJdbcTemplate.java:216) at pt.uc.dei.loader.dao.InsertionDao.insertItem(InsertionDao.java:70) at pt.uc.dei.loader.logic.DbPopulator.populateItemTable(DbPopulator.java:261) at pt.uc.dei.loader.logic.DbPopulator.access$400(DbPopulator.java:30) at pt.uc.dei.loader.logic.DbPopulator$1.doInTransaction(DbPopulator.java:87) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at pt.uc.dei.loader.logic.DbPopulator.populate(DbPopulator.java:70) at pt.uc.dei.loader.logic.DbPopulator.init(DbPopulator.java:54) at pt.uc.dei.loader.Initializer.init(Initializer.java:39) at pt.uc.dei.loader.Initializer.main(Initializer.java:44) Using :AId solves the problem.

    Spring JIRA | 1 decade ago | Nuno Laranjeiro
    org.springframework.dao.InvalidDataAccessApiUsageException: No value supplied for the SQL parameter 'aId': Invalid property 'aId' of bean class [pt.uc.dei.generic.component.pojo.Item]: Bean property 'aId' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.springframework.dao.InvalidDataAccessApiUsageException

      No value supplied for the SQL parameter 'employeeId': Invalid property 'employeeId' of bean class [com.spring.jdbc.model.Order]: Bean property 'employeeId' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?

      at org.springframework.jdbc.core.namedparam.NamedParameterUtils.buildValueArray()
    2. Spring Framework
      NamedParameterJdbcTemplate.queryForObject
      1. org.springframework.jdbc.core.namedparam.NamedParameterUtils.buildValueArray(NamedParameterUtils.java:342)
      2. org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.getPreparedStatementCreator(NamedParameterJdbcTemplate.java:348)
      3. org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.queryForObject(NamedParameterJdbcTemplate.java:211)
      4. org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.queryForObject(NamedParameterJdbcTemplate.java:226)
      4 frames
    3. com.spring.jdbc
      OrderDAOImpl.countOfOrders
      1. com.spring.jdbc.dao.OrderDAOImpl.countOfOrders(OrderDAOImpl.java:51)
      1 frame
    4. com.spring.batch
      OrderTest.testCountByEmployeeIdAndShipperId
      1. com.spring.batch.OrderTest.testCountByEmployeeIdAndShipperId(OrderTest.java:38)
      1 frame
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    6. JUnit
      InvokeMethod.evaluate
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      4 frames
    7. Spring TestContext
      SpringRepeat.evaluate
      1. org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
      2. org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
      3. org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
      3 frames
    8. JUnit
      ParentRunner.runLeaf
      1. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      1 frame
    9. Spring TestContext
      SpringJUnit4ClassRunner.runChild
      1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:252)
      2. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
      2 frames
    10. JUnit
      ParentRunner$2.evaluate
      1. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      2. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      3. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      4. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      5. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      5 frames
    11. Spring TestContext
      RunAfterTestClassCallbacks.evaluate
      1. org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
      2. org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
      2 frames
    12. JUnit
      ParentRunner.run
      1. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      1 frame
    13. Spring TestContext
      SpringJUnit4ClassRunner.run
      1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
      1 frame
    14. JUnit4 Runner
      JUnit4TestReference.run
      1. org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
      1 frame
    15. JUnit3 Runner
      RemoteTestRunner.main
      1. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
      3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
      4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
      5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
      5 frames