2 Replies Latest reply on Apr 17, 2012 6:00 AM by Benito Juarez

    session bean not deployed

    Benito Juarez Newbie



      i created a session bean using the @Named annotation:


      public class LoginForm implements Serializable



      the session bean in accessible in jsf, all works well. Until i add a logger:


      private static final Logger log = Logger.getLogger(LoginForm.class);


      after adding this line the bean is not longer accessible and i get the following exception:


      javax.servlet.ServletException: javax.el.PropertyNotFoundException: /login.xhtml @26,38 action="#{login.setName(name)}": Target Unreachable, identifier 'login' resolved to null


      For some reason the bean is invalid, but the log doesnt show anything.


      thy for help


        • 1. Re: session bean not deployed
          Stuart Douglas Master

          The most likely cause is that the Logger class cannot be found, and this is causing a NoClassDefFound error when weld attempts to load the class.

          • 2. Re: session bean not deployed
            Benito Juarez Newbie

            do i have to guess or is it possible to have a detailed log output. The server must have a reason to refuse my bean. Why doesnt it output anything?

            A NoClassDefFound-Exception is theoretically possible, so i added a jboss-deployment-structure.xml to the ear-project, (path EarContent\WEB-INF). It had no effect.





            <!-- Add dependency on log4j, this is not automatic dependency, it has to be explicitly defined, like follows: -->

            <module name="org.apache.log4j" />