Testei, e se o war com o serlvet que esta injetando estiver no mesmo ear do ejb e do “client”(intefaces) injeta, porém se eu criar um war dentro de outro ear(no mesmo servidor), não sobe o servidor, da erro de ejb-ref, eu tentei “linkar” de todas as formas dentro do web.xml
<ejb-local-ref>
<ejb-ref-name>HelloWorld</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>../HelloWorld#com.upog.demo.HelloWorld</local>
<ejb-link>HelloWorld</ejb-link>
</ejb-local-ref>
ou
<ejb-local-ref>
<ejb-ref-name>HelloWorld</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>HelloWorld#com.upog.demo.HelloWorld</local>
<ejb-link>HelloWorld</ejb-link>
</ejb-local-ref>
ou
<ejb-local-ref>
<ejb-ref-name>HelloWorld</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>HelloWorld</local>
<ejb-link>HelloWorld</ejb-link>
</ejb-local-ref>
Enfim, da o seguinte erro sempre:
<13/06/2013 17h12min21s BRT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "1371154340877" for task "0". Error is: "weblogic.application.ModuleException: Could not setup environment"
weblogic.application.ModuleException: Could not setup environment
at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1693)
at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:763)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:192)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:187)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
Truncated. see log file for complete stacktrace
Caused By: weblogic.application.naming.ReferenceResolutionException: [J2EE:160200]Error resolving ejb-ref "HelloWorld#com.upog.demo.HelloWorld" from module "ForaDoEarDoEjbDynamicWar.war" of application "ForaDoEarDoEjb". The ejb-ref does not have an ejb-link and the JNDI name of the target bean has not been specified. Attempts to automatically link the ejb-ref to its target bean failed because no EJBs in the application were found to implement the "com.upog.demo.HelloWorld" interface. Link or map this ejb-ref to its target EJB and ensure the interfaces declared in the ejb-ref are correct.
at weblogic.application.naming.EnvUtils.findInfo(EnvUtils.java:832)
at weblogic.application.naming.EnvUtils.findInfoByReferenceClass(EnvUtils.java:783)
at weblogic.application.naming.EjbReferenceResolver.resolveEjbRef(EjbReferenceResolver.java:92)
at weblogic.application.naming.EjbReferenceResolver.resolve(EjbReferenceResolver.java:71)
at weblogic.application.naming.EjbReferenceResolver.get(EjbReferenceResolver.java:58)
Truncated. see log file for complete stacktrace
>
<13/06/2013 17h12min21s BRT> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 1 task for the application "ForaDoEarDoEjb".>
<13/06/2013 17h12min21s BRT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application "ForaDoEarDoEjb".>
<13/06/2013 17h12min21s BRT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: Could not setup environment
at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1693)
at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:763)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:192)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:187)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
Truncated. see log file for complete stacktrace
Caused By: weblogic.application.naming.ReferenceResolutionException: [J2EE:160200]Error resolving ejb-ref "HelloWorld#com.upog.demo.HelloWorld" from module "ForaDoEarDoEjbDynamicWar.war" of application "ForaDoEarDoEjb". The ejb-ref does not have an ejb-link and the JNDI name of the target bean has not been specified. Attempts to automatically link the ejb-ref to its target bean failed because no EJBs in the application were found to implement the "com.upog.demo.HelloWorld" interface. Link or map this ejb-ref to its target EJB and ensure the interfaces declared in the ejb-ref are correct.
at weblogic.application.naming.EnvUtils.findInfo(EnvUtils.java:832)
at weblogic.application.naming.EnvUtils.findInfoByReferenceClass(EnvUtils.java:783)
at weblogic.application.naming.EjbReferenceResolver.resolveEjbRef(EjbReferenceResolver.java:92)
at weblogic.application.naming.EjbReferenceResolver.resolve(EjbReferenceResolver.java:71)
at weblogic.application.naming.EjbReferenceResolver.get(EjbReferenceResolver.java:58)
Truncated. see log file for complete stacktrace
>
Ja li todos os links, tentei de todas as formas “Injetar um bean remoto de um ear que não é o mesmo que tem o ejb”, se alguem puder me dar uma dica, agradeço muito.
Valeu.