Java Bean not found
March 20th, 2009
Applies to:
NA
Description:
A common problem which occurs when the class loader cannot find beans that the pages reference.That usually results in an error message like “Class xxx cannot be resolved to a type”
Cause:
The class loader could not find beans that the pages referenced.
Here are a few things to check:
1. Make sure that your beans are compiled properly and that the resulting class file is resident in the hierarchy rooted at the WEB-INF/classes folder.
2. Be sure that WEB-INF is spelled just that way — case counts! web-inf, Web-Inf, or any other casing variation will not work.
3. Always place your bean classes in a package other than the unnamed default package.
4. Be sure that the fully-qualified class name (including the package) is included in your useBean declaration.
5. Make sure your class contains the ‘public’ modifier.
6. If all else fails, carefully check the spelling. Typos in class names and packages are easier to make (and harder to find) than you would think.