Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB deployed with EAR empty ejb-jar problem

 
Sertac Yilmaz
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't deploy an empty ejb-jar on weblogic. How are you creating the ejb jar?
 
Sertac Yilmaz
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, ofcourse. ejbmodule/ has all codes.
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you @E Armitage
I will try with ant build. Very strange, it must be working..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic