problems with generating jboss EJBs / OT jboss

"Marco Mistroni" <[email protected]>
Newsgroups gmane.comp.java.xdoclet.user
Message-ID <[email protected]>
hi all,
  i m using xdoclet (with Maven2.) to generate EJBs with xdoclet, deploying
them on jboss4.0.2 and i am having
lot of problems when deploying..

when deploying  EJBs on jboss4.0.2 i receive followigin exception :

14:58:22,859 WARN  [verifier] EJB spec violation:
Bean   : Sequence
Method : public SequenceKey ejbCreate(String) throws CreateException
Section: 10.6.4
Warning: The return type of an ejbCreate(...) method must be the entity
bean's p
rimary key type.

14:58:22,859 WARN  [verifier] EJB spec violation:
Bean   : Sequence
Method : public SequenceKey ejbCreate() throws CreateException
Section: 10.6.4
Warning: The return type of an ejbCreate(...) method must be the entity
bean's p
rimary key type.

14:58:22,875 WARN  [verifier] EJB spec violation:
Bean   : Contact
Method : public abstract Collection findByContactRef(String) throws
FinderExcept
ion
Section: 10.5.6
Warning: Every finder method except findByPrimaryKey(key) must be associated
wit
h a query element in the deployment descriptor.


but i don't know where this exception come from. let's take beans one by one

***** Sequence EEJB *****
/**
 *  @ejb.bean
 *            name="Sequence"
 *            type="CMP"
 *            view-type="local"
 *
local-jndi-name="commons/ejb/util/sequencegenerator/SequenceLocalHome"
 *
 *  @ejb.pk
 *            class="SequenceKey"
 *
 */
public abstract class SequenceBean implements EntityBean {

   ....
    /**
     * @ejb.create-method
     */
    public SequenceKey ejbCreate()
        throws javax.ejb.CreateException {
        return null;
    }
    .....
    /**
     * @ejb.create-method
     */
    public SequenceKey ejbCreate(
        java.lang.String name)
        throws javax.ejb.CreateException {
        setName(name);
        return null;
    }
  ...
and here's what gets generated in ejb-jar.xml

 <entity >
         <description><![CDATA[]]></description>

         <ejb-name>Sequence</ejb-name>

         <local-home>
com.waersystems.ejb.util.sequencegenerator.SequenceLocalHome</local-home>
         <local>com.waersystems.ejb.util.sequencegenerator.SequenceLocal
</local>

         <ejb-class>com.waersystems.ejb.util.sequencegenerator.SequenceCMP
</ejb-class>
         <persistence-type>Container</persistence-type>
         <prim-key-class>SequenceKey</prim-key-class>
   .....


then, about the ContactBean finder... here's my  bean

/**
 * @ejb.bean
 *        name="Contact"
 *        type="CMP"
 *        primkey-field="contactRef"
 *        view-type="local"
 *        local-jndi-name="commons/ejb/partners/contact/ContactLocalHome"
 *
 * @ejb.persistence table-name="contact"
 *
 * @ejb.finder
 *         signature="java.util.Collection findByContactRef(String
contactRef)"
 *         query="select object(o) from Contact o
 *                 where o.contactRef = ?1"
 *
 *
 */

here's ejb-jar.xml

..
   <query>
            <query-method>
               <method-name>findByContactRef</method-name>
               <method-params>
                  <method-param>String</method-param>
               </method-params>
            </query-method>
            <ejb-ql><![CDATA[select object(o) from Contact o where
o.contactRef = ?1]]></ejb-ql>
         </query>
      <!-- Write a file named ejb-finders-ContactBean.xml if you want to
define extra finders. -->
</entity>

i still cannot undestand why JBoss is complaining... anyone had same
experience or can help?

thanks in advance and regards
  marco

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
xdoclet-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.