File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Bean creation Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Bean creation Exception" Watch "Bean creation Exception" New topic
Author

Bean creation Exception

Ranganath Junpal
Ranch Hand

Joined: Aug 31, 2006
Posts: 76
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
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

This is an iBatis issue, not a Spring issue. So I am moving it to our ORM forum.


GenRocket - Experts at Building Test Data
 
Don't get me started about those stupid light bulbs.
 
subject: Bean creation Exception