I'll add the hint to the exception....This is already in the troubleshooting
doc I sent around that will be in the doc subscription soon.

Bill

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Dain
> Sundstrom
> Sent: Wednesday, July 10, 2002 6:55 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] Error using Custom Primary Key class in JBOSS
> 3, cmp 2 + Hypersonic
>
>
> Bill this is always a problem with a custom primary key.  Maybe you
> should add a hint to the exception message.   This is definitely a faq
> question.
>
> -dain
>
> Bill Burke wrote:
> > Good catch Dain!  Didn't see that at first and was shitting in my pants.
> > That's probably the problem Kumar.  Let us know!!!
> >
> > Bill
> >
> >
> >>-----Original Message-----
> >>From: [EMAIL PROTECTED]
> >>[mailto:[EMAIL PROTECTED]]On Behalf Of Dain
> >>Sundstrom
> >>Sent: Wednesday, July 10, 2002 2:27 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: Re: [JBoss-user] Error using Custom Primary Key class in JBOSS
> >>3, cmp 2 + Hypersonic
> >>
> >>
> >>Everything looks good except you spelled hashCode incorrectly.
> You have:
> >>
> >>public int HashCode()
> >>{
> >>    return customerId.hashCode();
> >>}
> >>
> >>You should have:
> >>
> >>public int hashCode()
> >>{
> >>    return customerId.hashCode();
> >>}
> >>
> >>-dain
> >>
> >>Saroj Kumar wrote:
> >>
> >>>Hi All,
> >>>
> >>>
> >>>When I am using Custom Primary key with JBOSS 3 , CMP2 with HYPERSONIC
> >>>then this error I am getting :
> >>>
> >>>This is the full stack trace ...
> >>>
> >>> [java] java.rmi.ServerException: RemoteException occurred in server
> >>>thread; nested exception is:
> >>> [java] Caught an unexpected exception while making contract!
> >>> [java]     java.rmi.ServerException: removing bean lock and it has tx
> >>>set!; nested exception is:
> >>> [java]     java.lang.IllegalStateException: removing bean lock and it
> >>>has tx set!
> >>> [java]     at
> >>>sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
> >>> [java]     at sun.rmi.transport.Transport$1.run(Transport.java:148)
> >>> [java]     at java.security.AccessController.doPrivileged(Native
> >>>Method)
> >>> [java]     at
> >>>sun.rmi.transport.Transport.serviceCall(Transport.java:144)
> >>> [java]     at
> >>>sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.
> java:460)
> >>> [java]     at
> >>>sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTra
> nsport.ja
> >>>va:701)
> >>> [java]     at java.lang.Thread.run(Thread.java:536)
> >>> [java]     at
> >>>sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(
> StreamRem
> >>>oteCall.java:247)
> >>> [java]     at
> >>>sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall
> .java:223
> >>>)
> >>> [java]     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
> >>> [java]     at
> >>>org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknow
> n Source)
> >>> [java]     at
> >>>org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JR
> MPInvoker
> >>>Proxy.java:128)
> >>> [java]     at
> >>>org.jboss.invocation.InvokerInterceptor.invoke(InvokerIntercept
> or.java:1
> >>>08)
> >>> [java]     at
> >>>org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterc
> eptor.jav
> >>>a:73)
> >>> [java]     at
> >>>org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
> >>> [java]     at
> >>>org.jboss.proxy.ejb.EntityInterceptor.invoke(EntityInterceptor.
> java:116)
> >>> [java]     at
> >>>org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
> >>> [java]     at $Proxy1.getCustomerId(Unknown Source)
> >>> [java]     at test_ejbs.make_Customer(test_ejbs.java:84)
> >>> [java]     at test_ejbs.<init>(test_ejbs.java:43)
> >>> [java]     at test_ejbs.main(test_ejbs.java:101)
> >>> [java] Caused by: java.rmi.ServerException: removing bean lock and it
> >>>has tx set!; nested exception is:
> >>> [java]     java.lang.IllegalStateException: removing bean lock and it
> >>>has tx set!
> >>> [java]     at
> >>>org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(Abstract
> TxInterce
> >>>ptor.java:119)
> >>> [java]     at
> >>>org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIn
> terceptor
> >>>CMT.java:167)
> >>> [java]     at
> >>>org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)
> >>> [java]     at
> >>>org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterc
> eptor.jav
> >>>a:129)
> >>> [java]     at
> >>>org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
> >>> [java]     at
> >>>org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:493)
> >>> [java]     at org.jboss.ejb.Container.invoke(Container.java:705)
> >>> [java]     at
> >>>org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055)
> >>> [java]     at
> >>>org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
> >>> [java]     at
> >>>org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker
> .java:362
> >>>)
> >>> [java]     at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown
> >>>Source)
> >>> [java]     at
> >>>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMetho
> dAccessor
> >>>Impl.java:25)
> >>> [java]     at java.lang.reflect.Method.invoke(Method.java:324)
> >>> [java]     at
> >>>sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
> >>> [java]     at sun.rmi.transport.Transport$1.run(Transport.java:148)
> >>> [java]     at java.security.AccessController.doPrivileged(Native
> >>>Method)
> >>> [java]     at
> >>>sun.rmi.transport.Transport.serviceCall(Transport.java:144)
> >>> [java]     at
> >>>sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.
> java:460)
> >>> [java]     at
> >>>sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTra
> nsport.ja
> >>>va:701)
> >>> [java]     at java.lang.Thread.run(Thread.java:536)
> >>> [java] Caused by: java.lang.IllegalStateException: removing bean lock
> >>>and it has tx set!
> >>> [java]     at
> >>>org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.removeRef(Q
> ueuedPess
> >>>imisticEJBLock.java:469)
> >>> [java]     at
> >>>org.jboss.ejb.BeanLockManager.removeLockRef(BeanLockManager.java:78)
> >>> [java]     at
> >>>org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockIn
> terceptor
> >>>.java:124)
> >>> [java]     at
> >>>org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCr
> eationInt
> >>>erceptor.java:69)
> >>> [java]     at
> >>>org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(Abstract
> TxInterce
> >>>ptor.java:96)
> >>> [java]     ... 19 more
> >>>
> >>>****************************
> >>>** CustomPK                 ***
> >>>****************************
> >>>
> >>>I am using CustomPK like this:
> >>>import java.io.*;
> >>>
> >>>public class CustomerPK implements Serializable
> >>>{
> >>>   public String customerId ;
> >>>
> >>>   public CustomerPK()
> >>>   {
> >>>
> >>>   }
> >>>
> >>>   public CustomerPK(String customerId)
> >>>   {
> >>>           this.customerId = customerId;
> >>>   }
> >>>
> >>>   public String toString()
> >>>   {
> >>>           return  customerId.toString();
> >>>   }
> >>>
> >>>   public int HashCode()
> >>>   {
> >>>           return customerId.hashCode();
> >>>   }
> >>>
> >>>   public boolean equals(Object obj)
> >>>   {
> >>>           if (obj instanceof CustomerPK)
> >>>           {
> >>>                   CustomerPK c = (CustomerPK)obj;
> >>>
> >>>                   if (c.customerId == null)
> >>>                   {
> >>>                           return customerId == null;
> >>>                   }
> >>>
> >>>                   return c.customerId.equals(customerId);
> >>>           }
> >>>
> >>>           return false;
> >>>   }
> >>>
> >>>}
> >>>
> >>>
> >>>TIA,
> >>>Saroj
> >>>
> >>>
> >>>
> >>>
> >>>-------------------------------------------------------
> >>>This sf.net email is sponsored by:ThinkGeek
> >>>Two, two, TWO treats in one.
> >>>http://thinkgeek.com/sf
> >>>_______________________________________________
> >>>JBoss-user mailing list
> >>>[EMAIL PROTECTED]
> >>>https://lists.sourceforge.net/lists/listinfo/jboss-user
> >>
> >>
> >>
> >>-------------------------------------------------------
> >>This sf.net email is sponsored by:ThinkGeek
> >>Two, two, TWO treats in one.
> >>http://thinkgeek.com/sf
> >>_______________________________________________
> >>JBoss-user mailing list
> >>[EMAIL PROTECTED]
> >>https://lists.sourceforge.net/lists/listinfo/jboss-user
> >
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Two, two, TWO treats in one.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
> --
> xxxxxxxxxxxxxxxxxxxxxxxx
> Dain Sundstrom
> Chief Architect JBossCMP
> JBoss Group, LLC
> xxxxxxxxxxxxxxxxxxxxxxxx
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Two, two, TWO treats in one.
> http://thinkgeek.com/sf
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Two, two, TWO treats in one.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to