ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yusuf" <Yu...@ekalife.co.id>
Subject Exception net.sf.cglib.beans.BulkBeanException on resultMap with selects
Date Mon, 15 May 2006 02:54:53 GMT
Hi, I have a sqlMap like this 

<sqlMap namespace="eb.proposal">

	<resultMap id="selectPlanProposal.result" class="planProposal">
		<result property="mpps_no" column="mpps_no"
javaType="string" jdbcType="CHAR" nullValue=""/>

		<result property="lsbs_id" column="lsbs_id"
javaType="int" jdbcType="NUMBER" />

		<result property="lsdbs_number" column="lsdbs_number"
javaType="int" jdbcType="NUMBER" />

		<result property="flag_guna" column="{mpps_no=mpps_no,
lsbs_id=lsbs_id, lsdbs_number=lsdbs_number}" javaType="int"
nullValue="0" select="eb.proposal.selectGunaBenefit"/>
	</resultMap>
	
	<select id="selectGunaBenefit" resultClass="int">
		SELECT ... 
		  FROM eka.mst_proposal_benefit a
		 WHERE mpps_no = replace(#mpps_no#,'.','')
		   AND lsbs_id = #lsbs_id#
		   AND lsdbs_number = #lsdbs_number#
	</select>
	
	
	<select id="selectPlanProposal" parameterClass="hashMap"
resultMap="selectPlanProposal.result">
		select ... from eka.mst_plan_proposal
	</select>	

</sqlMap>

and the resultClass like this : 

	public class PlanProposal implements Serializable {
		private String mpps_no;
		private Integer lsbs_id;
		private Integer mpp_gol;
		private Integer ltp_kode_before;
		private Integer lsdbs_number_before;
		private Integer ltp_kode;
		private Integer lsdbs_number;
		private Integer lpv_kode;
		private Integer msp_ganti;
		private Integer msp_turun_limit;
		private Integer msp_rujukan;
		private String lpv_desc;
		private String rujukan;
		private String update_flag;
		private Integer msp_aktif;         
		private String lsdbs_lama_bayar;
		private Integer flag_guna;
		// .. getter setter..
	}
	
before I add this last column in the resultMap (the one with the select
query) : 

		<result property="flag_guna" column="{mpps_no=mpps_no,
lsbs_id=lsbs_id, lsdbs_number=lsdbs_number}" javaType="int"
nullValue="0" select="eb.proposal.selectGunaBenefit"/>

the query was working, but after I add that, an exception occured : 

org.springframework.jdbc.UncategorizedSQLException: SqlMapClient
operation; uncategorized SQLException for SQL []; SQL state [null];
error code [0];   
--- The error occurred in com/ekalife/eb/dao/sql/proposal/select.xml.  
--- The error occurred while applying a result map.  
--- Check the selectPlanProposal.result.  
--- The error happened while setting a property on the result object.  
--- Cause: net.sf.cglib.beans.BulkBeanException; nested exception is
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in com/ekalife/eb/dao/sql/proposal/select.xml.  
--- The error occurred while applying a result map.  
--- Check the selectPlanProposal.result.  
--- The error happened while setting a property on the result object.  
--- Cause: net.sf.cglib.beans.BulkBeanException
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in com/ekalife/eb/dao/sql/proposal/select.xml.  
--- The error occurred while applying a result map.  
--- Check the selectPlanProposal.result.  
--- The error happened while setting a property on the result object.  
--- Cause: net.sf.cglib.beans.BulkBeanException
Caused by: net.sf.cglib.beans.BulkBeanException
	at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQuery
WithCallback(GeneralStatement.java:184)
	at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQuery
ForList(GeneralStatement.java:119)
	at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMap
ExecutorDelegate.java:610)
	at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMap
ExecutorDelegate.java:584)
	at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessi
onImpl.java:105)
	at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClient
Impl.java:77)
	at
org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(S
qlMapClientTemplate.java:245)
	at
org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClient
Template.java:165)
	at
org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResul
t(SqlMapClientTemplate.java:204)
	at
org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapC
lientTemplate.java:243)
	at com.ekalife.eb.dao.BaseDao.query(BaseDao.java:25)
	at
com.ekalife.eb.dao.ProposalDao.selectPlanProposal(ProposalDao.java:250)
	at
com.ekalife.eb.service.EbManager.selectPlanProposal(EbManager.java:96)
	at
com.ekalife.eb.service.EbManager$$FastClassByCGLIB$$aec9520a.invoke(<gen
erated>)
	at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
	at
org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.i
nvokeJoinpoint(Cglib2AopProxy.java:698)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Ref
lectiveMethodInvocation.java:122)
	at
org.springframework.transaction.interceptor.TransactionInterceptor.invok
e(TransactionInterceptor.java:96)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Ref
lectiveMethodInvocation.java:144)
	at
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedIntercept
or.intercept(Cglib2AopProxy.java:643)
	at
com.ekalife.eb.service.EbManager$$EnhancerByCGLIB$$3111cbcf.selectPlanPr
oposal(<generated>)
	at
com.ekalife.eb.web.proposal.InputManfaatAsuransi.onBind(InputManfaatAsur
ansi.java:89)
	at
org.springframework.web.servlet.mvc.BaseCommandController.bindAndValidat
e(BaseCommandController.java:306)
	at
org.springframework.web.servlet.mvc.AbstractFormController.handleRequest
Internal(AbstractFormController.java:255)
	at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(Abs
tractController.java:139)
	at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handl
e(SimpleControllerHandlerAdapter.java:44)
	at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherS
ervlet.java:684)
	at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherSe
rvlet.java:625)
	at
org.springframework.web.servlet.FrameworkServlet.processRequest(Framewor
kServlet.java:392)
	at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet
.java:357)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
	at
org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFi
lter.java:125)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:214)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
	at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon
textValve.java:198)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:152)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:137)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:118)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:102)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
	at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:79
9)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:705)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57
7)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)
	at java.lang.Thread.run(Thread.java:534)
Caused by: net.sf.cglib.beans.BulkBeanException
	at
com.ekalife.eb.model.PlanProposal$$BulkBeanByCGLIB$$f213aa8c.setProperty
Values(<generated>)
	at
com.ibatis.sqlmap.engine.accessplan.EnhancedPropertyAccessPlan.setProper
ties(EnhancedPropertyAccessPlan.java:33)
	at
com.ibatis.sqlmap.engine.exchange.JavaBeanDataExchange.setData(JavaBeanD
ataExchange.java:112)
	at
com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.setResultObjectVa
lues(BasicResultMap.java:325)
	at
com.ibatis.sqlmap.engine.mapping.statement.RowHandlerCallback.handleResu
ltObject(RowHandlerCallback.java:63)
	at
com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor
.java:364)
	at
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.
java:184)
	at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQu
ery(GeneralStatement.java:201)
	at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQuery
WithCallback(GeneralStatement.java:169)
	... 58 more
Caused by: java.lang.ClassCastException
	... 67 more

i've double checked the result class, the sql mappings, and also in log,
i've seen the inner select already called the result is shown too, 
is there anyone who knows the solution to this problem? 

thank you,
Yusuf.


Mime
View raw message