Hi
i am stuck with this error from past 2 hrs. can any body tell me what i
am doing wrong here
i am writing the following code to use with struts
con = CxcSvcLoc.getInstance().getCxcDataSource().getConnection();
stmt = con.createStatement();
rs = stmt.executeQuery("select ivtransbatchid from ivtranshdr");
ResultSetDynaClass rsdc = new ResultSetDynaClass(rs);
BasicDynaClass bdc = new BasicDynaClass("foo",
BasicDynaBean.class, rsdc.getDynaProperties());
Iterator rows = rsdc.iterator();
while (rows.hasNext()) {
DynaBean row = (DynaBean) rows.next();
DynaBean newRow = bdc.newInstance();
PropertyUtils.copyProperties(newRow, row);
results.add(row);
}
the above code is giving the error msg like this , the batchid that i am
seleting from database is of type Integer.
org.apache.commons.beanutils.ConversionException: Cannot assign value of
type 'java.lang.Integer' to property 'ivtransbatchid' of type
'java.lang.Long'
at
org.apache.commons.beanutils.BasicDynaBean.set(BasicDynaBean.java:319)
at
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1636)
at
org.apache.commons.beanutils.PropertyUtils.copyProperties(PropertyUtils.java:270)
at
com.justcommodity.cxc.jsp.inventory.formbeans.IvTransHdrBean.getBatchidlist(IvTransHdrBean.java:102)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:1167)
at
org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:754)
at
org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:783)
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:728)
at
org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:303)
at
org.apache.jsp.inventory_0005ftrans_0005flist$jsp._jspService(inventory_0005ftrans_0005flist$jsp.java:94)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
at
org.apache.struts.actions.ForwardAction.execute(ForwardAction.java:158)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:536)
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>