wood burning stoves*
The moose likes EJB and other Java EE Technologies and the fly likes EJB3 deployment issue 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 "EJB3 deployment issue" Watch "EJB3 deployment issue" New topic
Author

EJB3 deployment issue

Jiafan Zhou
Ranch Hand

Joined: Sep 28, 2005
Posts: 192

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


SCJP, SCJD, SCWCD, SCBCD, SCEA
Shailesh Kini
Ranch Hand

Joined: Oct 17, 2001
Posts: 153
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.


Shailesh Kini.
Jiafan Zhou
Ranch Hand

Joined: Sep 28, 2005
Posts: 192

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB3 deployment issue
 
Similar Threads
jUnit test won't work when calling embeddable EJBContainer
EAR Deployment Failed - Glassfish v3
Cannot conect to mySql DB after changing DB from HSQL to mySql in JBOSS 5
Can't deploy EJB jar to Glassfish
JBOSS 5.0.1.ga problem with mysql-ds and deploying service=Queue and service="PostOffice"