Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A login application using Struts2 + iBatis

 
Stan Pak
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm making an Action Class to check validation of the values that were input in login page(JSP).
But my Web Application just shows me errors.
Let me show you the codes and an error with details.

login.jsp (doesn't have any problem)



Login.java (This is the 'doLogin' Action)


This Action is to return success in case that the values from JSP page(login.jsp) is valid.


accountSQL.xml (This is the XML file to set the select statement for the action process.)



accountBean.java



In this situation, I ran this application but it just spat the following error out.

Unable to instantiate Action, login.Login, defined for 'doLogin' in namespace '/'Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: There is no result map named account.tradeMCRes in this SqlMap.
com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:307)
com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:388)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:187)
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:47)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:478)


org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)


Let me know what the problem is and how to solve the problem. Thank you.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm no iBatis whiz (yet), but it looks to me like you're trying to select a single value into a class that doesn't have that property.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Locking your original thread.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic