jboss jms 超难问题,也是超让人难以理解的问题,

tonybin 2004-07-30 04:07:24
在-ejb中发布一个topic jms ,在另一个类中进行消费,但报如下错
2004-07-30 15:17:29,351 ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBException, causedBy:
javax.naming.NamingException: Could not dereference object. Root exception is
javax.naming.NameNotFoundException: wfm.topic.wfmcore.EventService not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
at org.jnp.server.NamingServer.lookup(NamingServer.java:256)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:528)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:964)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:613)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:642)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at cn.newfm.util.tools.EJBUtil.lookupJNDIEntry(EJBUtil.java:137)
at cn.newfm.workflow.wfmcore.ejbs.admin.WorkflowEngineEJB.ejbCreate(WorkflowEngineEJB.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.ejb.StatelessSessionEnterpriseContext.<init>(StatelessSessionEnterpriseContext.java:52)
at org.jboss.ejb.plugins.StatelessSessionInstancePool.create(StatelessSessionInstancePool.java:35)
at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.
但是我在jboss的 log中已经发现了如下记录,请问为何
7-30 15:17:22,401 DEBUG [org.jboss.ejb.StatelessSessionContainer] TCL: org.jboss.util.loading.DelegatingClassLoader@146ad8b
2004-07-30 15:17:22,401 DEBUG [org.jboss.ejb.StatelessSessionContainer] Binding env-entry: GlobalConnectionFactoryName of type: java.lang.String to value:ConnectionFactory
2004-07-30 15:17:22,401 DEBUG [org.jboss.ejb.StatelessSessionContainer] Binding env-entry: GlobalEventQueueName of type: java.lang.String to value:topic/wfm.topic.wfmcore.EventService
2004-07-30 15:17:22,401 DEBUG [org.jboss.ejb.StatelessSessionContainer] Binding an EJBReference ejb/KeyGen
2004-07-30 15:17:22,401 DEBUG [org.jboss.ejb.StatelessSessionContainer] Binding ejb/KeyGen to ejb-link: KeyGen -> wfm.jndi.util-lib.KeyGen
2004-07-30 15:17:22,411 DEBUG [org.jboss.ejb.StatelessSessionContainer] Binding an EJBReference ejb/Configuration
2004-07-30 15:17:22,411 DEBUG [org.jboss.ejb.StatelessSessionContainer] Binding ejb/Configuration to ejb-link: ConfigurationBean -> ConfigurationBean
2004-07-30 15:17:22,411 DEBUG [org.jboss.ejb.StatelessSessionContainer] Binding an EJBReference ejb/WorkflowEngine
2004-07-30 15:17:22,411 DEBUG [org.jboss.ejb.StatelessSessionContainer] Binding ejb/WorkflowEngine to ejb-link: WorkflowEngine -> wfm.jndi.workflow.Engine
2004-07-30 15:17:22,411 DEBUG [org.jboss.ejb.StatelessSessionContainer] Binding an EJBReference ejb/ProcessDirectory
2004-07-30 15:17:22,411 DEBUG [org.jboss.ejb.StatelessSessionContainer] Binding ejb/ProcessDirectory to ejb-link: ProcessDirectory -> ProcessDirectory
2004-07-30 15:17:22,411 DEBUG [org.jboss.ejb.StatelessSessionContainer] Binding an EJBReference ejb/ProcessDefinitionDirectory
2004-07-30 15:17:22,411 DEBUG [org.jboss.ejb.StatelessSessionContainer] Binding ejb/ProcessDefinitionDirectory to ejb-link: ProcessDefinitionDirectory -> ProcessDefinitionDirectory
2004-07-30 15:17:22,411 DEBUG [org.jboss.ejb.StatelessSessionContainer] Binding resource manager: jms/EventService to JDNI ENC as: topic/wfm.topic.wfmcore.EventService
2004-07-30 15:17:22,421 DEBUG [org.jboss.ejb.StatelessSessionContainer] Binding resource manager: jms/TCF to JDNI ENC as: java:/JmsXA
2004-07-30 15:17:22,421 DEBUG [org.jboss.ejb.StatelessSessionContainer] Binding resource manager: jdbc/WfEngine to JDNI ENC as: java:/JwfmDS
2004-07-30 15:17:22,421 DEBUG [org.jboss.ejb.StatelessSessionContainer] Binding resource manager: mail/WfEngine to JDNI ENC as: java:/JwfmMail
2004-07-30 15:17:22,421 DEBUG [org.jboss.ejb.StatelessSessionContainer] Binding resource manager: jms/TCFRemote to JDNI ENC as: ConnectionFactory
2004-07-30 15:17:22,421 DEBUG [org.jboss.ejb.StatelessSessionContainer] End java:comp/env for EJB: WorkflowEngine
2004-07-30 15:17:22,421 DEBUG [org.jboss.ejb.plugins.local.BaseLocalProxyFactory] WorkflowEngine cannot be Bound, doesn't have local and local home interfaces
2004-07-30 15:17:22,441 DEBUG [org.jboss.proxy.ejb.ProxyFactory] (re-)Binding Home wfm.jndi.workflow.Engine
我的ejb-jar.xml中是如下写的
<env-entry>
<env-entry-name>GlobalEventQueueName</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>topic/wfm.topic.wfmcore.EventService</env-entry-value>
</env-entry>
<ejb-ref>
<ejb-ref-name>ejb/Configuration</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>cn.newfm.workflow.wfmcore.ejbs.admin.ConfigurationHome</home>
<remote>cn.newfm.workflow.wfmcore.ejbs.admin.Configuration</remote>
<ejb-link>ConfigurationBean</ejb-link>
</ejb-ref>
<ejb-ref>
<ejb-ref-name>ejb/ProcessDefinitionDirectory</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>cn.newfm.workflow.wfmcore.ejbs.admin.ProcessDefinitionDirectoryHome</home>
<remote>cn.newfm.workflow.wfmcore.ejbs.admin.ProcessDefinitionDirectory</remote>
<ejb-link>ProcessDefinitionDirectory</ejb-link>
</ejb-ref>
<ejb-ref>
<ejb-ref-name>ejb/ProcessDirectory</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>cn.newfm.workflow.wfmcore.ejbs.admin.ProcessDirectoryHome</home>
<remote>cn.newfm.workflow.wfmcore.ejbs.admin.ProcessDirectory</remote>
<ejb-link>ProcessDirectory</ejb-link>
</ejb-ref>
<ejb-ref>
<ejb-ref-name>ejb/WorkflowEngine</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>cn.newfm.workflow.wfmcore.ejbs.admin.WorkflowEngineHome</home>
<remote>cn.newfm.workflow.wfmcore.ejbs.admin.WorkflowEngine</remote>
<ejb-link>WorkflowEngine</ejb-link>
</ejb-ref>
<ejb-ref>
<ejb-ref-name>ejb/KeyGen</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>cn.newfm.util.ejbs.KeyGenHome</home>
<remote>cn.newfm.util.ejbs.KeyGen</remote>
<ejb-link>KeyGen</ejb-link>
</ejb-ref>
<resource-ref>
<res-ref-name>jdbc/WfEngine</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<res-ref-name>mail/WfEngine</res-ref-name>
<res-type>javax.mail.Session</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<res-ref-name>jms/TCFRemote</res-ref-name>
<res-type>javax.jms.TopicConnectionFactory</res-type>
<res-auth>Application</res-auth>
</resource-ref>
<resource-ref>
<res-ref-name>jms/TCF</res-ref-name>
<res-type>javax.jms.TopicConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<res-ref-name>jms/EventService</res-ref-name>
<res-type>javax.jms.Topic</res-type>
<res-auth>Container</res-auth>
</resource-ref>
在类中是如下java:comp/env/jms/EventService
请问可能是哪地方出错?
...全文
148 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
tonybin 2004-07-30
  • 打赏
  • 举报
回复
自已顶了,难道高手都。。。。

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧