I have both local and remote interfaces to my beans, and it works fine.
I got the same error which i traced back to a error in my ejb-jar.xml.
I cant remember which error though. Try to clear the deployment files in
orion/applications and orion/application-deployments.

This is how one entity looks like in my ejb-jar.xml
        <entity>
            <display-name></display-name>
            <ejb-name>StockItemBean</ejb-name>
            <home>beans.StockItemHome</home>
            <remote>beans.StockItem</remote>
            <local-home>beans.StockItemLocalHome</local-home>
            <local>beans.StockItemLocal</local>
            <ejb-class>beans.StockItemBean</ejb-class>
            <persistence-type>Container</persistence-type>
            <prim-key-class>java.lang.String</prim-key-class>
            <reentrant>False</reentrant>
            <cmp-version>2.x</cmp-version>
            <abstract-schema-name>StockItemBean</abstract-schema-name>
            <cmp-field>
                <field-name>number</field-name>
            </cmp-field>
            <cmp-field>
                <field-name>name</field-name>
            </cmp-field>
            <primkey-field>number</primkey-field>
        </entity>

cheers
JEsper
-----Oprindelig meddelelse-----
Fra: Scott Gaetjen [mailto:[EMAIL PROTECTED]]
Sendt: 30. april 2002 05:29
Til: Orion-Interest
Emne: Re: CMP entity bean deployment compilation errors


A follow-up to this issue, which I feel is resolved. I tried 1.5.4 and
then
encountered the following compilation errors:

CodeListsEBLocalHome_EntityHomeWrapper10.java:156: Exception
java.rmi.RemoteException must be c
aught, or it must be declared in the throws clause of this method.
EvermindEntityContext finderContext = this.getContextInstance(thread);
Which
I then saw in another message here.

I did some more investigation and found that the inclusion of the
<local>
and <local-home> elements as well as the <remote> and <home> elements in
my
ejb-jar.xml was causing the original compilation errors. I then
commented
out either the <local>/<local-home> or the <remote>/<home> and the
deployment/compilation of generated classes worked. Seems you can
possibly
only use one of the pair. This is okay for me as I normally use the
session
bean as a facade pattern , so I should be fine just using the
<local>/<local-home> pair.

Scott

Scott Gaetjen wrote:

> I've created a CMP entity bean based on some examples I've seen and am
> encountering some compilation errors on the generated wrapper classes
at
> deployment time. Its seems the getter/setter methods and the remove
> method are not recognized or available in the  generated wrapper
> classes. I've look at various mailing lists and the bug database and
> have not seen any similar problem. I've tried changing the use of Long
> to "long" primitives and making the fields wholly lower case but have
> not had any luck with that. If anyone has seen these errors before or
> can give me any pointers on possible problem areas I would greatly
> appreciate the help:
>
> There errors are as such:
>
> Auto-deploying leaders-ejb.jar (No previous deployment found)...
> CodeListsEBRemote_EntityBeanWrapper2.java:281: Method
__REMOTE__remove()
> not found in class CodeListsEBRemote_EntityBeanWrapper2.
> trail.__REMOTE__remove();
>                       ^
> CodeListsEBRemote_EntityBeanWrapper2.java:571: Method
> __REMOTE__getName() not found in class
> CodeListsEBRemote_EntityBeanWrapper2.
> return trail.__REMOTE__getName();
>                               ^
>
> CodeListsEBRemote_EntityBeanWrapper2.java:809: Method
> __REMOTE__setName(java.lang.String) not found in class
>
CodeListsEBRemote_EntityBeanWrapper2.trail.__REMOTE__setName(argument0);
>
>                        ^
>
> Regards,
> Scott
>
> ****************
> * My bean looks like:
>
> public abstract class CodeListsEB implements EntityBean
>  ....
>     public abstract Long getId() ;
>     public abstract void setId(Long id) ;
>     public abstract String getName() ;
>     public abstract void setName(String name) ;
>
> ****************
> * My remote is like:
>
> public interface CodeListsEBRemote extends EJBObject
> ...
>     public Long getId() throws RemoteException;
>     public void setId(Long id) throws RemoteException;
>     public String getName() throws RemoteException;
>     public void setName(String name) throws RemoteException;
>
> ****************
> * My ejb-jar is like:
>  <entity>
>             <description>Entity EJB providing CRUD transactions for
the
> LEADERS CODE_LISTS table</description>
>             <display-name>CodeListsEB</display-name>
>             <ejb-name>CodeListsEB</ejb-name>
>             <home>leader.ejb.entity.CodeListsEBHome</home>
>             <remote>leader.ejb.entity.CodeListsEBRemote</remote>
>
> <local-home>leader.ejb.entity.CodeListsEBLocalHome</local-home>
>             <local>leader.ejb.entity.CodeListsEBLocal</local>
>             <ejb-class>leader.ejb.entity.CodeListsEB</ejb-class>
>             <persistence-type>Container</persistence-type>
>             <abstract-schema-name>CodeLists</abstract-schema-name>
>             <cmp-version>2.x</cmp-version>
>
<prim-key-class>leader.ejb.entity.EntityPK</prim-key-class>
>             <reentrant>False</reentrant>
>
>             <cmp-field><field-name>id</field-name></cmp-field>
>             <cmp-field><field-name>name</field-name></cmp-field>
> ...
>
>             <query>
>                 <description>
>                 </description>
>                 <query-method>
>                     <method-name>findByName</method-name>
>                     <method-params>
>                         <method-param>java.lang.String</method-param>
>                     </method-params>
>                 </query-method>
>                 <ejb-ql>SELECT DISTINCT OBJECT(o) FROM CodeLists AS o
> WHERE o.name = ?1</ejb-ql>
>             </query>
>             <resource-ref>
>                 <res-ref-name>jdbc/MedicalDS</res-ref-name>
>                 <res-type>javax.sql.DataSource</res-type>
>                 <res-auth>Container</res-auth>
>             </resource-ref>
>         </entity>
>
> ****************
> * My orion-ejb-jar is like:
>
> <orion-ejb-jar>
>     <enterprise-beans>
>         <entity-deployment name="CodeListsEB"
> location="leaders/CodeListsEB" table="CODE_LISTS"
> data-source="jdbc/MedicalDS">
>             <primkey-mapping>
>                 <cmp-field-mapping>
>                     <fields>
>                         <cmp-field-mapping name="id"
> persistence-name="ID"/>
>                     </fields>
>                 </cmp-field-mapping>
>             </primkey-mapping>
>             <cmp-field-mapping name="id" persistence-name="ID"/>
>             <cmp-field-mapping name="name" persistence-name="NAME"/>
> ...

Reply via email to