5 Replies Latest reply on Oct 8, 2003 1:10 PM by ravi_arrow

    EJB Deployment

    ravi_arrow Newbie

      I am new bird in using EJBs on Jboss. Having understood the basics, i tried to deploy the example ejb on to jboss server. i did as described in the tutorial. After deploying the interest EJB, the jboss server spews an error message as follows:

      20:47:47,015 INFO [MainDeployer] Starting deployment of package: file:/E:/jboss
      /server/default/deploy/interest.jar
      20:47:47,609 INFO [EJBDeployer]
      Bean : Interest
      Section: 16.2
      Warning: The Bean Provider must specify the fully-qualified name of the Java cla
      ss that implements the enterprise bean's business methods.

      20:47:47,671 INFO [EJBDeployer]
      Bean : Interest
      Section: 16.2
      Warning: The Bean Provider must specify the fully-qualified name of the enterpri
      se bean's home interface in the home element.

      20:47:47,750 INFO [EJBDeployer]
      Bean : Interest
      Section: 16.2
      Warning: The Bean Provider must specify the fully-qualified name of the enterpri
      se bean's remote interface in the remote element.

      20:47:47,812 INFO [EjbModule] Creating
      20:47:47,890 INFO [EjbModule] Deploying Interest
      20:47:48,578 INFO [EjbModule] Remove JSR-77 EJB Module: jboss.management.single
      :J2EEApplication= ,J2EEServer=Single,j2eeType=EJBModule,name=interest.jar
      20:47:48,578 ERROR [EjbModule] Initialization failed
      java.lang.ClassNotFoundException: org.jboss.docs.interest.InterestHome
      at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
      at org.jboss.ejb.StatelessSessionContainer.create(StatelessSessionContai
      ner.java:155)

      and more errors.

      i did as explained in the tutorial like compiling the source files and putting the ejb-jar.xml and jboss.xml in the META-INF folder. Jarred the classes and the META-INF folder and deployed on the server. as soon as i deployed the above error is spawned.

      Anybody, please help me understanding this error msg and avoid doing the same again and again.

      THank U, in advance.

        • 1. Re: EJB Deployment
          montia Newbie

          Hi,

          I haven't seen that particular error myself, but I had some trouble getting the tutorial to work too. However, I managed to have it up and running finally. I hope we're talking about the same tutorial: http://umn.dl.sourceforge.net/sourceforge/jboss/Tutorial_1.2.0.pdf

          I'm going to attach my deployment descriptors - make sure that yours are the same.

          Hope this helps,
          Montia

          • 2. Re: EJB Deployment
            montia Newbie

            Oh, remove any lines that relate to a RefFibo EJB bean in jboss.xml and ejb-jar.xml.

            That was just me experimenting with an EJB that references another EJB. So, that's not part of the tutorial. :)

            Best,
            Montia

            • 3. Re: EJB Deployment
              ravi_arrow Newbie

              To
              montia,

              Thank U, very much for ur reply. Ur response has made me believe that if in doubt (on any concept) in jboss, there are people around to help. Ur reply though encouraging but has not solved my problem i.e., i have downloaded "documents-examples.zip" from google with documentation and proceeded as explained in it. For ur knowledge i am attaching the example source. Please check out and let me know where i am going wrong.

              Thank U.

              • 4. Re: EJB Deployment
                montia Newbie

                Hi,

                Based on the warning messages that you posted I think that you are not completely describing your EJB in your ejb-jar.xml file. Check out the following paragraph from my ejb-jar.xml:

                -
                -
                - <![CDATA[ EJB that computes Fibonacci suite
                ]]>

                <display-name>Fibo EJB</display-name>
                <ejb-name>Fibo</ejb-name>
                tutorial.interfaces.FiboHome
                tutorial.interfaces.Fibo
                <ejb-class>tutorial.ejb.FiboBean</ejb-class>
                <session-type>Stateless</session-type>
                <transaction-type>Container</transaction-type>
                - <ejb-ref>
                <ejb-ref-name>ejb/RefFibo</ejb-ref-name>
                <ejb-ref-type>Session</ejb-ref-type>
                tutorial.interfaces.RefFiboHome
                tutorial.interfaces.RefFibo
                <ejb-link>RefFibo</ejb-link>
                </ejb-ref>


                So, it looks like you're missing at least the following lines:

                tutorial.interfaces.FiboHome
                tutorial.interfaces.Fibo
                <ejb-class>tutorial.ejb.FiboBean</ejb-class>

                Since you're a new bird to Jboss I'd strongly suggest that you download Eclipse and Jboss IDE and go through the following tutorial:
                http://umn.dl.sourceforge.net/sourceforge/jboss/Tutorial_1.2.0.pdf

                It really helped me understand the entire depoyment configuration, what should be included in the EJB jar, WAR and deployment descriptor files.
                Good luck,
                Montia

                • 5. Re: EJB Deployment
                  ravi_arrow Newbie

                  Hi,

                  Thank U, for the reply. Yes, as suggested i have already downloaded the fibo example from the address u have given in the first posting and i think, i will be able to solve many of my doubts from it.

                  Thank U, will be in touch when ever required.

                  Chao