5

I'm trying to run an enterprise app in a Glassfish 3.0 server running on my local system. I'm using NetBeans 8.0.2 as the IDE, but I'm actually using the server console of Glassfish to deploy, for now.

This app is currently working in production. I can build an EAR file and deploy to the production and QA servers, but for development reasons I'd like to use the server on my system.

However, when I attempt to deploy the file to the local Glassfish server, I get the following error message and stack dump:

java.lang.RuntimeException: Cannot resolve reference Local ejb-ref name=com.mycompnayl.business.model.web.stage.p1.P1RawGridSessionBean/productSessionLocal,Local 3.x interface =com.mycompany.business.component.product.ProductSessionLocal,ejb-link=null,lookup=,mappedName=,jndi-name=,refType=Session
    at com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:620d
    at com.sun.enterprise.deployment.WebBundleDescriptor.visit(WebBundleDescriptor.java:2004)
    at com.sun.enterprise.deployment.Application.visit(Application.java:1777)

.....etc

Edit: to add some context, the class for which the error is generated starts out like this:

public class P1RawGridSessionBean extends SortableList { //
    private static Logger logger =     Logger.getLogger(P1RawGridSessionBean.class.getName());

    private List<TP1RawView> productViewList=new ArrayList<TP1RawView>();

    //TP1RawJpaController tp1RawController=new TP1RawJpaController();
    @EJB ProductSessionLocal productSessionLocal;
    etc....

So it's attempting to reference an EJB which implements the interface "ProductSessionLocal". Here is the start of ProductSessionLocal:

@Local
public interface ProductSessionLocal {

    public void create(TP1Raw TP1Raw);
    public void update(TP1Raw tp1Raw) throws NonexistentEntityException, Exception;
    public void destroyImage(Long id) throws NonexistentEntityException;
    etc...

And here is the start of the class which implements it:

@Stateless
public class ProductSessionBean implements ProductSessionLocal {

    public final static Logger logger = LoggerFactory.getLogger(ProductSessionBean.class);

    @EJB
    ImageSessionLocal imageSessionLocal;

    @PersistenceContext(unitName="modCompJar-PU")
    EntityManager em;
Jack BeNimble
  • 35,733
  • 41
  • 130
  • 213

0 Answers0