myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fraley, Taylor" <>
Subject Very strange problem: conversion error
Date Tue, 14 Nov 2006 21:42:27 GMT
So I'm having a very strange problem.  I have a jsp that's using a
h:selectOneMenu populated by an ArrayList within a bean, which is all
pretty standard.  In one environment, on my desktop PC running Tomcat
5.5, everything works fine.  On my SPARC running the same version of
Tomcat, configured, from what I can tell, identically, I get the
following exception when loading the page:

org.apache.jasper.JasperException: org.apache.jasper.JasperException:
javax.servlet.jsp.JspException: "{2}" Conversion Error setting value
''{0}'' for ''{1}''. 

I've done some poking around on Google, but haven't found anything
terribly useful.  The two possible explanations I've found (getter for
the ArrayList returning null and a mistype of the managed bean name in
the jsp vs. the faces-config.xml) both don't seem to apply here.  Here
are the relevant snippets of code:

...from faces-config.xml...


...from the TransactionReportBean...

   public TransactionReportBean()
      availableTimes.add(new SelectItem("0", "12:00 AM"));
      availableTimes.add(new SelectItem("1", "01:00 AM"));
      availableTimes.add(new SelectItem("2", "02:00 AM"));
      availableTimes.add(new SelectItem("3", "03:00 AM"));
      availableTimes.add(new SelectItem("4", "04:00 AM"));
      availableTimes.add(new SelectItem("5", "05:00 AM"));
      availableTimes.add(new SelectItem("6", "06:00 AM"));
      availableTimes.add(new SelectItem("7", "07:00 AM"));
      availableTimes.add(new SelectItem("8", "08:00 AM"));
      availableTimes.add(new SelectItem("9", "09:00 AM"));
      availableTimes.add(new SelectItem("10", "10:00 AM"));
      availableTimes.add(new SelectItem("11", "11:00 AM"));
      availableTimes.add(new SelectItem("12", "12:00 PM"));
      availableTimes.add(new SelectItem("13", "01:00 PM"));
      availableTimes.add(new SelectItem("14", "02:00 PM"));
      availableTimes.add(new SelectItem("15", "03:00 PM"));
      availableTimes.add(new SelectItem("16", "04:00 PM"));
      availableTimes.add(new SelectItem("17", "05:00 PM"));
      availableTimes.add(new SelectItem("18", "06:00 PM"));
      availableTimes.add(new SelectItem("19", "07:00 PM"));
      availableTimes.add(new SelectItem("20", "08:00 PM"));
      availableTimes.add(new SelectItem("21", "09:00 PM"));
      availableTimes.add(new SelectItem("22", "10:00 PM"));
      availableTimes.add(new SelectItem("23", "11:00 PM"));

   public ArrayList<SelectItem> getAvailableCnamOptions()
	   return availableCnamOptions;

...from the jsp...

<h:selectOneMenu id="beginHour"
value="#{TransactionReportBean.beginHour}" styleClass="rptSmallInputs">
	<f:selectItems value="#{TransactionReportBean.availableTimes}"/>


Judging by all the hits on Google, it seems to be a pretty common
problem, but I'm sort of stumped on what to do next to figure out the
problem.  Has anyone seen this?  Any pointers?


View raw message