1 Reply Latest reply on Feb 27, 2006 12:09 PM by lydie sellam

    problem mapping

    lydie sellam Newbie

      I have a probleme when i execute my session bean :

      this is my ebj entity bean :

      public abstract class TablePersonneBean implements EntityBean{
      
      
       private static final long serialVersionUID = 1L;
       // Données du client
       public Integer identifiant;
       public String nom;
       public String prenom;
      
      
      
       // Contexte de l'EJB
       private EntityContext context;
      
       public abstract Integer getIdentifiant();
      
       public abstract void setIdentifiant(Integer identifiant);
      
       public abstract String getNom();
      
       public abstract String getPrenom();
      
       public abstract void setPrenom(String prenom);
       public abstract void setNom(String nom);
      
       // Crée le composant et le sauvegarde dans la base de données avec un insert
       public Integer ejbCreate(Integer id, String nom, String prenom) throws CreateException {
      
       // renseigne les propriétés du composant
       this.identifiant = id;
       this.nom = nom;
       this.prenom = prenom;
      
       return null;
       }
      
       public Integer ejbCreate() throws CreateException {
      
       return null;
       }
      
       public void ejbPostCreate(Integer identifiant, String nom, String prenom) {
       }
      
       public void ejbPostCreate() {
       }
      
       // Cette fonction permet de supprimer un composant
       public void ejbRemove() throws RemoveException {
      
       }
      
       // Appelé juste après la création ou la réactivation du composant
       public void setEntityContext(EntityContext context) {
       this.context = context;
       }
      
       // Appellé lorsque le composant est enlevé
       public void unsetEntityContext() {
       this.context = null;
       }
      
       // appellé lorsque l'objet redevient actif
       public void ejbActivate() {
      
       }
      
       // appellé lorsque l'objet devient passif
       public void ejbPassivate() {
      
       }
      
       // Cette fonction est une fonction de synchronisation, elle est appellée par le conteneur
       // lorsqu'il veut lire les informations de l'EJB depuis le support de stockage
       public void ejbLoad() {
      
       }
      
       // Cette fonction est une fonction de synchronisation, elle est appellée par le
       // conteneur lorsqu'il veut sauvegarder les informations de l'EJB dans le support de stockage
       public void ejbStore() {
      
       }
      
       public Collection findByNom(String nom) throws FinderException
       {
       return null;
       }
      
      
      }


      my ebj-jar :
      <entity>
       <display-name>TablePersonne</display-name>
       <ejb-name>TablePersonne</ejb-name>
      
       <local-home>com.ebi.back.ejb.entity.TablePersonneLocalHome</local-home>
       <local>com.ebi.back.ejb.entity.TablePersonneLocal</local>
       <ejb-class>
       com.ebi.back.ejb.entity.TablePersonneBean
       </ejb-class>
       <persistence-type>Container</persistence-type>
      
       <prim-key-class>java.lang.Integer</prim-key-class>
       <cmp-version>2.x</cmp-version>
       <abstract-schema-name>TablePersonne</abstract-schema-name>
      
       <reentrant>False</reentrant>
       <cmp-field>
       <field-name>identifiant</field-name>
       </cmp-field>
       <cmp-field>
       <field-name>nom</field-name>
       </cmp-field>
       <cmp-field>
       <field-name>prenom</field-name>
       </cmp-field>
       <primkey-field>identifiant</primkey-field>
       <query>
      
       <query-method>
       <method-name>findByPrimaryKey</method-name>
      
       <method-params>
       <method-param>java.lang.Integer</method-param>
       </method-params>
       </query-method>
       <ejb-ql>
       SELECT OBJECT(p) FROM TablePersonne p WHERE p.nom = ?1
       </ejb-ql>
       </query>
       <query>
      
       <query-method>
       <method-name>findByNom</method-name>
      
       <method-params>
       <method-param>java.lang.String</method-param>
       </method-params>
       </query-method>
       <ejb-ql>
       SELECT OBJECT(p) FROM TablePersonne p WHERE p.nom = ?1
       </ejb-ql>
       </query>
       </entity>
      

      and this is my problem :
      [LogInterceptor] EJBException in method: public abstract java.lang.String com.ebi.back.ejb.entity.TablePersonneLocal.getNom():
      javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract java.lang.String com.ebi.back.ejb.entity.TablePersonneLocal.getNom()
       at org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1150)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:72)
       at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:273)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
       at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:111)
       at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:242)
       at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:89)
       at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:53)
       at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
       at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
       at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
       at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
       at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:139)
       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
       at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
       at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:514)
       at org.jboss.ejb.Container.invoke(Container.java:873)
       at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:413)
       at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:50)
       at $Proxy140.getNom(Unknown Source)
       at com.ebi.front.ChercherListePersonneAction.execute(ChercherListePersonneAction.java:56)
       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
       at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)