Indika,

Indika Fernando wrote:
> 
> NEDD A QUICK REPLY
> TIA.

Aren't you afraid of getting answer like "Read a book!"
or "NEDD A QUICK PAY". 

But seriously, I suppose that jboss didn't ask for a hashcode
field, it's just complaining that hashCode() is missing or
incorrect. jboss checks something like

YourPK pk1 = new YourPK();
YourPk pk2 = new YourPK();

if ( !pk1.equals(pk2) || pk1.hashCode != pk2.hashCode() )
{
    throw new ComplainException();
}

In this case (assuming from your code) if you have

public class YourPK
{
   public String userID;
   public String listID;

   public YourPK() {}
   ....
}

the ComplainException will be thrown.

You may correct it by explicitly defining
userID & listID in default constructor,
like

public YourPK()
{
   userID = "";
   listID = "";
}

Hope this helps.

Best,







Indika Fernando wrote:
> 
> the hashcode() method is included in my PK class,
> public int hashCode()
>  {
>         StringBuffer strBuff = new StringBuffer( );
>         strBuff.append(userID);
>         strBuff.append(listID);
> 
>   String str = strBuff.toString();
>         int hashCode = str.);
>   return hashCode;
>     }
> 
> When deploying using jboss it asks for a hashcode field ,I included it in
> the Bean as well as in the deployment descriptor. I had to include a
> hashcode field too in my table. Now my beans are working and I dont knpw why
> this hashCode is needed in the table..The other problem is what should I
> have for hashcode field when inserting records..
> NEDD A QUICK REPLY
> TIA.
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> List Help?:          [EMAIL PROTECTED]

-- 
__________________________________________________
Alexander Kogan  PTC   www.ptc.com
[EMAIL PROTECTED]    140 Kendrick St. Needham MA 02494


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to