facebook

[Closed]Web project cannot see EJB project

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #243506 Reply

    Hello,

    I have a project and I try to change it and use the structure of myeclipse. So now I have a Web project, a Java project, several EJB projects and a Enterprise Application project.

    The Web project has references to the EJB projects (also they are in the java build path).

    In my Web project I have a class that create references to EJB project like this:

    private static Config m_Config = ConfigServiceHelper.getConfig(“techserver”);
    private static Config m_ConfigError = ConfigServiceHelper.getConfig(“error”);

    /** Interfaz Home del EJB UtilServices */
    private static UtilServicesHomeRemote m_UtilServicesHomeRemote;

    public static UtilServicesRemote getUtilServices() throws TechnicalException {
    if (m_UtilServicesHomeRemote == null) {
    synchronized(UtilServicesHomeRemote.class.getName()) {
    if (m_UtilServicesHomeRemote == null) {
    PortableContext pc = PortableContext.getInstance();
    String ejbNom = m_Config.getString(“Ejb.UtilServicesHomeRemote”);
    m_UtilServicesHomeRemote = (UtilServicesHomeRemote)pc.lookup(ejbNom, UtilServicesHomeRemote.class);
    }
    }
    }
    UtilServicesRemote pfs = null;
    try {
    pfs = m_UtilServicesHomeRemote.create();
    } catch (Exception e) {
    String message = MessageFormat.format(m_ConfigError.getString(“Erreur.BeanHelper.SBCreate”),
    new Object[] { UtilServicesRemote.class.getName() });
    throw new TechnicalException(message, e);
    }
    return pfs;
    }

    But if i try to access from a class of the Web project to the classes of the EJB project I have a problem. I get the following message when a try to go into the application:

    Error
    <21-dic-2005 09H29′ CET> <Error> <HTTP> <BEA-101017> <[ServletContext(id=15140065,name=langai,context-path=/langai)] Root cause of ServletException.
    java.lang.NoClassDefFoundError: es.altia.langai.business.util.UtilServicesHomeRemote
    at es.altia.langai.technical.BeanHelper.getUtilServices(BeanHelper.java:1310)
    at es.altia.langai.interfaces.user.web.util.DescripcionesPagina.<init>(DescripcionesPagina.java:49)
    at es.altia.langai.interfaces.user.web.util.GestorDescripcionesPaginas.inicializarGestor(GestorDescripcionesPaginas.java:72)
    at es.altia.langai.interfaces.user.web.util.GestorDescripcionesPaginas.<init>(GestorDescripcionesPaginas.java:28)
    at es.altia.langai.interfaces.user.web.util.GestorDescripcionesPaginas.constructor(GestorDescripcionesPaginas.java:34)
    at es.altia.langai.interfaces.user.web.util.GestorDescripcionesPaginas.newInstance(GestorDescripcionesPaginas.java:44)
    at es.altia.langai.interfaces.user.web.util.TraductorPaginaBean.<init>(TraductorPaginaBean.java:34)
    at jsp_servlet._jsp.__index._jspService(__index.java:332)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6452)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)

    Can you help me?
    Thanks in advance,

    Mónica,

    #243555

    Greg
    Member

    Monica,

    Have you read through our Enterprise Application Quickstart?
    http://www.myeclipseide.com/images/tutorials/quickstarts/earprojects/

    In some of the advanced sections it talks about how to package EAR+EJB+WEB + dependent java projects and have then all packaged and deployed correctly. Read through it and then hopefully that will help you understand how things are done in the “MyEclipse” way.

    #243707

    Hello,

    I found the solution. In Window>Preferences>MyEclipse>Application Servers>Weblogic 8>Paths,
    I got the same libraries that I have defined as User Library (in Java>Build Path>User Libraries), but from different location and I got NoClassDefFoundError and ClassNotFoundException errors.

    In the path of the Weblogic 8 I only have to add the classes you need. If you have some class repeated you will get these errors.

    Thanks anyway.
    Monica,

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: [Closed]Web project cannot see EJB project

You must be logged in to post in the forum log in