There is no getter for property named ' Usename ' in ' Class Cn.itcast.mybatis.pojo.User '

Source: Internet
Author: User
Tags reflector

Org.apache.ibatis.exceptions.PersistenceException:
# # # Error updating database. Cause:org.apache.ibatis.reflection.ReflectionException:There is no getter for property named ' Usename ' in ' class CN.ITCA St.mybatis.pojo.User '
# # # The error may involve Defaultparametermap
# # # The error occurred while setting parameters
# # # sql:update tb_user SET user_name =?, Password =?, name =?, age =?, sex =?, Birthday =?, created = Now (), updated = Now () WHERE id =?;
# # # Cause:org.apache.ibatis.reflection.ReflectionException:There is the no getter for property named ' Usename ' in ' class CN. Itcast.mybatis.pojo.User '
At Org.apache.ibatis.exceptions.ExceptionFactory.wrapException (exceptionfactory.java:26)
At Org.apache.ibatis.session.defaults.DefaultSqlSession.update (defaultsqlsession.java:154)
At Org.apache.ibatis.binding.MapperMethod.execute (mappermethod.java:54)
At Org.apache.ibatis.binding.MapperProxy.invoke (mapperproxy.java:52)
At Com.sun.proxy. $Proxy 3.updatedUser (Unknown Source)
At Cn.itcast.mybatis.mapper.UserMapperTest.testUpdatedUser (usermappertest.java:60)
At Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
At Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:57)
At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:43)
At Java.lang.reflect.Method.invoke (method.java:606)
At Org.junit.runners.model.frameworkmethod$1.runreflectivecall (frameworkmethod.java:45)
At Org.junit.internal.runners.model.ReflectiveCallable.run (reflectivecallable.java:15)
At org.junit.runners.model.FrameworkMethod.invokeExplosively (frameworkmethod.java:42)
At Org.junit.internal.runners.statements.InvokeMethod.evaluate (invokemethod.java:20)
At Org.junit.internal.runners.statements.RunBefores.evaluate (runbefores.java:28)
At Org.junit.runners.ParentRunner.runLeaf (parentrunner.java:263)
At Org.junit.runners.BlockJUnit4ClassRunner.runChild (blockjunit4classrunner.java:68)
At Org.junit.runners.BlockJUnit4ClassRunner.runChild (blockjunit4classrunner.java:47)
At Org.junit.runners.parentrunner$3.run (parentrunner.java:231)
At Org.junit.runners.parentrunner$1.schedule (parentrunner.java:60)
At Org.junit.runners.ParentRunner.runChildren (parentrunner.java:229)
At org.junit.runners.parentrunner.access$000 (parentrunner.java:50)
At Org.junit.runners.parentrunner$2.evaluate (parentrunner.java:222)
At Org.junit.runners.ParentRunner.run (parentrunner.java:300)
At Org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run (junit4testreference.java:86)
At Org.eclipse.jdt.internal.junit.runner.TestExecution.run (testexecution.java:38)
At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (remotetestrunner.java:459)
At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (remotetestrunner.java:678)
At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run (remotetestrunner.java:382)
At Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main (remotetestrunner.java:192)
Caused By:org.apache.ibatis.reflection.ReflectionException:There is no getter for property named ' Usename ' in ' class CN. Itcast.mybatis.pojo.User '
At Org.apache.ibatis.reflection.Reflector.getGetInvoker (reflector.java:380)
At Org.apache.ibatis.reflection.MetaClass.getGetInvoker (metaclass.java:170)
At Org.apache.ibatis.reflection.wrapper.BeanWrapper.getBeanProperty (beanwrapper.java:152)
At Org.apache.ibatis.reflection.wrapper.BeanWrapper.get (beanwrapper.java:48)
At Org.apache.ibatis.reflection.MetaObject.getValue (metaobject.java:116)
At Org.apache.ibatis.scripting.defaults.DefaultParameterHandler.setParameters (defaultparameterhandler.java:76)
At Org.apache.ibatis.executor.statement.PreparedStatementHandler.parameterize (preparedstatementhandler.java:80)
At Org.apache.ibatis.executor.statement.RoutingStatementHandler.parameterize (routingstatementhandler.java:61)
At Org.apache.ibatis.executor.SimpleExecutor.prepareStatement (simpleexecutor.java:74)
At Org.apache.ibatis.executor.SimpleExecutor.doUpdate (simpleexecutor.java:47)
At Org.apache.ibatis.executor.BaseExecutor.update (baseexecutor.java:105)
At Org.apache.ibatis.executor.CachingExecutor.update (cachingexecutor.java:71)
At Org.apache.ibatis.session.defaults.DefaultSqlSession.update (defaultsqlsession.java:152)
... More
Username in SQL is written as Usename and entity class properties are not

There is no getter for property named ' Usename ' in ' Class Cn.itcast.mybatis.pojo.User '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.