java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.x
我在action中配置了service(接口)用service调用loginIn方法,service被serviceImpl实现,serviceImpl中配置了Users...
我在 action 中配置了 service (接口) 用service 调用 loginIn方法,service 被serviceImpl 实现,serviceImpl 中 配置了UsersDAO (接口),UsersMapper.xml 中namespace指向UsersDAO
,这样配置对吗?Spring struts2 Mybatis 架构 Eclipse 开发,Tomcat7报错是在网页上,并不是在Eclipse里
java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.xianlikeji.service.LoginService.loginIn
org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:672)
org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:507)
org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:500)
org.apache.ibatis.binding.MapperMethod.setupCommandType(MapperMethod.java:240)
org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:71)
org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:39)
$Proxy11.loginIn(Unknown Source)
com.xianlikeji.action.LoginAction.execute(LoginAction.java:53)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept 展开
,这样配置对吗?Spring struts2 Mybatis 架构 Eclipse 开发,Tomcat7报错是在网页上,并不是在Eclipse里
java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.xianlikeji.service.LoginService.loginIn
org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:672)
org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:507)
org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:500)
org.apache.ibatis.binding.MapperMethod.setupCommandType(MapperMethod.java:240)
org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:71)
org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:39)
$Proxy11.loginIn(Unknown Source)
com.xianlikeji.action.LoginAction.execute(LoginAction.java:53)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept 展开
展开全部
com.xianlikeji.service.LoginService.loginIn
是不是配置错误。 应该是com.xianlikeji.service.serviceImpl.loginIn
是不是配置错误。 应该是com.xianlikeji.service.serviceImpl.loginIn
追问
我没有在spring.xml中配置映射关系,都是使用的@Autowired注入的,serviceImpl仅实现了service接口,其他地方没有用到,action中注入的是service接口,serviceImpl注入的是UsersDAO接口,UsersMapper.xml 中指向UsersDAO接口
追答
UsersMapper.xml这个配置文件里面的com.xianlikeji.service.LoginService.loginIn
这个地址仔细对照一下是否正确!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
com.xianlikeji.action.LoginAction.execute(LoginAction.java:53定位到这句话查看出错信息
更多追问追答
追问
if(loginService.loginIn(user)){
就是这代码吗?这是execute方法中的一句代码,返回true 则return SUCCESS 否则return INPUT
追答
user有set get方法吗?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-09-26
展开全部
应该是你的UsersMapper.xml少一句 <typeAlias alias="******" type="com.xianlikeji.service.LoginService.loginIn" />
追问
这不是mybatis.xml中的吗??我写了啊
追答
方便的话,你把你的工程发给我,xiang.19880429@163.com
你导入工程试一下,我给你发回去了,主要修改了spring.xml,有问题再联系
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询