This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I wrote an EJB class without defining a business interface and NetBeans did not complain. However, this is a violation of the EJB spec since the bean provider must provide the business interface and attach it to the bean class (by using annotation or through implementing the interface). Here is the class that compiles and works fine as an EJB module: package com.sun.javaee.blueprints.sessionfacade.model; import java.util.List; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; @Stateless public class CatalogFacadeBean { @PersistenceContext(unitName="CatalogPu") private EntityManager em; public void addItem(Item item) throws InvalidItemException{ if(item.getName().length() == 0) throw new InvalidItemException("The item" + " name cannot be empty. Please specify a name for the item. "); em.persist(item); } public Item getItem(int itemID){ Item item = em.find(Item.class,itemID); return item; } public List<Item> getAllItems(){ List<Item> items = em.createQuery("SELECT OBJECT(i) FROM Item i").getResultList(); return items; } }
Did you create that EJB using NetBeans wizard? If yes, it is a bug in wizard. But anyway, the warning is missing in the editor because verification module which is still not migrated to the new Java infrastructure is disabled in daily builds.
I think this should be tracked under verification module.
The Java EE Verification module is not supposed to be able to find 100% problems detectable by static analysis. We are trying to increase coverage focusing on checks most useful to the users. Changing issue type to "enhancement".