1

我正在尝试在 JBoss 6 上部署一个简单的“hello world”Seam 应用程序,但在日志中出现以下错误:

Deployment "jboss.ejb3:application=helloworld,component=TimerServiceDispatcher,module=jboss-seam,service=EjbEncFactory" is in error due to the following reason(s): Described
Deployment "org.jboss.ejb.bean.instantiator/helloworld/jboss-seam/TimerServiceDispatcher" is in error due to the following reason(s): ** NOT FOUND Depends on 'org.jboss.ejb.bean.instantiator/helloworld/jboss-seam/TimerServiceDispatcher' **
Deployment "jboss.naming:application=helloworld,component=TimerServiceDispatcher,module=jboss-seam" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.naming:application=helloworld,component=TimerServiceDispatcher,module=jboss-seam' **
Deployment "org.jboss.ejb.bean.instantiator/helloworld/jboss-seam/EjbSynchronizations" is in error due to the following reason(s): ** NOT FOUND Depends on 'org.jboss.ejb.bean.instantiator/helloworld/jboss-seam/EjbSynchronizations' **
Deployment "jboss.ejb3:application=helloworld,component=EjbSynchronizations,module=jboss-seam,service=EjbEncFactory" is in error due to the following reason(s): Described
Deployment "jboss.naming:application=helloworld,component=EjbSynchronizations,module=jboss-seam" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.naming:application=helloworld,component=EjbSynchronizations,module=jboss-seam' **

显然部署过程找不到TimerServiceDispatcherand EjbSynchronizations,但我将它们注册在web.xml

 <ejb-local-ref>
    <ejb-ref-name>helloworld/EjbSynchronizations/local</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>org.jboss.seam.transaction.LocalEjbSynchronizations</local>
    <ejb-link>EjbSynchronizations</ejb-link>
  </ejb-local-ref>

  <ejb-local-ref>
    <ejb-ref-name>helloworld/TimerServiceDispatcher/local</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>org.jboss.seam.async.LocalTimerServiceDispatcher</local>
    <ejb-link>TimerServiceDispatcher</ejb-link>
  </ejb-local-ref>

我做错了什么,或者我错过了什么?并注意部署者在寻找组件/helloworld/jboss-seam/TimerServiceDispatcher而不是寻找组件/helloworld/TimerServiceDispatcher(与 相同EjbSynchronizations

4

1 回答 1

0

找到了解决办法,是包装的问题。该jboss-seam.jar库位于.ear项目文件内的 lib 目录中;这在 JBoss 6 中不再有效,因为该文件现在必须位于.ear. 此外,必须相应调整jboss-seam.jarin的位置。application.xml

于 2011-04-03T18:25:32.710 回答