Unable to passivate due to ctx lock warning on JBoss 4.0.2

Discussion in 'Java' started by =?ISO-8859-2?Q?Horv=E1th_Andr=E1s?=, Nov 30, 2005.

  1. Hi all!

    I have a strange problem, I can't solve. I have a J2EE application using
    EJBs. Sometimes (it's non determinal :( ), when I use an entity bean
    from a session bean (I call a getter method on it) I get an error:

    2005-09-12 06:05:00,011 WARN [org.jboss.tm.TransactionImpl] Transaction
    TransactionImpl:XidImpl[FormatId=257, GlobalId=iadd/27838, BranchQual=,
    localId=27838] timed out. status=STATUS_ACTIVE
    2005-09-12 06:08:12,007 ERROR [org.jboss.ejb.plugins.LogInterceptor]
    TransactionRolledbackLocalException in method: public abstract long
    com.astron.iadd.server.ejb.interfaces.entity.KDSZEventLocal.getBegin(),
    causedBy:
    javax.transaction.RollbackException: Already marked for rollback
    TransactionImpl:XidImpl[FormatId=257, GlobalId=iadd/27838, BranchQual=,
    localId=27838]
    at
    org.jboss.tm.TransactionImpl.registerSynchronization(TransactionImpl.java:602)
    at
    org.jboss.ejb.plugins.EntitySynchronizationInterceptor.register(EntitySynchronizationInterceptor.java:149)
    at
    org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:269)
    at
    org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
    at
    org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:111)
    at
    org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:242)
    at
    org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:89)
    at
    org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:53)
    at
    org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
    at
    org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
    at
    org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:363)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
    at
    org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:139)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
    at
    org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
    at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:514)
    at org.jboss.ejb.Container.invoke(Container.java:873)
    at
    org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:413)
    at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:50)
    at $Proxy296.getBegin(Unknown Source)
    at
    com.astron.iadd.server.ejb.beans.facade.KDSZManagerBean.getEvents(KDSZManagerBean.java:752)
    at sun.reflect.GeneratedMethodAccessor438.invoke(Unknown Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    After this the program works fine, but there is a warning in every five
    minute after the error:

    2005-09-12 03:55:33,925 WARN
    [org.jboss.ejb.plugins.AbstractInstanceCache] Unable to passivate due to
    ctx lock, id=944

    It's strange to me, because when I use the "local" EJB, it's in the
    memory already. So what's the problem with simply calling a getter
    method on it? This problem only occours at this point of code, but it
    doesn't differ from other entity-bean handlings.

    // ...
    Collection events = getKDSZEventLocalHome().findBy( begin, end, new
    Long(type) );
    Iterator it = events.iterator();
    while ( it.hasNext() ) {
    eventLocal = (KDSZEventLocal)it.next();
    if ( eventLocal.getBegin() == 0 && ( eventLocal.getPlBegin() >= end
    || eventLocal.getPlEnd() < begin) ) continue;
    // ...

    regards
    Andrew Horvath
    =?ISO-8859-2?Q?Horv=E1th_Andr=E1s?=, Nov 30, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fuzzyman
    Replies:
    3
    Views:
    476
    Andrew MacIntyre
    Dec 5, 2003
  2. Robert Brewer
    Replies:
    0
    Views:
    478
    Robert Brewer
    Dec 5, 2003
  3. Fresh
    Replies:
    2
    Views:
    619
    Bo Persson
    Apr 22, 2008
  4. Ganapathi sundaram
    Replies:
    0
    Views:
    721
    Ganapathi sundaram
    Mar 12, 2009
  5. Replies:
    0
    Views:
    154
Loading...

Share This Page