1

I'm trying to deploy an application on Oracle Java Cloud Service. I created a stateless ejb (3.0):

@Stateless(name = "PTOnlineSessionEJB", mappedName = "ejb/PtOnlineBean")
@Local(PTOnlineSessionEJBLocal.class)
public class PTOnlineSessionEJBBean implements PTOnlineSessionEJBLocal {

with a local interface:

@Local
public interface PTOnlineSessionEJBLocal {

then I try to access to the ejb:

@WebService(serviceName = "PTOnlineService", portName = "PTOnlineServiceSoap12HttpPort")
@BindingType(SOAPBinding.SOAP12HTTP_BINDING)
public class PTOnlineService {
    @EJB(name = "ejb/PtOnlineBean")
    PTOnlineSessionEJBLocal PtOnlineBean;

When I try to deploy on cloud server I get this error:

Caused by: weblogic.deployment.EnvironmentException: [J2EE:160200]Error resolving ejb-ref 'ejb****' from module 'PTOnlinev6-ViewController-context-root' of application 'PTOnline'. 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 'it.enigen.pt.online.ejb.PTOnlineSessionEJBLocal' interface. Please link or map this ejb-ref to its target EJB and ensure the interfaces declared in the ejb-ref are correct.

How can I expose and use an ejb with local interface on weblogic?

Bob Dalgleish
  • 7,724
  • 3
  • 29
  • 39
notting65
  • 143
  • 1
  • 9

0 Answers0