Hi,
I'm trying to use the dbutils, in particular I'd like to populate LabelValueBeans. I'm using the example from the website, but I get the following exception:
Cannot create org.apache.struts.util.LabelValueBean: org.apache.struts.util.LabelValueBean


I've tried individual LabelValueBeans and ArrayLists of them.

I've included the code and log snippets. There is so little code here, that I just can't imagine what the problem is.

Thanks!
-Joe


QueryRunner run = new QueryRunner(ds);


//ResultSetHandler rsh = new BeanListHandler(LabelValueBean.class);

ResultSetHandler rsh = new BeanHandler(LabelValueBean.class);

try {

//list = (ArrayList) run.query(sql,crit,rsh);

LabelValueBean lvb = (LabelValueBean) run.query(sql,crit,rsh);

} catch (SQLException e) {
log.error( "LV - resultset error with query: " + sql + " with msg: " + e.getMessage());
e.printStackTrace();
} catch (Exception e) {
log.error( "LV - resultset error with query: " + sql + " with msg: " + e.getMessage());
e.printStackTrace();
}
if(loginfo==1){log.info("PV leaving getLVList");}
return list;




[ERROR] NMISBean - -LV - resultset error with query: SELECT system_pk value,name label from ts3_systems_t WHERE office_fk=? and de
leted<>'True' with msg: Cannot create org.apache.struts.util.LabelValueBean: org.apache.struts.util.LabelValueBean Query: SELECT sy
stem_pk value,name label from ts3_systems_t WHERE office_fk=? and deleted<>'True' Parameters: [201223]
java.sql.SQLException: Cannot create org.apache.struts.util.LabelValueBean: org.apache.struts.util.LabelValueBean Query: SELECT sys
tem_pk value,name label from ts3_systems_t WHERE office_fk=? and deleted<>'True' Parameters: [201223]
at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:330)
at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:213)
at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:279)
at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:255)
at net.nocmanage.coreserver.beans.NMISBean.getLVList(NMISBean.java:3056)



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to