1 2 Previous Next 23 Replies Latest reply on Mar 6, 2005 5:39 PM by matil

    JBoss Deployment

      Hi forummates,

      In order to learn J2EE, I am using Eclipse integrated with JBoss by a plug-in called JBoss-IDE.

      I downloaded the document called "Tutorial-1.2.2.pdf" at the JBoss's download site and followed it one by one.

      At the last step, which is the deployment, the console shows the following messages;

      23:50:44,652 WARN [verifier] EJB spec violation:
      Bean : Fibo
      Section: 22.2
      Warning: The Bean Provider must specify the fully-qualified name of the Java class that implements the enterprise bean's business methods in the <ejb-class> element.
      Info : Class not found on 'tutorial.ejb.FiboBean': No ClassLoaders found for: tutorial.ejb.FiboBean

      23:50:44,662 ERROR [MainDeployer] could not create deployment: file:/D:/jboss/server/default/tmp/deploy/tmp6161FiboApp.ear-contents/FiboEJB.jar
      org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.

      ....

      What wrong did I do? How could I solve the above problem? Please help me. Thanks.

      -stan

        • 1. Re: JBoss Deployment
          jmspaggi

          Ho, very simple ;)

          You are wrong somewhere. Simply look to the declaration of your EJB, or everythink else.

          I have got many time this error, but each time, solve by seing a mistake on somethink.

          One more think, please be sure to do not use accent caracteres (likes éà èïô, etc.) on description.

          If your not able to solve your probleme, you can post your xml files here or the javadoc of your ejb...

          JMS

          • 2. Re: JBoss Deployment

            Hi JMS,

            I do know what you mean clearly. I attach my Java FiboBean.java as the following. By this with XDoclet generation, Fibo.java and FiboHome.java were made automatically.

            /*
            * Created on 2004/4/10
            *
            * To change the template for this generated file go to
            * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
            */
            package tutorial.ejb;

            import java.rmi.RemoteException;

            import javax.ejb.CreateException;
            import javax.ejb.EJBException;
            import javax.ejb.SessionBean;
            import javax.ejb.SessionContext;

            /**
            * @author cs_cwt
            *
            * To change the template for this generated type comment go to
            * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
            *
            * @ejb.bean name = "Fibo"
            * display-name = "Fibo EJB"
            * description = "EJB that computes Fibonacci suite"
            * view-type = "remote"
            * jndi-name = "ejb/tutorial/Fibo"
            */
            public class FiboBean implements SessionBean {

            /**
            *
            */
            public FiboBean() {
            super();
            // TODO Auto-generated constructor stub
            }

            /**
            * @author Teki Chan
            * @name ejbCreate
            *
            * This method is without parameter as this EJB is stateless
            *
            * @throws CreateException
            * @ejb.create-method
            */
            public void ejbCreate()
            throws CreateException {
            }

            /* (non-Javadoc)
            * @see javax.ejb.SessionBean#ejbActivate()
            */
            public void ejbActivate() throws EJBException, RemoteException {
            // TODO Auto-generated method stub

            }

            /* (non-Javadoc)
            * @see javax.ejb.SessionBean#ejbPassivate()
            */
            public void ejbPassivate() throws EJBException, RemoteException {
            // TODO Auto-generated method stub

            }

            /* (non-Javadoc)
            * @see javax.ejb.SessionBean#ejbRemove()
            */
            public void ejbRemove() throws EJBException, RemoteException {
            // TODO Auto-generated method stub

            }

            /* (non-Javadoc)
            * @see javax.ejb.SessionBean#setSessionContext(javax.ejb.SessionContext)
            */
            public void setSessionContext(SessionContext arg0)
            throws EJBException, RemoteException {
            // TODO Auto-generated method stub

            }

            /**
            * @author Teki Chan
            * @name compute
            * @param number
            * @return double[]
            * @ejb.interface-method view-type = "remote"
            *
            * The business method of computing a Fibonacci suite
            */
            public double[] compute(int number) {
            if (number < 0) {
            throw new EJBException("Argument should be positive");
            }

            double[] suite = new double[number+1];
            suite[0] = 0;
            if (number == 0) {
            return suite;
            }

            suite[1] = 1;
            for(int i=2; i<=number; i++) {
            suite = suite[i-1] + suite[i-2];
            }

            return suite;
            }
            }

            while ejb-jar.xml is

            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

            <ejb-jar >

            <![CDATA[No Description.]]>
            <display-name>Generated by XDoclet</display-name>

            <enterprise-beans>

            <!-- Session Beans -->

            <![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>



            <!--
            To add session beans that you have deployment descriptor info for, add
            a file to your XDoclet merge directory called session-beans.xml that contains
            the markup for those beans.
            -->

            <!-- Entity Beans -->
            <!--
            To add entity beans that you have deployment descriptor info for, add
            a file to your XDoclet merge directory called entity-beans.xml that contains
            the markup for those beans.
            -->

            <!-- Message Driven Beans -->
            <!--
            To add message driven beans that you have deployment descriptor info for, add
            a file to your XDoclet merge directory called message-driven-beans.xml that contains
            the <message-driven></message-driven> markup for those beans.
            -->

            </enterprise-beans>

            <!-- Relationships -->

            <!-- Assembly Descriptor -->
            <assembly-descriptor >
            <!--
            To add additional assembly descriptor info here, add a file to your
            XDoclet merge directory called assembly-descriptor.xml that contains
            the <assembly-descriptor></assembly-descriptor> markup.
            -->

            <!-- finder permissions -->

            <!-- transactions -->

            <!-- finder transactions -->
            </assembly-descriptor>

            </ejb-jar>

            Please help. Thanks.

            -stan

            • 3. Re: JBoss Deployment
              jmspaggi

              Hum... Strange...

              Your .xml file is really different than mine...

              Here is mine :

              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
              
              <ejb-jar >
              
               <description>[CDATA[No Description.]]</description>
               <display-name>Generated by XDoclet</display-name>
              
               <enterprise-beans>
              
               <!-- Session Beans -->
               <session >
               <description>[CDATA[EJB that computes Fibonacci suite]]</description>
               <display-name>Fibo EJB</display-name>
              
               <ejb-name>RemoteFiboJMS</ejb-name>
              
               <home>tutorialjms.interfaces.RemoteFiboJMSHome</home>
               <remote>tutorialjms.interfaces.RemoteFiboJMS</remote>
               <ejb-class>tutorialjms.ejb.TestRemoteBean</ejb-class>
               <session-type>Stateless</session-type>
               <transaction-type>Container</transaction-type>
              
               </session>
              
               <session >
               <description>[CDATA[EJB that computes Fibonacci suite]]</description>
               <display-name>Fibo EJB</display-name>
              
               <ejb-name>FiboJMS</ejb-name>
              
               <home>tutorialjms.interfaces.FiboJMSHome</home>
               <remote>tutorialjms.interfaces.FiboJMS</remote>
               <ejb-class>tutorialjms.ejb.FiboJMSBean</ejb-class>
               <session-type>Stateless</session-type>
               <transaction-type>Container</transaction-type>
              
               </session>
              
               <!-- Entity Beans -->
              
               <!-- Message Driven Beans -->
              
               </enterprise-beans>
              
               <!-- Relationships -->
              
               <!-- Assembly Descriptor -->
               <assembly-descriptor >
              
               <!-- finder permissions -->
              
               <!-- finder permissions -->
              
               <!-- transactions -->
              
               <!-- finder transactions -->
               </assembly-descriptor>
              
              </ejb-jar>
              
              


              I have remove comments for keep it human readable... As you can see in the session section, each string is as parameter in my xml file. In yours,

               <!-- Session Beans -->
              
              [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>
              


              There is many tag missing.

              Is it because you haven't past it as {code}? Or is theres really missing on your xml file?

              JMS

              • 4. Re: JBoss Deployment

                Let me recapture the code as the following;

                <?xml version="1.0" encoding="UTF-8"?>
                <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
                
                <ejb-jar >
                
                 <description><![CDATA[No Description.]]></description>
                 <display-name>Generated by XDoclet</display-name>
                
                 <enterprise-beans>
                
                 <!-- Session Beans -->
                 <session >
                 <description><![CDATA[EJB that computes Fibonacci suite]]></description>
                 <display-name>Fibo EJB</display-name>
                
                 <ejb-name>Fibo</ejb-name>
                
                 <home>tutorial.interfaces.FiboHome</home>
                 <remote>tutorial.interfaces.Fibo</remote>
                 <ejb-class>tutorial.ejb.FiboBean</ejb-class>
                 <session-type>Stateless</session-type>
                 <transaction-type>Container</transaction-type>
                
                 </session>
                
                 <!--
                 To add session beans that you have deployment descriptor info for, add
                 a file to your XDoclet merge directory called session-beans.xml that contains
                 the <session></session> markup for those beans.
                 -->
                
                 <!-- Entity Beans -->
                 <!--
                 To add entity beans that you have deployment descriptor info for, add
                 a file to your XDoclet merge directory called entity-beans.xml that contains
                 the <entity></entity> markup for those beans.
                 -->
                
                 <!-- Message Driven Beans -->
                 <!--
                 To add message driven beans that you have deployment descriptor info for, add
                 a file to your XDoclet merge directory called message-driven-beans.xml that contains
                 the <message-driven></message-driven> markup for those beans.
                 -->
                
                 </enterprise-beans>
                
                 <!-- Relationships -->
                
                 <!-- Assembly Descriptor -->
                 <assembly-descriptor >
                 <!--
                 To add additional assembly descriptor info here, add a file to your
                 XDoclet merge directory called assembly-descriptor.xml that contains
                 the <assembly-descriptor></assembly-descriptor> markup.
                 -->
                
                 <!-- finder permissions -->
                
                 <!-- transactions -->
                
                 <!-- finder transactions -->
                 </assembly-descriptor>
                
                </ejb-jar>
                
                


                But this code should be autogenerated by JBoss-IDE. What I wrote myself are

                1. FiboBean.java
                /*
                 * Created on 2004/4/10
                 *
                 * To change the template for this generated file go to
                 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
                 */
                package tutorial.ejb;
                
                import java.rmi.RemoteException;
                
                import javax.ejb.CreateException;
                import javax.ejb.EJBException;
                import javax.ejb.SessionBean;
                import javax.ejb.SessionContext;
                
                /**
                 * @author cs_cwt
                 *
                 * To change the template for this generated type comment go to
                 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
                 *
                 * @ejb.bean name = "Fibo"
                 * display-name = "Fibo EJB"
                 * description = "EJB that computes Fibonacci suite"
                 * view-type = "remote"
                 * jndi-name = "ejb/tutorial/Fibo"
                 */
                public class FiboBean implements SessionBean {
                
                 /**
                 *
                 */
                 public FiboBean() {
                 super();
                 // TODO Auto-generated constructor stub
                 }
                
                 /**
                 * @author Teki Chan
                 * @name ejbCreate
                 *
                 * This method is without parameter as this EJB is stateless
                 *
                 * @throws CreateException
                 * @ejb.create-method
                 */
                 public void ejbCreate()
                 throws CreateException {
                 }
                
                 /* (non-Javadoc)
                 * @see javax.ejb.SessionBean#ejbActivate()
                 */
                 public void ejbActivate() throws EJBException, RemoteException {
                 // TODO Auto-generated method stub
                
                 }
                
                 /* (non-Javadoc)
                 * @see javax.ejb.SessionBean#ejbPassivate()
                 */
                 public void ejbPassivate() throws EJBException, RemoteException {
                 // TODO Auto-generated method stub
                
                 }
                
                 /* (non-Javadoc)
                 * @see javax.ejb.SessionBean#ejbRemove()
                 */
                 public void ejbRemove() throws EJBException, RemoteException {
                 // TODO Auto-generated method stub
                
                 }
                
                 /* (non-Javadoc)
                 * @see javax.ejb.SessionBean#setSessionContext(javax.ejb.SessionContext)
                 */
                 public void setSessionContext(SessionContext arg0)
                 throws EJBException, RemoteException {
                 // TODO Auto-generated method stub
                
                 }
                
                 /**
                 * @author Teki Chan
                 * @name compute
                 * @param number
                 * @return double[]
                 * @ejb.interface-method view-type = "remote"
                 *
                 * The business method of computing a Fibonacci suite
                 */
                 public double[] compute(int number) {
                 if (number < 0) {
                 throw new EJBException("Argument should be positive");
                 }
                
                 double[] suite = new double[number+1];
                 suite[0] = 0;
                 if (number == 0) {
                 return suite;
                 }
                
                 suite[1] = 1;
                 for(int i=2; i<=number; i++) {
                 suite = suite[i-1] + suite[i-2];
                 }
                
                 return suite;
                 }
                 }
                
                

                2. application.xml
                <?xml version="1.0" encoding="UTF-8"?>
                <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
                <application>
                <display-name>Sum Application</display-name>
                <module>
                <ejb>FiboEJB.jar</ejb>
                </module>
                <module>
                <web>
                <web-uri>FiboWeb.war</web-uri>
                <context-root>/fibo</context-root>
                </web>
                </module>
                </application>
                


                What's wrong? Please help.

                -stan


                • 5. Re: JBoss Deployment
                  jmspaggi

                  Humm... All seems to be good. Have you take a look on your deploy parameters?

                  • 6. Re: JBoss Deployment

                    Hi jmspaggi,

                    Which parameters do you mean? I just follow the instructions of the PDF. Is there any tricky?

                    Thanks,
                    -stan

                    • 7. Re: JBoss Deployment
                      jayganesh786

                      Hi guys,

                      I am not here to comment anything particular on this specific topic, but I have just posted my question on another thread, but I thought it may be quicker to raise it here. My question is, I got stuck in "Generating EJB related Files" section of tutorial. My problem is I can not see "XDoclet Configuation" tab and "pacakging configurations" tab in my java-project properties window. WHY? WHY? Please let me know, because you guys have passed through that stage comfortably. or did you?

                      Thanks in advance

                      Nilesh Patel

                      • 8. Re: JBoss Deployment
                        jayganesh786

                        sorry guys. I resolved this issue, by selecting "java perspective". Until now I was looking at "resource perspective". Silly me. On the other hand I would question, whether it should be like this. I think, like all other tabs, which are common between java perspective and resource perspective, XDoclet related tabs should be avaialble into resource perspective too. But never mind, at least we know now.

                        Thanks guys if you have replied or spent time into this already.

                        Nilesh Patel

                        • 9. Re: JBoss Deployment

                          Hi jayganesh786,

                          Do you mean that you could follow the Tutorial and run it successfully? But I can't and get the deployment error. By your experience, what did I go wrong? Thanks.

                          -stan

                          • 10. Re: JBoss Deployment
                            jayganesh786

                            Sorry Stan.

                            I posted the question, which is related to before deployment. Now I ran deployment section and I indeed get the very same error. I don,t know what is the cause, so I am in the same boat as yours. Any help from JBOSS-IDE world will be highly appreciated.

                            Thanks.

                            Nilesh

                            • 11. Re: JBoss Deployment

                              Hi all,

                              Do you deploy the Tutorial successfully? If yes, could you share your opinion with us? Both Nilesh and I could not run it well and get the deployment error. Please help.

                              If you think the Tutorial cannot work well actually, can you suggest any Tutorial, which could be deployed successfully in practice, please?

                              Many thanks,
                              -stan

                              • 12. Re: JBoss Deployment
                                albertfang

                                Mine is working smoothly. Unfortunately, I don't know how to attach my files to this post. Maybe &#65321;&#12288;&#65347;&#65345;&#65358;&#12288;&#65349;&#65293;&#65357;&#65345;&#65353;&#12288;&#65369;&#65359;&#65365;&#12288;&#65353;&#65350;&#12288;&#65369;&#65359;&#65365;&#12288;&#65351;&#65353;&#65366;&#65349;&#12288;&#65357;&#65349;&#12288;&#65369;&#65359;&#65365;&#65362;&#12288;&#65349;&#65357;&#65345;&#65353;&#65356;&#12288;&#65345;&#65348;&#65348;&#65362;&#65349;&#65363;&#65363;&#65294;

                                • 13. Re: JBoss Deployment

                                  Hi albertfang,

                                  Some of your message could not be seen. Can you tell me any trick to follow the Tutorial? What's wrong in our code?

                                  Thanks,
                                  -stan

                                  • 14. Re: JBoss Deployment
                                    albertfang

                                    Hi, Stan.

                                    Nothing special about this Fibo tutorial. I just followed the instructions step by step and it woked. I even changed the internal code from UTF-8 to Big5(Chinese, Taiwan) and it woked too. Can you tell me how to attach my files to this post or I just send an email attached with my files to you if you give me your email address. Then you can compare yours with mine. Because I am quite new to Eclipse, Jboss and Xdoclet, you have search any minor mistakes you might make. Good luck.

                                    1 2 Previous Next