7 Replies Latest reply on May 9, 2004 8:53 AM by momi

    Deployment problem I cannot solve

    Flush Newbie

      Hi, I've searched on the Internet, and although it seems quite a common
      problem, it seems there is no a certain solution.

      I deployed a couple of EJBs (two sessions and one entity) and I obtain the
      following exceptions on the JBoss console:

      Bean : FakeData
      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 'org.jemos.entity.FakeDataCMP': Unexpected error
      during load of: org.jemos.entity.FakeDataCMP, msg=org/jemos/entity/FakeDa
      taBean
      
      00:46:37,750 WARN [verifier] EJB spec violation:
      Bean : FakeDataModel
      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 'org.jemos.sessions.FakeDataModelSession':
      Unexpected error during load of: org.jemos.sessions.FakeDataModelSession,
      msg=o
      rg/jemos/sessions/FakeDataModelBean
      
      00:46:37,750 WARN [verifier] EJB spec violation:
      Bean : FakeDataHolder
      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 'org.jemos.sessions.FakeDataHolderSession':
      Unexpected error during load of: org.jemos.sessions.FakeDataHolderSession,
      msg
      =org/jemos/sessions/FakeDataHolderBean
      


      Here follows the content of ejb-jar.xml:

      
      <?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[]]></description>
      
       <ejb-name>FakeDataModel</ejb-name>
      
       <home>org.jemos.intf.FakeDataModelHome</home>
       <remote>org.jemos.intf.FakeDataModel</remote>
       <local-home>org.jemos.intf.FakeDataModelLocalHome</local-home>
       <local>org.jemos.intf.FakeDataModelLocal</local>
       <ejb-class>org.jemos.sessions.FakeDataModelSession</ejb-class>
       <session-type>Stateless</session-type>
       <transaction-type>Container</transaction-type>
      
       </session>
      
       <session >
       <description><![CDATA[]]></description>
      
       <ejb-name>FakeDataHolder</ejb-name>
      
       <home>org.jemos.intf.FakeDataHolderHome</home>
       <remote>org.jemos.intf.FakeDataHolder</remote>
       <local-home>org.jemos.intf.FakeDataHolderLocalHome</local-home>
       <local>org.jemos.intf.FakeDataHolderLocal</local>
       <ejb-class>org.jemos.sessions.FakeDataHolderSession</ejb-class>
       <session-type>Stateful</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 -->
       <entity >
       <description><![CDATA[]]></description>
      
       <ejb-name>FakeData</ejb-name>
      
       <home>org.jemos.intf.FakeDataHome</home>
       <remote>org.jemos.intf.FakeData</remote>
       <local-home>org.jemos.intf.FakeDataLocalHome</local-home>
       <local>org.jemos.intf.FakeDataLocal</local>
      
       <ejb-class>org.jemos.entity.FakeDataCMP</ejb-class>
       <persistence-type>Container</persistence-type>
       <prim-key-class>org.jemos.intf.FakeDataPK</prim-key-class>
       <reentrant>False</reentrant>
       <cmp-version>2.x</cmp-version>
       <abstract-schema-name>FakeData</abstract-schema-name>
       <cmp-field >
       <description><![CDATA[]]></description>
       <field-name>id</field-name>
       </cmp-field>
       <cmp-field >
       <description><![CDATA[]]></description>
       <field-name>firstName</field-name>
       </cmp-field>
       <cmp-field >
       <description><![CDATA[]]></description>
       <field-name>lastName</field-name>
       </cmp-field>
       <cmp-field >
       <description><![CDATA[]]></description>
       <field-name>address1</field-name>
       </cmp-field>
       <cmp-field >
       <description><![CDATA[]]></description>
       <field-name>address2</field-name>
       </cmp-field>
      
       <query>
       <query-method>
       <method-name>findAll</method-name>
       <method-params>
       </method-params>
       </query-method>
       <ejb-ql><![CDATA[]]></ejb-ql>
       </query>
       <!-- Write a file named ejb-finders-FakeDataBean.xml if you want to
      define extra finders. -->
       </entity>
      
       <!--
       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 -->
      
       <!-- finder permissions -->
      
       <!-- finder permissions -->
      
       <!-- transactions -->
       <container-transaction >
       <method >
       <ejb-name>FakeData</ejb-name>
       <method-name>*</method-name>
       </method>
       <trans-attribute>Required</trans-attribute>
       </container-transaction>
      
       <!-- finder transactions -->
       </assembly-descriptor>
      
      </ejb-jar>
      
      


      The jar file contains all the classes that the deployer can't find, and
      under META-INF there are the following files:

      ejb-jar.xml
      jboss.xml
      jbosscmp-jdbc.xml


      Please help,

      Marco





        • 1. Re: Deployment problem I cannot solve
          Joachim Van der Auwera Expert

          Please, also post your jboss.xml, as this has the jndi mappings...

          Joachim

          • 2. Re: Deployment problem I cannot solve
            Flush Newbie

            Please find the jboss.xml file here listed. Thanks.

            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">
            
            <jboss>
            
             <enterprise-beans>
            
             <!--
             To add beans that you have deployment descriptor info for, add
             a file to your XDoclet merge directory called jboss-beans.xml that contains
             the <session></session>, <entity></entity> and <message-driven></message-driven>
             markup for those beans.
             -->
            
             <entity>
             <ejb-name>FakeData</ejb-name>
             <jndi-name>FakeData</jndi-name>
             <local-jndi-name>FakeDataLocal</local-jndi-name>
            
             <method-attributes>
             </method-attributes>
            
             </entity>
            
             <session>
             <ejb-name>FakeDataModel</ejb-name>
             <jndi-name>FakeDataModel</jndi-name>
             <local-jndi-name>FakeDataModelLocal</local-jndi-name>
            
             <method-attributes>
             </method-attributes>
             </session>
             <session>
             <ejb-name>FakeDataHolder</ejb-name>
             <jndi-name>FakeDataHolder</jndi-name>
             <local-jndi-name>FakeDataHolderLocal</local-jndi-name>
            
             <method-attributes>
             </method-attributes>
             </session>
            
             </enterprise-beans>
            
             <resource-managers>
             </resource-managers>
            
            </jboss>
            


            • 3. Re: Deployment problem I cannot solve
              Joachim Van der Auwera Expert

              Can't see anything special and am a bit puzzled about the error msg. Seems to complain either about the JNDI names (which seem fine), or about a class not being found.
              So please check your jar file file presence of all the classes (in the right packages).

              JOachim

              • 4. Re: Deployment problem I cannot solve
                Kabir Khan Master

                Are you sure you have got the fully qualified class names correct? Also, does your bean class implement the requied SessionBean/EntityBean interface?

                • 5. Re: Deployment problem I cannot solve
                  momi Newbie

                  I have a same problem for a bean which extends another class. If I remove the extends then the bean deploys fine but with the extends (which I need) I get the same error.

                  • 6. Re: Deployment problem I cannot solve - Problem solved but..
                    Flush Newbie

                    Well, I put the ejb.jar and web.war in an application file (.ear) and it deployed fine.

                    Now the question is why? Why if an EJB is defined with a class extending the real session/entity it doesn't deploy if hot-deployed as a jar but it does deploy as ear?

                    I'll investigate on this and I'll get back.

                    Marco

                    • 7. Re: Deployment problem I cannot solve
                      momi Newbie

                      I used the XDoclet to generate my beans and forget to add the transaction-type=Container tag. When I added this tag it deployed fine. However, this does not seem to be your problem because you already have this specified.