0 Replies Latest reply on May 6, 2008 2:23 AM by shlomit peled

    Erron in deployment while migrating from oc4j to jboss

    shlomit peled Newbie

      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>