facebook

Packaged deployment fails.. [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #197715 Reply

    ErikEngerd
    Member

    Hi,

    I am using Eclipse 2.1.1 with the MyEcipseIDE plugin. I have create a stateless session bean (one class) and have generated home, local, and remote interfaces for it using the MyEclipseIDE (Xdoclet).

    Deployment of the session bean as an exploded bean succeeds. Also JBoss 3.0 is happy (no errors). Nevertheless, packaged deployment appears to do nothing. No Jar file is put into the JBoss deployment directory. On the other hand, with exploded deployment I can clearly see a directory being created.

    What could be wrong?

    Cheers
    Erik

    #197716 Reply

    support-michael
    Keymaster

    1) What OS are you using?

    2) Do you have a tmp directory defined?
    Packaged deployment builds into your System’s tmp directory defined by the System property “java.io.tmpdir”.

    3) What are you packaging (EAR, EJB jar)?

    Michael
    MyEclipse Support

    #197723 Reply

    ErikEngerd
    Member

    Hi,

    I am using Windows XP home edition.

    I have checked the value of the java.io.tmpdir property and this property is defined and refers to an existing directory. The directory is hidden in the explorer, but making it visible also did not help.

    Also, I get no messages whatsoever when I try to use packaged deployment.

    I am packaging an EJB jar file. To be precise, I don’t now because I haven’t specified the name of the jar file or the extension somewhere. I am assuming it is the project name with “.jar” suffix.

    Cheers
    Erik

    #197724 Reply

    support-michael
    Keymaster

    I was hoping to isolate the problem to a packaging failure related to a tmp build directory issue. From your info this doesn’t sound like the problem.

    The default packaged archive name will be <project_name>.jar for EJB Project deployment, <project_name>.war for Web Project deployment and <project_name>.ear for Enterprise Project deployment.

    0) What is your project’s name?

    1) Can you check your Eclipse log file for error messages relating to a packaging problem?

    2) Also can you search your system for the presence of the expected archive to see if a packaged archive is being created and possibly deployed to another location than your appserver’s deployment location?

    Michael
    MyEclipse Support

    #197725 Reply

    ErikEngerd
    Member

    Hi,

    I have looked a bit closer now and it appears that the META-INF directory is not put into the exploded archive. This is most likely the cause of the problem.

    The ejb-jar file is automatically generated every time I run xdoclet.
    I use the following directories:
    * ‘src’: location of the META-INF directory
    * ‘src/main/ejb’: location of the EJB implementation file
    * ‘build/generated’: location of the xdoclet generated files.
    * ‘build/classes’: location of class files.

    When looking at the log file, I saw it was looking for the MANIFEST.MF file in the build/classes/META-INF directory.

    Therefore, I modified the xdoclet configuration so that it now generates the ejb-jar file in that directory. Now, the exploded deployment also includes the ejb-jar.xml file and JBoss gives me a few more messages (Deploying, Created, Starting, Started).

    Nevertheless, the MANIFEST.MF file is still missing. How do I create this file?

    Is there a way to configure MyEclipseIDE so that it uses the META-INF directory from the build/generated directory instead of the build/classes directory?

    Cheers
    Erik

    #197729 Reply

    ErikEngerd
    Member

    .. and another question..
    How do I generate the MANIFEST.MF file?
    I cannot put a MANIFEST.MF file in the build/classes directory myself because the directory can be removed as part of a ‘clean’.

    #197731 Reply

    support-michael
    Keymaster

    .. and another question..
    How do I generate the MANIFEST.MF file?
    I cannot put a MANIFEST.MF file in the build/classes directory myself because the directory can be removed as part of a ‘clean’.

    The current structure of an EJB Project as created by the EJB Project Wizard is to create <src folder>/META-INF folder containing an empty MANIFEST.MF file. By placing the META-INF folder in the project’s source tree it is copied to the project output location upon incremental or full build.

    The deployer pulls EJB Project code only from the project’s default output location. So if you have files that are part of your EJB Project’s deployment they need to be under the source tree somewhere. Web Projects pull directly from the project’s <web root> folder.

    Michael
    MyEclipse Support

    #197738 Reply

    ErikEngerd
    Member

    Hi Michael,

    I tried this earlier today but then it did not work. What I tried just now is to use only one source folder for both the EJB implemenation and the generated sources, and now it works.

    After that I introduced the separate folder again for the generated sources and now it still works (!). Does the workbench look at the first source directory for copying the META-INF dir. or does it look at all of them?

    This is very strange but at least I am happy to see it working now.
    I think part of the problem could be that I was modifying thiings (removing/creating files and directories) outside of Eclipse and did not do a refresh in Eclipse after making the change.

    Thanks.

    Erik

    PS. Perhaps it would be a good idea to also present some messages like the complaint about the missing MANIFEST.MF file to the user.

    #197740 Reply

    support-michael
    Keymaster

    I’m glad your running now.

    Does the workbench look at the first source directory for copying the META-INF dir. or does it look at all of them?

    The build output order is based on your project build path. If src1 is before src2 then its output will take precedence over src2. I ran an experiment and confirmed this.

    I think part of the problem could be that I was modifying thiings (removing/creating files and directories) outside of Eclipse and did not do a refresh in Eclipse after making the change.

    We have several support cases that arose from similar sync/refresh issues.

    Perhaps it would be a good idea to also present some messages like the complaint about the missing MANIFEST.MF file to the user.

    I agree and have submitted your suggestion to our development team for consideration.

    Good luck.

    Michael
    MyEclipse Support

    #197754 Reply

    support-michael
    Keymaster

    Perhaps it would be a good idea to also present some messages like the complaint about the missing MANIFEST.MF file to the user.

    Thanks for the report. This information helped us track down and fix a packaging bug. The fix will be available in the next maintenance release.

    Michael
    MyEclipse Support

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Packaged deployment fails.. [Closed]

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