Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsf javax.ejb.NoSuchEJBException:找不到有状态bean_Jsf_Jakarta Ee_Ejb_Seam - Fatal编程技术网

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

Jsf javax.ejb.NoSuchEJBException:找不到有状态bean,jsf,jakarta-ee,ejb,seam,Jsf,Jakarta Ee,Ejb,Seam,我的应用程序中出现以下错误: 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.transactio

我的应用程序中出现以下错误:

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)
在应用程序部分调试成功时,当涉及到页面重定向时,会发生此错误


有人能告诉我哪里可能是错的吗

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

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

@CacheConfig (maxSize=100000, idleTimeoutSeconds=300, removalTimeoutSeconds=0)
或者将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>
其中给出的参数为秒。 我个人更改了standardjboss.xml,使其全球化。我将移除周期设置为0,以便将其设置为infinty。如果它小于最大bean寿命,那么它的状态将被删除。如果未触及该bean,您将获得javax.ejb.NoSuchEJBException。 同样值得检查的是,您实际上需要一个有状态的bean