users@glassfish.java.net

Re: GFv3 deployment error

From: <glassfish_at_javadesktop.org>
Date: Thu, 11 Mar 2010 07:16:06 PST

The problem with referring to the entire ejb-jar in the .wars manifest is that it includes both interface and implementation, which results in the double definition of the enterprise beans via their comopnent-defining annotations. There are a number of options :

1. Replicate the business interface in both the ejb-jar and the .war.

2. Refactor only the business interface into a library .jar and put it in an .ear-level "lib" directory

3. Since you're using GlassFish v3, which is based on EJB 3.1, you can just get rid of the ejb-jar altogether and package all of its classes directly in the .war.
[Message sent by forum member 'ksak' (kenneth.saks_at_sun.com)]

http://forums.java.net/jive/thread.jspa?messageID=391272