1 Reply Latest reply on Oct 31, 2002 7:46 PM by Cheech

    getting "Truncated class file" error on ejb deployment

    Paul Cassidy Newbie

      Can someone please throw some light on this situation...

      I am deploying a ejb on jboss and I want to have the class files in the ejb but not in another folder i.e. directly under the jar. However when i do this, i get a Truncated class file error and the bean will not deploy.
      When i compile with ant, it tells me that it has compiled sucessfully...

      I am trying this on the "Interest" example.

      when I put the 3 ejb files inside another directory (say "classes",) so i have META-INF and classes directly under the interest.jar, it works....but this is no good for my purposes.

      I have updated the ejb-jar.xml to reflect the new setup..the looks like the following:


      but it still will not work......any help would be greatly appreciated....

        • 1. Re: getting "Truncated class file" error on ejb deployment
          Cheech Newbie

          I had the same problem building with ant. The problem is that duplicate files added to an archive (jar, war, ear, etc.) using the jar, war, or ear tasks are added (or merged) by default. When this occurs the duplicated files are truncated or corrupted. I worked around the problem by the setting the duplicate attribute of the jar task to "preserve". To avoid preserving the wrong file, place the fileset you want to preserve at the beginning of the list of fileset tags.

          You can also accomplish the same thing by setting the exlcudes attribute of the fileset tag to the dup file.

          Hope this helps.