wood burning stoves*
The moose likes Object Relational Mapping and the fly likes A login application using Struts2 + iBatis Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "A login application using Struts2 + iBatis" Watch "A login application using Struts2 + iBatis" New topic
Author

A login application using Struts2 + iBatis

Stan Pak
Greenhorn

Joined: Feb 11, 2010
Posts: 9
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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Sep 29, 2008
Posts: 12617

Locking your original thread.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A login application using Struts2 + iBatis
 
Similar Threads
Populate the array
Setting up a database connection with Struts 2 and Tomcat 6.0
Struts2 with Display tag issue
something about iBatis.
Hibernate