Is <ejbdoclet ejbspec="2.0"/> or 1.1? Use "2.0" for ejb2.

Ara.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:xdoclet-user-
> [EMAIL PROTECTED]] On Behalf Of Danilo Luiz Rheinheimer
> Sent: Monday, May 13, 2002 8:58 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Xdoclet-user] getting started with CMP
> 
> At 15:13 13/5/2002 +1000, you wrote:
> >The docs (http://xdoclet.sf.net) should help you there.
> 
>    I was reading some docs and I find some tips to my problem.
>    The cause of the message "The entity bean class must be defined as
> public and abstract." is xdoclet is creating the CMP layer to my class
as
> a
> concret class and not a abstract one. It is overriding the getXXX and
> setXXX abstract methods of my persistent fields.
>    This is DisciplinaCMP (the !!! coments was added by me) :
> 
> /**
>   * Generated CMP layer for Disciplina. Do not edit!
>   */
> package com.sigea.adm.ejb;
> 
> import java.lang.*;
> import javax.ejb.*;
> import java.rmi.RemoteException;
> 
> public class DisciplinaCMP   // !!!!!!!!!!!!!!! Not abstract
> !!!!!!!!!!!!!!!!!!!
>     extends com.sigea.adm.ejb.DisciplinaEjb
>     implements javax.ejb.EntityBean
> {
>     private boolean dirty;
> 
>     private com.sigea.adm.interfaces.DisciplinaData dataHolder;
> 
> 
>     public java.lang.String codDisc;
>     public java.lang.String nomeDisc;
> 
> // !!!!!!!!!!!!!!! It is overriding the abstract method
> !!!!!!!!!!!!!!!!!!!
>     public java.lang.String getCodDisc()throws
java.rmi.RemoteException
>     {
>        return this.codDisc;
>     }
> 
>     public void setCodDisc( java.lang.String codDisc )throws
> java.rmi.RemoteException
>     {
>        this.codDisc = codDisc;
> 
>        makeDirty();
>        dataHolder = null;
>     }
> 
> 
> >    After look on the XDoclet samples of CPM I am making my first try
of
> >xdoclet create a CMP bean.
> >    It build the files without problems.
> >    But when I try to deploy my bean to JBoss I get this erros
message :
> >
> >    INFO [EJBDEPLOYER]
> >    Bean : Disciplina
> >    The entity bean class must be defined as public and abstract.
> >....
> >    ERROR [ENTITY CONTAINER]  Exception in service lifecicle create.
> >... No abstract accessors for field named codDisc found on entity
class.
> >
> >    Note the name of the field on this message 'codDisc' it should
not be
> >'CodDisc' ?
> >    What is wrong ?
> >    This is my code with the xdoclet tags :
> >
> >package com.sigea.adm.ejb;
> >
> >import javax.ejb.*;
> >import java.rmi.RemoteException;
> >import com.sigea.adm.interfaces.DisciplinaPK;
> >
> >/**
> >* @ejb:bean
> >*   name="Disciplina"
> >*   type="CMP"
> >*   view-type="both"
> >*/
> >
> >public abstract class DisciplinaEjb implements EntityBean {
> >     EntityContext ctx;
> >
> >/**
> >* @ejb:pk-field
> >* @ejb:persistent-field
> >*
> >*/
> >          public abstract java.lang.String getCodDisc () throws
> > RemoteException;
> >
> >/*
> >* @ejb:persistent-field
> >*/
> >
> >          public abstract void setCodDisc (java.lang.String arg1)
throws
> >RemoteException;
> >
> >/**
> >*
> >* @ejb:persistent-field
> >*/
> >          public abstract void setNomeDisc (java.lang.String arg1)
throws
> >RemoteException;
> >
> >/**
> >* @ejb:persistent-field
> >*/
> >          public abstract java.lang.String getNomeDisc () throws
> >RemoteException;
> >
> >/**
> >* @ejb:create-method
> >*/
> >
> >     public DisciplinaPK ejbCreate (String arg1) throws
CreateException {
> >        return null;
> >     }
> >     public void ejbPostCreate(String arg1) {    }
> >     public void setEntityContext(EntityContext ctx) {
> >       this.ctx = ctx;
> >     }
> >     public void unsetEntityContext() {
> >       ctx = null;
> >     }
> >     public void ejbActivate() {    }
> >     public void ejbPassivate() {    }
> >     public void ejbLoad() {    }
> >     public void ejbStore() {    }
> >     public void ejbRemove() throws RemoveException {    }
> >}
> 
> 
> 
> ----
> Danilo Luiz Rheinheimer
> Florianopolis/SC Brasil
> Sony Cli� 615C
> mailto:[EMAIL PROTECTED]
> ----
> 
> 
> _______________________________________________________________
> 
> Have big pipes? SourceForge.net is looking for download mirrors. We
supply
> the hardware. You get the recognition. Email Us:
[EMAIL PROTECTED]
> _______________________________________________
> Xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user


_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to