You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "LiWenQin (JIRA)" <ji...@apache.org> on 2011/02/15 08:06:57 UTC

[jira] Created: (GERONIMO-5817) server CANNOT find annotation'@ManagedBean' when the classes are in the WEB-INF\lib\*.jar package

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

        

[jira] Closed: (GERONIMO-5817) server CANNOT find annotation'@ManagedBean' when the classes are in the WEB-INF\lib\*.jar package

Posted by "Ivan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan closed GERONIMO-5817.
--------------------------

    Resolution: Invalid

According to the JSF spec, only those jar files which contains a faces-config.xml in its META-INF folder will be scanned. 
I have not checked jsf-2.0 case, if it is caused by the same issue, we need to update the case.

> 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

        

[jira] Commented: (GERONIMO-5817) server CANNOT find annotation'@ManagedBean' when the classes are in the WEB-INF\lib\*.jar package

Posted by "LiWenQin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-5817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995636#comment-12995636 ] 

LiWenQin commented on GERONIMO-5817:
------------------------------------

Today I add the faces-config.xml file and find the test result is success.

Thank you, Ivan :-)

> 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

        

[jira] Commented: (GERONIMO-5817) server CANNOT find annotation'@ManagedBean' when the classes are in the WEB-INF\lib\*.jar package

Posted by "LiWenQin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-5817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995193#comment-12995193 ] 

LiWenQin commented on GERONIMO-5817:
------------------------------------

OK, I will check if the app can work if adding faces-config.xml

> 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