server CANNOT find annotation'@ManagedBean' when the classes are in the WEB-INF\lib\*.jar package -------------------------------------------------------------------------------------------------
Key: GERONIMO-5817 URL: https://issues.apache.org/jira/browse/GERONIMO-5817 Project: Geronimo Issue Type: Bug Security Level: public (Regular issues) Components: myfaces Affects Versions: 3.0 Environment: Windows 7 32-bit OS Reporter: LiWenQin Fix For: 3.0 The exception in javaee6-testsuite\jsf2.0-test is reported on https://issues.apache.org/jira/browse/GERONIMO-5796. LOG INFO in GERONIMO-5796: 2011-01-29 16:12:59,018 ERROR [ErrorPageWriter] An exception occurred javax.faces.FacesException: javax.el.PropertyNotFoundException: /0.0.0.0/converter-javaee6/index.xhtml at line 42 and column 56 value="#{ConverterBean.value}": Target Unreachable, identifier 'ConverterBean' resolved to null The exception will happen when the web page calling the methods or vars in the ManagedBean names as 'ConverterBean'. I think the cause of the exception is that the server CANNOT find annotation '@ManagedBean' when the managed bean classes are bundled as a jar package & place the .jar into dir jsf2.0-test\WEB-INF\lib. Since JSF 2.0 supports the annotation to declare a managed bean, so that in the src code, we declare "ConverterBean.java" using @ManagedBean in ConverterBean.java file. However, ConverterBean.class is in the jsf2.0-test-3.0-SNAPSHOT.jar when maven building it since its parents' pom set the archiveClasses to true. Meanwhile, the server CANNOT find that ConverterBean.class has been declared as a managed bean for the reason that it is included in lib\....jar. I have tried to make the classes(contains ConverterBean.class ) under WEN-INF\classes dir and the testing result is successful and the server does NOT have exception any more. NOTE: 1.Please refer GERONIMO-5796\GERONIMO-5778\GERONIMO-5644 at the same time. 2.I use org.apache.myfaces.core.myfaces-bundle , version 2.0.3 -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira