Re[2]: [JBoss-user] home.create throws an IllegalStateException

2002-02-19 Thread Mikhail Akopov

Hello all

Friday, May 25, 2001, 6:35:04 PM, you wrote:
dDC> Does your bean's ejbCreate return a proper primary key?
dDC> Richard Conway wrote:

>> I too am experiencing this problem. I get...
>> 
>> [DelegateAccountEJBean] java.lang.IllegalStateException: INSERTING AN
>> ALREADY EXISTING BEAN, ID = o18 a0
We met this problem just now with jBoss 2.2.2

We use BMP bean, if we use bean reference got from create, remove
works ok. But if we got that reference from finder, we have INSERTING
AN ALREADY EXISTING BEAN exception.

If it was CMP bean, situation is obvious - we should execute getter
and everything will be ok. But what shpuld we do with BMP bean?


Vale! - Mikhail Akopov


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] home.create throws an IllegalStateException

2001-05-25 Thread Richard Conway


Yes it does.
Note that my application code is unchanged from the code which worked fine
in JBoss 2.0 FINAL. It's only since my upgrade to JBoss 2.2.1 that this
problem has arisen.

Notice also the recent spate of posts similar to mine on the list.

Richard.

-Original Message-
From: danch (Dan Christopherson) [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 25, 2001 4:35 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] home.create throws an IllegalStateException


Does your bean's ejbCreate return a proper primary key?

Richard Conway wrote:

> I too am experiencing this problem. I get...
> 
> [DelegateAccountEJBean] java.lang.IllegalStateException: INSERTING AN
> ALREADY EXISTING BEAN, ID = o18 a0
>  pa16087
> 
> ... when the EJBs create method is called.
> 
> The third parameter in the primary key (pa=16087) is obtained as the
nextval
> from an Oracle sequence before each call to create. Therefore I cannot
> conceive how a bean with that id already exists. Also I checked the Oracle
> sequence by hand and the values being used are as expected.
> 
> Also the problem only occurs after the container has been running for a
few
> hours. If I stop and restart the container then I can successfully execute
> the create method of the EJB.
> 
> Since I am not the only one seeing this problem (there are quite a few
> messages on this subject in the archive) - can someone confirm that this
is
> a bug.
> 
> I have recently upgraded from 2.0 FINAL to 2.2.1 and have only noticed the
> problem since the upgrade.
> 
> Is 2.2.1 a stable release since there seem to be a number of serious
issues
> with it.
> 
> Any help/advice much appreciated.
> 
> Richard.
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 




___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] home.create throws an IllegalStateException

2001-05-25 Thread danch (Dan Christopherson)

Does your bean's ejbCreate return a proper primary key?

Richard Conway wrote:

> I too am experiencing this problem. I get...
> 
> [DelegateAccountEJBean] java.lang.IllegalStateException: INSERTING AN
> ALREADY EXISTING BEAN, ID = o18 a0
>  pa16087
> 
> ... when the EJBs create method is called.
> 
> The third parameter in the primary key (pa=16087) is obtained as the nextval
> from an Oracle sequence before each call to create. Therefore I cannot
> conceive how a bean with that id already exists. Also I checked the Oracle
> sequence by hand and the values being used are as expected.
> 
> Also the problem only occurs after the container has been running for a few
> hours. If I stop and restart the container then I can successfully execute
> the create method of the EJB.
> 
> Since I am not the only one seeing this problem (there are quite a few
> messages on this subject in the archive) - can someone confirm that this is
> a bug.
> 
> I have recently upgraded from 2.0 FINAL to 2.2.1 and have only noticed the
> problem since the upgrade.
> 
> Is 2.2.1 a stable release since there seem to be a number of serious issues
> with it.
> 
> Any help/advice much appreciated.
> 
> Richard.
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 




___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] home.create throws an IllegalStateException

2001-05-25 Thread Richard Conway


I too am experiencing this problem. I get...

[DelegateAccountEJBean] java.lang.IllegalStateException: INSERTING AN
ALREADY EXISTING BEAN, ID = o18 a0
 pa16087

... when the EJBs create method is called.

The third parameter in the primary key (pa=16087) is obtained as the nextval
from an Oracle sequence before each call to create. Therefore I cannot
conceive how a bean with that id already exists. Also I checked the Oracle
sequence by hand and the values being used are as expected.

Also the problem only occurs after the container has been running for a few
hours. If I stop and restart the container then I can successfully execute
the create method of the EJB.

Since I am not the only one seeing this problem (there are quite a few
messages on this subject in the archive) - can someone confirm that this is
a bug.

I have recently upgraded from 2.0 FINAL to 2.2.1 and have only noticed the
problem since the upgrade.

Is 2.2.1 a stable release since there seem to be a number of serious issues
with it.

Any help/advice much appreciated.

Richard.

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] home.create throws an IllegalStateException

2001-05-20 Thread Ferguson, Doug

Hi,

When I call home.create() for my entity bean it behaves just fine under
normal situations. However if I call home.create() serveral times in
succession only the first call will work the others will throw and
IllegalStateException. The exception is getting when becuase the
InstanceCache object finds the id in it's cache..   Which is bizarre because
the I print out the id and it is unique.  Another thing that is bizare is
the message that comes back from the instant cache indicates that the id is
0!

Any ideas?

Stack Trace
***
Login] Found CoreUser interface 
[CoreUserBean] TRANSACTION ROLLBACK EXCEPTION:null; nested exception is: 
javax.ejb.EJBException 
[CoreUserBean] java.lang.IllegalStateException: INSERTING AN ALREADY 
EXISTING BEAN, ID = 0 
[CoreUserBean]  at 
org.jboss.ejb.plugins.AbstractInstanceCache.insert(AbstractInstanceCache.jav
a:207) 
[CoreUserBean]  at 
org.jboss.ejb.plugins.BMPPersistenceManager.createEntity(BMPPersistenceManag
er.java:165) 
[CoreUserBean]  at 
org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:441) 
[CoreUserBean]  at java.lang.reflect.Method.invoke(Native Method) 
[CoreUserBean]  at 
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContaine
r.java:639) 
[CoreUserBean]  at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySync
hronizationInterceptor.java:160) 
[CoreUserBean]  at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInt
erceptor.java:87) 
[CoreUserBean]  at 
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)

[CoreUserBean]  at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:263) 
[CoreUserBean]  at 
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86) 
[CoreUserBean]  at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.jav
a:164) 
[CoreUserBean]  at 
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106) 
[CoreUserBean]  at 
org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:316) 
[CoreUserBean]  at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContai
nerInvoker.java:369) 
[CoreUserBean]  at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContai
nerInvoker.java:423) 
[CoreUserBean]  at 
org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:212) 
[CoreUserBean]  at $Proxy43.create(Unknown Source) 
[CoreUserBean]  at 
com.coremetrics.security.LoginBean.createCoreUser(LoginBean.java:61) 
[CoreUserBean]  at java.lang.reflect.Method.invoke(Native Method) 
[CoreUserBean]  at 
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(Stateles
sSessionContainer.java:472) 
[CoreUserBean]  at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSe
ssionInstanceInterceptor.java:87) 
[CoreUserBean]  at 
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)

[CoreUserBean]  at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:263) 
[CoreUserBean]  at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99) 
[CoreUserBean]  at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:19
0) 
[CoreUserBean]  at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195) 
[CoreUserBean]  at 
org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.jav
a:271) 
[CoreUserBean]  at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerI
nvoker.java:392) 
[CoreUserBean]  at java.lang.reflect.Method.invoke(Native Method) 
[CoreUserBean]  at 
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241) 
[CoreUserBean]  at sun.rmi.transport.Transport$1.run(Transport.java:142) 
[CoreUserBean]  at java.security.AccessController.doPrivileged(Native 
Method) 
[CoreUserBean]  at 
sun.rmi.transport.Transport.serviceCall(Transport.java:139) 
[CoreUserBean]  at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443) 
[CoreUserBean]  at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:6
43) 
[CoreUserBean]  at java.lang.Thread.run(Thread.java:484) 

  

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user