10g (10.1.3.1.0). When I launched my application to check the menus, I was greeted with the infamous 500 Internal Server Error. The exception was:
javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.FacesException: Error performing conversion of value 'oracle.adf.view.faces.model.ChildPropertyTreeModel@e38fae' of type 'class oracle.adf.view.faces.model.ChildPropertyTreeModel' to type 'class my.MenuTreeModelAdapter' for managed bean 'menuModel'
.I looked through the whole stack trace for clues, but only the exception message had any glimmer of meaning. I looked at my Java classes and everything looked fine there, too. I poked through all the managed beans holding the pieces of the menu, but nothing jumped out at me.
So I went step by step through the article, comparing its XML and Java code to mine. I had everything in my components the article said to include. After about the fifth iteration of this, I finally started looking at things from a different viewpoint: what was in my code that wasn't in theirs?
Aha! I added a little too much information to one my
menuModelAdapter
beans. I specified the Java class for the instance property. The bean was supposed to return a ChildPropertyMenuModel
object (injected as #{menuTreeModel.model}
) and store it in the instance property of the menuModelAdapter
object. I mistakenly entered the class as my menuTreeModelAdapter
, telling the Faces servlet to convert it, instead of leaving it empty.I removed the erroneously entered class, leaving the class unspecified, and it resolved my problem. Sometimes it pays to take a moment and look at things from another perspective.
Dear Eaglehouse,
ReplyDeleteI am a software engineer , we are doing the development with J2EE , JSF . Currently we face a problem , when our application is deployed on Sun Solaris , we get an Internal server error when click a CommandLink , we have used log4j for logging and added debug message at every line of code but no exception is written to the log file . can you suggest any possible reasons for this exception .
The same commandlink with the same actionlistener works fine on another screen.
Looking forward for your reply.