javax.ejb。NoSuchEJBException:找不到有状态bean

时间:2022-04-06 20:00:08

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?

有人能给我指点一下哪里出了问题吗?

1 个解决方案

#1


0  

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

我刚刚遇到了类似的问题,这都与bean本身的超时有关。

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

您可以使用注释设置有状态bean本身的超时

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

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

或通过设置JBOSS_HOME \ server \ default \ conf \ standardjboss。xml:

<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.

其中给定的参数是秒。我个人改变了标准老板。xml使其全球化。我把移动周期设为0这样它就被设为无穷大。如果最大bean的生命周期更短,那么它的状态将被删除,您将获得javax.ejb。如果该bean没有被碰过,则进行NoSuchEJBException。同样值得检查的是,您实际上需要一个有状态bean。

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

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

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

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

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

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

#1


0  

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

我刚刚遇到了类似的问题,这都与bean本身的超时有关。

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

您可以使用注释设置有状态bean本身的超时

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

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

或通过设置JBOSS_HOME \ server \ default \ conf \ standardjboss。xml:

<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.

其中给定的参数是秒。我个人改变了标准老板。xml使其全球化。我把移动周期设为0这样它就被设为无穷大。如果最大bean的生命周期更短,那么它的状态将被删除,您将获得javax.ejb。如果该bean没有被碰过,则进行NoSuchEJBException。同样值得检查的是,您实际上需要一个有状态bean。

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

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

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

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

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

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