You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Sergio <se...@strategos.com.br> on 2008/07/10 21:30:28 UTC
Difference running web application on Debian and Windows XP
Hi,
This will look like another common "Value is no String", but please read
below what is happening. I get the following error when I publish my web
application to debian server running apache-tomcat-5.5.17:
java.lang.IllegalArgumentException: Value is no String
(class=java.lang.Integer, value=4) and component _idJsp46:smUnidadewith
path: {Component-Path : [Class:
org.ajax4jsf.framework.ajax.AjaxViewRoot,ViewId:
/sjij/login/login.jsp][Class:
br.com.strategos.faces.html.component.UIPage,Id: _idJsp0][Class:
br.com.strategos.faces.navytheme.UILayout,Id: _idJsp1][Class:
br.com.strategos.faces.html.component.UILayoutItem,Id: _idJsp45][Class:
br.com.strategos.faces.html.component.UIForm,Id: _idJsp46][Class:
br.com.strategos.faces.html.component.UICell,Id: _idJsp52][Class:
br.com.strategos.faces.html.component.UISelectOneMenu,Id: smUnidade]}
does not have a Converter
I get no error when using Netbeans 5.5 on Windows XP Pro SP2 using the
bundle Apache-Tomcat 5.5.17. The project was recently broke into smaller
projects and that was when the error started to happen. I also tried
Tomcat versions 5.5.26 and 6.0.16 on both computers (with debian and
win.xp) and I get the same error on debian and but no error on windows
computer. Currently I'm using tomahawk 1.1.6 and myfaces 1.1.5. Already
tried things like full rebuild of the project, different versions of
several libraries and checking the file encoding for my jsp files. Here
are sample code from my java class:
private void loadUsuarioUnidades(){
this.listUnidades = new ArrayList<SelectItem>();
for(SisUsuarioUnidade sisUsuarioUnidade : getUsuario().getUnidades()){
setUnidade(sisUsuarioUnidade.getUnidade());
getListUnidades().add(new
SelectItem(getUnidade().getSeqUnidade().getValue(),
getUnidade().getDesUnidade().getValue()));
}
if(getListUnidades().size() > 0){
sortUnidades();
}
}
And this is a sample from a JSP file:
<sh:selectOneMenu cols="2" label="#{msgs.UnidadeLabel}"
value="#{basewebAcessoLogin.unidade.seqUnidade.value}"
disabled="#{basewebAcessoLogin.notLogged}" >
<sf:selectItems value="#{basewebAcessoLogin.listUnidades}" />
</sh:selectOneMenu>
I know someone will say: "Add a converter!". The problem is: this was
not happening before and right now I have a huge enterprise application
with about 230 web pages (some pages contains at least 1 combo box, some
has like 4 or more combo boxes). Actually I already tried to add a
converter to test on one of my web pages and the page started to work
again on my debian server.
To make it more weird, this error does not happen on all combo boxes I
use. And here is something to make even more weird I have one page with
4 combo boxes on 2 different tabs (tabPanels) in a form a State/city
dependency. When I select a state it loads the cities for that
state...pretty simple huh? It goes fine on the first tab, but the second
tab which loads the exact same data I get the IllegalArgument exception.
The order on which I click, first tab or second tab, doesn't matter. The
second tab always gives me the error.
Thanks in advance,
Sérgio