You have a PK class, where you specify the fields (same name inside
bean), that are the PK of your bean.

        If your
<prim-key-class>com.canlink.components.base.GUIDFactoryPK</prim-key-class>
have the fields (with same name of fields inside bean) of your bean,
just remove the xml tag <primkey-field>name</primkey-field>--> (wow
whats is this end comment?)
from your ejb-jar.xml


Claudio Miranda

Chris Evans wrote:
> 
> Hey everybody,
> 
> Has anybody got any ideas about why this won't work.  It's really
> frustrating!!!
> 
> G:\orion>java -jar orion.jar
> Auto-unpacking G:\3.0\rel\guid-factory.ear... done.
> Auto-unpacking G:\3.0\rel\guid-factory\guid-factory-web.war... done.
> Auto-deploying guid-factory (Assembly had been updated)...
> Auto-deploying guid-factory-ejb.jar (No previous deployment found)...
> Error compiling file:/G:/3.0/rel/guid-
> factory/guid-factory-ejb.jar: No direct database fields for primary
> key: bean GUID Factory Bean
> Orion/1.2.9 initialized
> 
> Here's what my ejb-jar.xml file looks like
> 
> <ejb-jar>
>    <description></description>
>    <enterprise-beans>
>       <entity>
>          <description>This bean implements a GUID
> factory</description>
>          <display-name>GUID Factory Bean</display-name>
> 
> <ejb-name>com.canlink.components.base.GUIDFactoryBean</ejb-name>
>          <home>com.canlink.components.base.GUIDFactoryHome</home>
>          <remote>com.canlink.components.base.GUIDFactory</remote>
> 
> <ejb-class>com.canlink.components.base.GUIDFactoryBean</ejb-class>
>          <persistence-type>Container</persistence-type>
> 
> <prim-key-class>com.canlink.components.base.GUIDFactoryPK</prim-key-class>
> 
>          <reentrant>False</reentrant>
>          <cmp-field><field-name>iFactory_ID</field-name></cmp-field>
>          <cmp-field><field-name>city</field-name></cmp-field>

>          <primkey-field>name</primkey-field>-->
                          ^^^^^^
                          remove this tag, because the PK class already
has the primkey-fields.
>       </entity>
>    </enterprise-beans>
>    <assembly-descriptor>
>       <security-role>
>          <description>Users</description>
>          <role-name>users</role-name>
>       </security-role>
>    </assembly-descriptor>
> </ejb-jar>
>

Reply via email to