我遇到Tomcat和Spring在Glasfish服务器中查找ejb的问题
这里是加载的ejb-services.xml:
...
<jee:jndi-lookup id="inscriptionService"
jndi-name="java:global/MAS/MwpServices/InscriptionService!com.mob.pay.webportal.InscriptionRemote"
expected-type="com.mob.pay.webportal.InscriptionRemote" />
并且Glassfish向我提供了以下jndi名称,我将其放在上面的代码中:
INFO: Portable JNDI names for EJB InscriptionService : [java:global/MAS/MwpServices/InscriptionService, java:global/MAS/MwpServices/InscriptionService!com.mob.pay.webportal.InscriptionRemote]
当运行tomcat时,我收到以下错误:
12:08:22,206 ERROR [ContextLoader:220] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'inscriptionService': Invocation of init method failed; nested exception is
javax.naming.NameNotFoundException: Name
[global/MAS/MwpServices/InscriptionService!com.mob.pay.webportal.InscriptionRemote] is not bound in this Context. Unable to find [global].