Hi,

I'm trying to migrate my application from oc4j and I'm getting this warning:
18:18:40,116 WARN  [verifier] EJB spec violation: 
Bean   : ObjectDec
Section: 9.2.9
Warning: The primary key class must override equals().

18:18:40,116 WARN  [verifier] EJB spec violation: 
Bean   : ObjectDec
Section: 9.2.9
Warning: The primary key class must override hashCode().

18:18:40,178 ERROR [MainDeployer] Could not create deployment: 
file:/C:/jboss/jboss-4.2.2.GA/server/default/tmp/deploy/tmp30525pegasus.ear-contents/ejbs.jar
org.jboss.deployment.DeploymentException: Verification of Enterprise Beans 
failed, see above for error messages.

I don't have any errors displayed except from this warning.

the definition in ejb-jar.xml is:

                        
                                Entity Bean ( Container-managed Persistence )
                        
                        <display-name>ObjectDec</display-name>
                        <ejb-name>ObjectDec</ejb-name>
                        
                                com.x.ms.core.managed.impl.IObjectDecHome
                        
                        
                                com.x.ms.core.managed.impl.IObjectDec
                        
                        <ejb-class>
                                com.x.ms.core.managed.impl.ObjectDecBean
                        </ejb-class>
                        <persistence-type>Container</persistence-type>
                        <prim-key-class>
                                com.x.ms.core.managed.impl.ObjectDecPK
                        </prim-key-class>
                        False
                        <cmp-field>
                                <field-name>assocType</field-name>
                        </cmp-field>
                        <cmp-field>
                                <field-name>secondObjOID</field-name>
                        </cmp-field>
                        <cmp-field>
                                <field-name>firstObjOID</field-name>
                        </cmp-field>
                

in ObjectDecPK I do have the equals and the hashCode override methods.

Can someone know what can be the problem? should I define the methods and the 
queries in jaws.xml? or in jbosscmp-jdbc.xml? 
I have this definition in oc4j orion-ejb-jar.xml: (should I migrate it to the 
jboss xmls? how?).

Thanks for the help,
shi

<orion-ejb-jar>
        <enterprise-beans>
<entity-deployment max-instances="0" 
                        name="ObjectDec" copy-by-value="false"
                        exclusive-write-access="false" 
                        table="MSM_OBJECT_ASSOCIATION">
                        <primkey-mapping>
                                <cmp-field-mapping name="firstObjOID"
                                        persistence-name="FIRSTOBJOID" 
persistence-type="VARCHAR(255)" />
                        </primkey-mapping>
                        <cmp-field-mapping name="firstObjOID"
                                persistence-name="FIRSTOBJOID" 
persistence-type="VARCHAR(255)" />
                        <cmp-field-mapping name="assocType"
                                persistence-name="ASSOCTYPE" 
persistence-type="VARCHAR(255)" />
                        <cmp-field-mapping name="secondObjOID"
                                persistence-name="SECONDOBJOID" 
persistence-type="VARCHAR(255)" />
                        <finder-method partial="True" query="$firstObjOID = $1">
                                
                                        <ejb-name>ObjectDec</ejb-name>
                                        
<method-name>findByFirstObject</method-name>
                                        <method-params>
                                                
<method-param>java.lang.String</method-param>
                                        </method-params>
                                
                        </finder-method>
                        <finder-method partial="True" query="$secondObjOID = 
$1">
                                
                                        <ejb-name>ObjectDec</ejb-name>
                                        
<method-name>findBySecondObject</method-name>
                                        <method-params>
                                                
<method-param>java.lang.String</method-param>
                                        </method-params>
                                
                        </finder-method>
                </entity-deployment>
...
</orion-ejb-jar>

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148732#4148732

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148732
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to