0

I get the following error in my application:

2012-04-27 12:29:07,623 4540114 DEBUG [org.jboss.seam.jsf.SeamPhaseListener] (http-localhost%2F127.0.0.1-8080-3:) committing transaction after phase: INVOKE_APPLICATION 5
2012-04-27 12:29:07,623 4540114 DEBUG [org.jboss.seam.transaction.UTTransaction] (http-localhost%2F127.0.0.1-8080-3:) committing JTA transaction
2012-04-27 12:29:07,624 4540115 ERROR [org.jboss.aspects.tx.TxPolicy] (http-localhost%2F127.0.0.1-8080-3:) javax.ejb.NoSuchEJBException: Could not find stateful bean: a2d6v-rpg5ad-h1j0xu2n-1-h1j3g9no-cb
2012-04-27 12:29:07,624 4540115 WARN  [org.jboss.seam.jsf.SeamPhaseListener] (http-localhost%2F127.0.0.1-8080-3:) uncaught exception, passing to exception handler
java.lang.IllegalStateException: Could not commit transaction
    at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:625)

While debugging I was successful in the application part and when it came to page redirect, this error occurs.

Can someone give me some pointers as to where it could be wrong?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
JenRajesh
  • 1
  • 1
  • 1

1 Answers1

0

I just had a similar problem, and it was all to do with the timeouts for the bean themselves.

You can either set timeouts on the stateful bean itself with the annotation

@CacheConfig (maxSize=100000, idleTimeoutSeconds=300, removalTimeoutSeconds=0)

Or by setting JBOSS_HOME\server\default\conf\standardjboss.xml to:

<container-configuration>
      <container-name>Standard Stateful SessionBean</container-name>
      ...
      <container-cache-conf>
        ...
        <cache-policy-conf>              
          <remover-period>0</remover-period>
          <max-bean-life>900</max-bean-life>

Where the parameters given are seconds.
I personally changed the standardjboss.xml to make it global. I made the remover-period 0 so that it's set to infinty. If it is less that the max bean life, then it's state will be removed you will get javax.ejb.NoSuchEJBException if the bean has not been touched. Also worth checking you actually need a stateful bean hanging around.

https://community.jboss.org/wiki/howdothetimeoutsworkwithejb3statefulbeans

https://community.jboss.org/wiki/JbossTimeoutSettingForSeam

http://docs.jboss.org/seam/2.2.2.Final/reference/en-US/html_single/#d0e25223

enkor
  • 7,527
  • 3
  • 31
  • 55