2 Replies Latest reply on Jul 23, 2003 3:27 AM by ehdez

    EJB Spec violation Section 22.2

    ehdez Newbie

      Hi All,

      I had an application running without problems on JBoss 3.2.0, J2SDK 1.4.1,
      Struts 1.0 and XDoclet.

      Now I've updated to jboss-4.0.0DR1, J2SDK 1.4.2, Struts-1.1 but I can't deploy
      it.


      16:17:12,949 WARN [verifier] EJB spec violation:
      Bean : DocumentFacade
      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: SELECT OBJECT(o) FROM Course oSELECT OBJECT(o) FROM
      Course o WHERE o.description=?1SELECT OBJECT(o) FROM Course o WHERE
      o.isComplementary=trueSELECT OBJECT(o) FROM Course o WHERE
      o.isComplementary=falseSELECT OBJECT(o) FROM Teach oSELECT OBJECT(o) FROM
      Teach o WHERE o.courseId=?1SELECT OBJECT(o) FROM Teach o WHERE
      o.schoolId=?1SELECT OBJECT(o) FROM Teach o WHERE o.teacherUserName=?1SELECT
      OBJECT(o) FROM Teach o WHERE o.year=?1SELECT OBJECT(o) FROM CourseSchool
      oSELECT OBJECT(o) FROM CourseSchool o WHERE o.courseId=?1SELECT OBJECT(o)
      FROM CourseSchool o WHERE o.schoolId=?1SELECT OBJECT(o) FROM CourseSchool o
      WHERE o.year=?1com.mycompany.stateless.bean.DocumentFacadeEJB


      Somebody knows what is happening ?
      Why appears all the EJB-QL from others queries before the className?


      /**********************************************************************************/
      ejb-jar.xml: // generated by XDoclet

      ....


      <![CDATA[]]>
      <ejb-name>DocumentFacade</ejb-name>
      com.mycompanystateless.interfaces.DocumentFacadeHome
      com.mycompany.stateless.interfaces.DocumentFacade
      <ejb-class>com.mycompany.stateless.bean.DocumentFacadeEJB</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>



      .....


      <ejb-name>Course</ejb-name>
      <local-home>com.mycompany.entity.interfaces.local.CourseHome</local-home>
      com.mycompany.entity.interfaces.local.Course

      <ejb-class>com.mycompany.entity.bean.CourseEJB</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Integer</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>Course</abstract-schema-name>
      <cmp-field >
      <![CDATA[]]>
      <field-name>id</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[]]>
      <field-name>description</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[]]>
      <field-name>minimalAge</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[]]>
      <field-name>maximalAge</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[]]>
      <field-name>isComplementary</field-name>
      </cmp-field>
      <primkey-field>id</primkey-field>


      <query-method>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[SELECT OBJECT(o) FROM Course o]]></ejb-ql>


      <query-method>
      <method-name>findByDescription</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[SELECT OBJECT(o) FROM Course o WHERE
      o.description=?1]]></ejb-ql>


      <query-method>
      <method-name>findAllComplementary</method-name>
      <method-params>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[SELECT OBJECT(o) FROM Course o WHERE
      o.isComplementary=true]]></ejb-ql>


      <query-method>
      <method-name>findAllNormal</method-name>
      <method-params>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[SELECT OBJECT(o) FROM Course o WHERE
      o.isComplementary=false]]></ejb-ql>

      <!-- Write a file named ejb-finders-CourseEJB.xml if you want to define
      extra finders. -->


      ....


      /**********************************************************************************/
      DocumentFacadeEJB.java:
      /**
      * @ejb.bean name="DocumentFacade"
      * jndi-name="mycompany/DocumentFacade"
      * view-type="remote"
      * type="Stateless"
      * @ejb.permission unchecked="*"
      * @ejb.transaction type="Required"
      */
      public class DocumentFacadeEJB implements SessionBean { ...... }



      /*************************************************************************************/
      CourseEJB.java:

      /**
      * @ejb.bean name="Course"
      * jndi-name="mycompany/Course"
      * type="CMP"
      * cmp-version="2.x"
      * view-type="local"
      * primkey-field="id"
      * @ejb.pk class="java.lang.Integer"
      * @ejb.permission unchecked="*"
      *
      * @ejb.finder signature="java.util.Collection findAll()"
      * result-type-mapping="Local"
      * method-intf="LocalHome"
      * query="SELECT OBJECT(o) FROM Course o"
      *
      * @ejb.finder signature="com.mycompany.entity.interfaces.local.Course
      findByDescription(java.lang.String description)"
      * result-type-mapping="Local"
      * method-intf="LocalHome"
      * query="SELECT OBJECT(o) FROM Course o WHERE o.description=?1"
      *
      *
      * @ejb.finder signature="java.util.Collection findAllComplementary()"
      * result-type-mapping="Local"
      * method-intf="LocalHome"
      * query="SELECT OBJECT(o) FROM Course o WHERE o.isComplementary=true"
      *
      * @ejb.finder signature="java.util.Collection findAllNormal()"
      * result-type-mapping="Local"
      * method-intf="LocalHome"
      * query="SELECT OBJECT(o) FROM Course o WHERE o.isComplementary=false"
      *
      * @ejb.persistence table-name="course"
      *
      * @struts.form
      * include-pk="true"
      * include-all="true"
      */
      public abstract class CourseEJB implements EntityBean {.......}