• 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

EJB3 deployment issue

 
Ranch Hand
Posts: 193
Mac OS X Fedora Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Integrate a simple EJB3 program with Hibernate3.2, and when deploying the program, the following exception has been shown on the ant console.

deploy:
[echo] asadmin.bat deploy --user admin --password 12345678 --host localhost --port 4848 --upload=true lib/chapter2.ear
[exec] CLI171 Command deploy failed : Deploying application in domain failed; Error loading deployment descriptors for module [chapter2] -- Invalid ejb jar [chapter2-ejb.jar]: it contains zero ejb.
[exec] Note:
[exec] 1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message driven bean.
[exec] 2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar.
[exec] Result: 1

Any idea what is going wrong here?

Thanks,
Jiafan
 
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jiafan,

What version of the appserver are you using to run this sample?

It is just complaining about the chapter2-ejb.jar file that it does not have any ejb's to be deployed. Please check if your chapter2.ear file is valid.
 
Jiafan Zhou
Ranch Hand
Posts: 193
Mac OS X Fedora Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sun Java System Application Server Platform Edition 9.0_01 (build b02-p01) is the EJB container I am using.

The chapter2-ejb.jar contains a stateless session bean.

I think the problem here is that because I have all the object model beans in another jar file which will be persisted into database via Hibernate. Does chapter2-ejb.jar need to contain the entity beans? How about using the hibernate approach?

What I want to achieve here is that I want to combine EJB3.0, Hibernate, and postgreSQL together. I am reading the "EJB3 in action" which only covers the default EJB3.0, JPA and derby as the database.

Needs some help on this.

Regards,
Jiafan
 
Today you are you, that is turer than true. There is no one alive who is youer than you! - Seuss. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic