I have an application ("CC") containing two modules: CC-ejb and CC-war. CC-ejb contains JPA entities and facades which CC-war uses. This application works correctly. Now I create another one ("CINT") with also two modules: CINT-ejb and CINT-war. In web module I need to access objects provided by CC-ejb. I use NetBeans 7.1 for development and Glassfish 3.1.1 for deployment.
In CC-ejb I have an interface:
/* ... */
import javax.ejb.Local;
@Local
public interface CallDetailsFacadeLocal {
/* ... */
and an implementing class:
/* ... */
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
/* ... */
import tp.coma.data.entities.CallDetails;
@Stateless
public class CallDetailsFacade
extends AbstractFacade<CallDetails>
implements CallDetailsFacadeLocal {
@PersistenceContext(unitName = "CC-ejbPU")
private EntityManager em;
/* ... */
In CINT-war I refer to it in one of my beans:
/* ... */
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import tp.coma.data.beans.CallDetailsFacadeLocal;
/* ... */
@ManagedBean(name = "bookingController")
@SessionScoped
public class BookingController implements Serializable {
/* ... */
@EJB
private CallDetailsFacadeLocal cdrFacade;
/* ... */
When deploying CINT (CC is already up and running) I get the following message:
Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: Ltp/coma/data/beans/CallDetailsFacadeLocal;java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: Ltp/coma/data/beans/CallDetailsFacadeLocal;. Please see server.log for more details.
In server log I can see:
[#|2012-03-28T12:42:42.236+0200|SEVERE|glassfish3.1.1|global|_ThreadID=22;_ThreadName=Thread-2;|Class [ Ltp/coma/data/beans/CallDetailsFacadeLocal; ] not found. Error while loading [ class tp.coma.cint.jsf.BookingController ]|#] [#|2012-03-28T12:42:42.252+0200|SEVERE|glassfish3.1.1|global|_ThreadID=22;_ThreadName=Thread-2;|Class [ Ltp/coma/data/beans/CallDetailsFacadeLocal; ] not found. Error while loading [ class tp.coma.cint.jsf.BookingController ]|#]
And a few (eight) exception stack traces.
What am I doing wrong??
CallDetailsFacadeLocal
class in the second app. – andbi