facebook

Deployment of 2 Enterprise Application

💡
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 Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #261146 Reply

    Salome
    Member

    Dear myEclipse’s users,

    I have 2 Enterprise Application Project : “Project 1” & “Project 2”.

    Each project contains one EJB application and one Web application

    “Project 1”contains a class named “BasicListForm”. (in the Web application)

    “Project 2”contains a class named “BICfileListForm” and extends the class “BasicListForm”.

    The deployment is OK, but when I use the BICfileListForm class I receive this Exception.

    “java.lang.NoClassDefFoundError”:ch/isys/best/core/struts/BasicListForm

    In advance thanks you.

    Salomé

    #261149

    Riyad Kalla
    Member

    Salome,
    Project 2 will need Project 1 on it’s build path in some manner for that to resolve. Unfortunately we do not support top down relationships in deployments like that. Typically you have relationships bottom up like:

    Java Project -> Web Project -> EAR Project

    Where your common code goes in the Java Project, it’s used by the Web and possibly EJB project, and then the Web and EJB project are made modules of the EAR project and deployed.

    The trick is to figure out how to extract the common code into the base Java project that needs to be shared. Is this possible in your situation?

    #261176

    Salome
    Member

    Thanks you for your explanation.

    But in my example the class “BasicListForm” is in the web application of the project 1 and the class “BICfileListForm” in the web application of the project 2. (Same level in the Hierarchy)

    The Enterprise Application deploy 4 modules (project1/ejb; project1/web; project2/ejb; project2/web)

    How I can share classes in 2 web application modules in the same Enterprise Application ?

    Is your solution the only solution ?

    I read in the MyEclipse documentation :

    When any module references a Java class, its local classloader first searches that modules codebase for the class. If the class is not found local to the module, the the module makes a search request to the classloader at the next level (web->EJB->EA Classloader)

    How I can define the classloader for the Web modules ? Can it contains more than one .war file ? (In my case project1.war project2.war)

    Thanks you.

    Salomé

    #261190

    Riyad Kalla
    Member

    Salome,
    Ok thank you for clarifying. The way you would need to setup your project is to extract the common classes into a Java project that is shared by the web projects and deployed by the EAR project.

    Is this something you can do? Typically these common projects will contain things like an applications persistence layer or other common classes that all the modules of the EAR need.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Deployment of 2 Enterprise Application

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