File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes EJB deployed with EAR empty ejb-jar problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB deployed with EAR empty ejb-jar problem" Watch "EJB deployed with EAR empty ejb-jar problem" New topic
Author

EJB deployed with EAR empty ejb-jar problem

Sertac Yilmaz
Greenhorn

Joined: Aug 04, 2011
Posts: 4
Hi,
I have an EJB 3 project. When i try to export EAR with EJB project referenced, EAR package has ejb jar file but ejb jar doet not have any class in it.It has empty ejbmodule.
Below,its my ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" version="3.0">
<display-name>Catalog </display-name>
<ejb-client-jar>CatalogClient.jar</ejb-client-jar>
</ejb-jar>

When i try to deploy it on Weblogic 10.3.4 , it gives me
Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation..
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:469)

Any ideia?

Thanks
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
You can't deploy an empty ejb-jar on weblogic. How are you creating the ejb jar?
Sertac Yilmaz
Greenhorn

Joined: Aug 04, 2011
Posts: 4
I tried via Eclipse>Export EJB JAR, it was empty as well. I tried also Eclipse>Export EAR file. EAR file has jar file but it is empty.
I tried againg after cleaning/building projects.
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
Sertac Yilmaz wrote:I tried via Eclipse>Export EJB JAR, it was empty as well. I tried also Eclipse>Export EAR file. EAR file has jar file but it is empty.
I tried againg after cleaning/building projects.


Did you actually write any code for that jar (the EJBs)?
Sertac Yilmaz
Greenhorn

Joined: Aug 04, 2011
Posts: 4
Yes, ofcourse. ejbmodule/ has all codes.
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
Then something is going wrong with your export process from eclipse. I just tried it on a project and it worked. Personally I use a build tool (maven for this project) to generate the deployable artifacts because then the files are created consistently regardless of which platform or IDE I'm using. You might want to consider using a build tool as well. Otherwise (I'm sorry) I don't know why your export process from eclipse is generating empty files.
Sertac Yilmaz
Greenhorn

Joined: Aug 04, 2011
Posts: 4
Thank you @E Armitage
I will try with ant build. Very strange, it must be working..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB deployed with EAR empty ejb-jar problem
 
Similar Threads
EJB3 - NullPointerException with @EJB Injection
Problem deploying Simple EJB to Glassfish
Eclipse,EJb3 and Glassfish V3
Entity Bean Deployment in jboss-5.1
Entity Bean Deployment in jboss-5.1