2 Replies Latest reply on Apr 17, 2009 2:56 PM by Andreas Fagerlönn

    EJB3 issue

    Andreas Fagerlönn Newbie

      Hi, I´m developing a SEAM 2.1.1.GA 3 tier application contaning EJB3 components deployed in JBOSS 5.0.1GA application server.


      The problem occurs when presentation tier facelet (seam) makes the lookup to invoke method in my stateless session bean, the stacktrace says that it cannot instantiate Seam component and further on noclassdefounderror regarding the EJB3 local interface.


      The strange thing is that I can see in log that the SessionBean is registered in Seam as an component and the JNDI name is 100% correct.


      web.xml, components.xml, faces-config.xml in WAR module are 100% ok, I think I have double checked them hundred times ;-)


      The EJB3 component is just a simple sessionbean implementing a local interface.


      The deployable EAR file contains the WAR module, EJB module and declared dependencies (building with maven2). So everythings there from my point of view.


      Must be something fundamental here, dont u think? Any idea?


      Tnx in advance
      Andreas

        • 1. Re: EJB3 issue
          Arshad Mahmood Newbie

          Hi,


          Since it says no class definition found error, it seems to be some sort of class loading issue. Is the local interface and the EJB in the same jar? Is the jar declared to be an EJB jar and placed at the top level of the EAR.


          Probably best if you attach a directory listing of your EAR file and the contents of application.xml from the EAR.


          Regards.

          • 2. Re: EJB3 issue
            Andreas Fagerlönn Newbie
            In my application.xml (EAR plugin) I did add:

              <module>
                <ejb>jboss-seam-2.1.1.GA.jar</ejb>
              </module>
              <module>
                <ejb>jboss-el-1.0_02.CR2.jar</ejb>
              </module>

            THAT WAS THE SOLUTION, IT WORKS!! :))

            So those jars need to be declared as ejb:s and stated in application.xml, I thought it was enough to declare them as dependencies i maven.

            Your hint really helped me.

            THANKS

            Andreas