关于“no moudle named xxx”的错误解决方法。

展开阅读全文

mybatis 报错 There is no getter for property named 'xxx' in 'xxx'

04-12

[code=text]Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'is_partner' in 'class com.xfj.base.bossapp.domain.SellerAgent'rn at org.apache.ibatis.reflection.Reflector.getGetInvoker(Reflector.java:333)rn at org.apache.ibatis.reflection.MetaClass.getGetInvoker(MetaClass.java:160)rn at org.apache.ibatis.reflection.wrapper.BeanWrapper.getBeanProperty(BeanWrapper.java:151)rn at org.apache.ibatis.reflection.wrapper.BeanWrapper.get(BeanWrapper.java:44)rn at org.apache.ibatis.reflection.MetaObject.getValue(MetaObject.java:123)rn at org.apache.ibatis.builder.xml.dynamic.DynamicContext$ContextMap.get(DynamicContext.java:89)rn at org.apache.ibatis.builder.xml.dynamic.DynamicContext$ContextAccessor.getProperty(DynamicContext.java:107)rn at org.apache.ibatis.ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1657)rn at org.apache.ibatis.ognl.ASTProperty.getValueBody(ASTProperty.java:92)rn at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)rn at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:210)rn at org.apache.ibatis.ognl.ASTNotEq.getValueBody(ASTNotEq.java:49)rn at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)rn at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:210)rn at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:333)rn at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:413)rn at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:395)rn at org.apache.ibatis.builder.xml.dynamic.OgnlCache.getValue(OgnlCache.java:42)rn at org.apache.ibatis.builder.xml.dynamic.ExpressionEvaluator.evaluateBoolean(ExpressionEvaluator.java:32)rn at org.apache.ibatis.builder.xml.dynamic.IfSqlNode.apply(IfSqlNode.java:30)rn at org.apache.ibatis.builder.xml.dynamic.MixedSqlNode.apply(MixedSqlNode.java:29)rn at org.apache.ibatis.builder.xml.dynamic.TrimSqlNode.apply(TrimSqlNode.java:42)rn at org.apache.ibatis.builder.xml.dynamic.MixedSqlNode.apply(MixedSqlNode.java:29)rn at org.apache.ibatis.builder.xml.dynamic.DynamicSqlSource.getBoundSql(DynamicSqlSource.java:37)rn at org.apache.ibatis.mapping.MappedStatement.getBoundSql(MappedStatement.java:241)rn at org.apache.ibatis.executor.statement.BaseStatementHandler.(BaseStatementHandler.java:61)rn at org.apache.ibatis.executor.statement.PreparedStatementHandler.(PreparedStatementHandler.java:36)rn at org.apache.ibatis.executor.statement.RoutingStatementHandler.(RoutingStatementHandler.java:42)rn at org.apache.ibatis.session.Configuration.newStatementHandler(Configuration.java:348)rn at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:43)rn at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:108)rn at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:75)rn at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:145)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:606)rn at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:355)rn ... 176 more[/code]rnrn找了好久都找不到什么问题,用的方法是用工具生成的update方法 论坛

【mybatis】There is no setter for property named xxx

06-19

异常详细信息如下,报错的位置是User类的uId属性的setter方法,可是我很确定setter方法没问题。更加诡异的是如果我把uId的getter和setter方法全删掉,再写一遍,然后重新部署,竟然没问题了。然后等我再用一会,重启了几次后,这个异常 又会蹦出来。大神们有什么想法,快被这个问题整吐了。rn另我一个同时说是Driver和User对应的两张表的主键名称相同(都是u_id)造成的,driver表外键引用user表rn[code=java]rnorg.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'uId' in 'class com.yuedao.car.entity.User'rn at org.apache.ibatis.reflection.Reflector.getSetInvoker(Reflector.java:372)rn at org.apache.ibatis.reflection.MetaClass.getSetInvoker(MetaClass.java:174)rn at org.apache.ibatis.reflection.wrapper.BeanWrapper.setBeanProperty(BeanWrapper.java:167)rn at org.apache.ibatis.reflection.wrapper.BeanWrapper.set(BeanWrapper.java:57)rn at org.apache.ibatis.reflection.MetaObject.setValue(MetaObject.java:133)rn at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.applyPropertyMappings(DefaultResultSetHandler.java:368)rn at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getRowValue(DefaultResultSetHandler.java:745)rn at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValuesForNestedResultMap(DefaultResultSetHandler.java:713)rn at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValues(DefaultResultSetHandler.java:264)rn at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSet(DefaultResultSetHandler.java:236)rn at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSets(DefaultResultSetHandler.java:150)rn at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:60)rn at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:73)rn at org.apache.ibatis.executor.ReuseExecutor.doQuery(ReuseExecutor.java:57)rn at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)rn at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137)rn at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:120)rn at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)rn at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358)rn at $Proxy12.selectList(Unknown Source)rn at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:198)rn at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:119)rn at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63)rn at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)rn at $Proxy58.selectUsersOfPage(Unknown Source)rn at com.yuedao.car.service.impl.UserServiceImpl.getUserList(UserServiceImpl.java:24)rn at com.yuedao.car.controller.UserController.list(UserController.java:42)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)rn at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)rn at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)rn at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)rn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)rn at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)rn at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)rn at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn at java.lang.Thread.run(Thread.java:619)rn[/code]rn 论坛

no module named 错误是怎么回事

06-30

rnrn百度试了很多方法还是不行。。rnrnwxbot的源码rnrnimage模块也装了。rnrn[code=python]#!/usr/bin/env pythonrn# coding: utf-8rnrnfrom wxbot import *rnrnrnclass MyWXBot(WXBot):rn def handle_msg_all(self, msg):rn if msg['msg_type_id'] == 4 and msg['content']['type'] == 0:rn self.send_msg_by_uid(u'hi', msg['user']['id'])rn'''rn def schedule(self):rn self.send_msg(u'张三', u'测试')rn time.sleep(1)rn'''rnrnrndef main():rn bot = MyWXBot()rn bot.DEBUG = Truern bot.conf['qr'] = 'png'rn bot.run()rnrnrnif __name__ == '__main__':rn main()[/code]rnrnrnrn需要的库也装了 就是不行rnrn[code=python]Traceback (most recent call last):rn File "C:\Users\Administrator\Desktop\微信机器人\wxBot-master\wxBot-master\test.py", line 26, in rn main()rn File "C:\Users\Administrator\Desktop\微信机器人\wxBot-master\wxBot-master\test.py", line 22, in mainrn bot.run()rn File "C:\Users\Administrator\Desktop\微信机器人\wxBot-master\wxBot-master\wxbot.py", line 709, in runrn self.gen_qr_code('qr.png')rn File "C:\Users\Administrator\Desktop\微信机器人\wxBot-master\wxBot-master\wxbot.py", line 757, in gen_qr_codern qr.png(qr_file_path, scale=8)rn File "build\bdist.win32\egg\pyqrcode\__init__.py", line 463, in pngrn module_color, background, quiet_zone)rn File "build\bdist.win32\egg\pyqrcode\builder.py", line 1266, in _pngrn import pngrnImportError: No module named png[/code]rnrnrn[img=https://img-bbs.csdn.net/upload/201606/30/1467270757_544633.png][/img]rn 论坛

关于....No module named urls

12-05

1,向你的模型添加admin metadatarn并不是所有的模型都可以或者应该被admin用户编辑,所以你需要标记那些需要管理界面的模型rn上一章的Book模型添加一个管理界面的方法就是:rnJava代码 复制代码rnrn 1. class Book(models.Model): rn 2. title = models.CharField(maxlength=100) rn 3. authors = models.ManyToManyField(Author) rn 4. publisher = models.ForeignKey(Publisher) rn 5. publication_date = models.DateField() rn 6. rn 7. class Admin: rn 8. pass rnrnclass Book(models.Model):rn title = models.CharField(maxlength=100)rn authors = models.ManyToManyField(Author)rn publisher = models.ForeignKey(Publisher)rn publication_date = models.DateField()rnrn class Admin:rn passrnrnrnAdmin声明标记这个类拥有一个管理界面,在Admin之下你可以配置许多选项rn目前我们采用默认值,所以我们使用pass来表示Admin类是空的rn如果你正在按这个例子写自己的代码,现在给Publisher和Author类添加Admin声明是个好主意rn2,安装admin模型,简单的把"django.contrib.admin"添加到你的INSTALLED_APPS设置里rn然后运行python manage.py syncdb来安装admin使用的额外的表rn注意,在你第一次运行syncdb时,你很可能被问起是否创建一个superuserrn如果那时你没有创建superuser,你需要运行djang/contrib/auth/bin/create_superuser.pyrn来创建一个admin用户,否则你就不能登录到管理界面里去rn3,把URL模式添加到urls.py,如果仍在使用startproject创建的工程,admin的URL模式可能rn已经在那儿了,但是被注释掉了,你的URL模式应该像这样:rnJava代码 复制代码rnrn 1. from django.conf.urls.defaults import * rn 2. rn 3. urlpatterns = patterns('', rn 4. (r'^admin/', include('django.contrib.admin.urls')), rn 5. ) rnrnfrom django.conf.urls.defaults import *rnrnurlpatterns = patterns('',rn (r'^admin/', include('django.contrib.admin.urls')),rn)rnrnrn就这样,现在运行python manage.py runserver来启动服务器,你将看到如下信息:rnValidating models...rn0 errors found.rnrnDjango version 0.96-pre, using settings 'mysite.settings'rnDevelopment server is running at http://127.0.0.1:8000/rnQuit the server with CONTROL-C. rnrn但当我进入http://127.0.0.1:8000/admin/时。。。。就会出现rnrnImportError at /admin/rnrnNo module named urlsrnrn错误。。。怎么解决呢。。。请各位高手帮帮忙吧!rnrn我看到在我的django.contrib.admin 目录下没有urls.py文件啊! 论坛

关于java.lang.NullPointerException 这个错误解决方法

05-30

java.lang.NullPointerException java.lang.NullPointerException at org.apache.jsp.login_jsp._jspService(org.apache.jsp.login_jsp:65) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Unknown Source) 论坛

没有更多推荐了,返回首页