facebook

EJB .jar file doesn’t include .jar files

💡
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 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #236832 Reply

    Eric Darchis
    Member

    Hi,

    I’m having a problem with an EJB component built with MyEclipse. The project is, as usual, built like:

    ProjectName
     + src
        + com....
        + META-INF
     + lib
    

    In the lib folder, I have many .jar files, most of them for hibernate.
    The problem is that when I add a project deployment (JBoss 4), the resulting .jar file doesn’t include the libraries in /lib. I tried to move the files in the root of my project (it works this way in some of my projects) but they’re not copied either.

    If I rename the .jar file to .zip and add the jars, then rename it back to .jar, it works perfectly but it is not really a solution.

    Of course, I have added these JARs in the project properties -> Java build path (add jars). If I don’t do that, eclipse complains about my imports that don’t resolve.

    I’m using MyEclipse 4.0GA with Eclipse 3.1.0 on Windows XP SP2. I didn’t install any other plugin. I have JDK 1.5.0_04. There is no exception in the .log file.

    Can someone tell me where I should put my JARs and/or how to declare my /lib as the lib folder to be packaged with the EJB JAR ?

    Thanks a lot,
    Eric.

    #236843

    Greg
    Member

    There is no J2EE standard way of adding dependent libs for a EJB jar file. There are appserver specific ways but we don’t endorse any of those. So, we recommend building an EAR with one EJB module instead and placing the dependent jar files in the EAR and using a manifest file. This process is described in detail in the Enterprise Application Project Quickstart.
    http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/earprojects/index.html

    Take a look at section 9 which describes the advanced features which include Optional Package support in EAR projects.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: EJB .jar file doesn’t include .jar files

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