This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
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

Bean creation Exception

 
Ranganath Junpal
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI all,

I am getting this exception at the runtime. i am working on spring+ibatis.
================================================== ===
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sqlMapClient' defined in ServletContext resource [/WEB-INF/f1App-servlet.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: 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/resultMap'. Cause: java.lang.RuntimeException: Error configuring Result. Could not set ResultClass. Cause: java.lang.ClassNotFoundException: com.cons.f1.Beans.Login
================================================== =====
I understand that its not able to find the Login bean. But i am not able to understand why its not finding it. I am able to see the class file in this path. Please let me know what might be wrong with it.

=============================================
mys sql-map-config.xml
=============================================
<sqlMapConfig>

<sqlMap resource="com/cons/f1/persistence/sqlmapdao/sql/login.xml"/>
<sqlMap resource="com/cons/f1/persistence/sqlmapdao/sql/RaceDetails.xml"/>

</sqlMapConfig>
============================================
login.xml
============================================
<sqlMap namespace="login">
<resultMap id="loginResult" class="com.cons.f1.Beans.Login">
<result property="uName" column="userName"/>
<result property="uPass" column="passwd"/>
<result property="role" column="role"/>
<result property="status" column="status"/>
<result property="email" column="EmailID"/>
<result property="rName" column="RealName"/>
</resultMap>

<insert id="insert">
insert into
f1_login(userName,passwd,role,status,EmailID,RealN ame)
values
(#uName#, #uPass#, #role#, #status#,#email#,#rName#)
</insert>
<select id="getLoginCredentials">
select
userName,
passwd,
role,
from
f1_login
</select>
<select id="getFullLoginData">
select * from f1_login
</select>
</sqlMap>
==================================================
Thank you
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is an iBatis issue, not a Spring issue. So I am moving it to our ORM forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic