Bugs item #705542, was opened at 2003-03-18 13:53 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=705542&group_id=22866
Category: JBossCMP Group: v3.2 Status: Open Resolution: None Priority: 5 Submitted By: Johan Granlund (johgr814) Assigned to: Nobody/Anonymous (nobody) Summary: Errorenous IllegalStateException on CMR-Collection Initial Comment: We've been dealing with this bug since we started up our project with JBoss 3.0.0. Now we are using JBoss 3.0.2RC2 with Postgres 7.2 and we still get it. When we are using a Collection retrieved with a CMR-getter on a local interface the Collection sporadicly maybe 1 of 200 calls thinks it was created in another transaction that obviously isn't the case. We get a stacktrace like this: 12:21:38,121 ERROR [LogInterceptor] RuntimeException: java.lang.IllegalStateException: The iterator of a CMR collection may only be used within the transction in which it was created at org.jboss.ejb.plugins.cmp.jdbc.bridge.RelationSet$1.verif yIteratorIsValid(RelationSet.java:345) at org.jboss.ejb.plugins.cmp.jdbc.bridge.RelationSet$1.has Next(RelationSet.java:298) at se.alleato.ejb.alexandria.server.facade.PersonFacadeBe an.getNodePersonRoles(PersonFacadeBean.java:318) ... This isn't isolated to any specific bean, instead it occurs on Collection retrieved by local CMP interfaces that are called often. It is obvious an errorenous behaviour that can be worked around by catching the exception and creating the Collection again by calling the getter again which works fine but clearly is anoying. ---------------------------------------------------------------------- >Comment By: Alexey Loubyansky (loubyansky) Date: 2003-04-01 11:27 Message: Logged In: YES user_id=543482 Please, try 3.2.0RC5 from CVS. It should be fixed now. Thanks, alex ---------------------------------------------------------------------- Comment By: Johan Granlund (johgr814) Date: 2003-04-01 10:48 Message: Logged In: YES user_id=509036 Yes I'm using pessimistic locking, never got any performance out of the optimistic. I pretty sure this is a duplicate bug #634910 and in that report there is test case. ---------------------------------------------------------------------- Comment By: Alexey Loubyansky (loubyansky) Date: 2003-03-28 17:17 Message: Logged In: YES user_id=543482 Are you using pessimistic locking? I tried to reproduce it but couldn't. I have a Parent and 1000 of related Child instances. There are 100 concurrent threads that getting parent's children collection and iterate over it. This does not fail for me. If could you provide a testcase that fails even time to time that would be great. alex ---------------------------------------------------------------------- Comment By: Johan Granlund (johgr814) Date: 2003-03-28 12:15 Message: Logged In: YES user_id=509036 I'm using "Required" transaction setting. The error occurs no matter what commit option I'm using. I don't think any special use case is required to reproduce it, just specify two entity beans A 1-n B. Create one session bean that fetches the collection a.getBs() and iterate over it. With some load the error will occur. ---------------------------------------------------------------------- Comment By: Johan Granlund (johgr814) Date: 2003-03-28 12:06 Message: Logged In: YES user_id=509036 Sorry about that, 3.2.0RC2 it was, and now 3.2.0RC4. I can also add that the easiest way to reproduce the bug is to put load on the system, then you can be sure it will happen, in our case it starts around 15 simultanous users. To work around the problem I have patched the RelationSet class. In the constructor I copy the setHandle array to the member variable instead of assigning it. This makes everything work fine but clearly isn't the correct way. ---------------------------------------------------------------------- Comment By: Stephen Coy (scoy) Date: 2003-03-28 11:30 Message: Logged In: YES user_id=463096 Are you *really* using JBoss 3.0.2RC2? Or is it 3.2.0RC2? Either way, you need to provide more information wrt to the way you are specifying your transactions and your use cases. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=705542&group_id=22866 ------------------------------------------------------- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development