• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB deployed with EAR empty ejb-jar problem

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, ofcourse. ejbmodule/ has all codes.
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you @E Armitage
I will try with ant build. Very strange, it must be working..
 
Sometimes you feel like a nut. Sometimes you feel like a tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic