This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Glassfish Deployment Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Glassfish Deployment Problem" Watch "Glassfish Deployment Problem" New topic

Glassfish Deployment Problem

Luiz Abrahao

Joined: Jun 18, 2008
Posts: 10

I've got 4 projects on my Eclipse workspace:

- 1 Dynamic Web Project (ShowMe.war)
- 1 EJB Project (common-dao.jar)
- 2 JPA Projects (common-entities.jar, review-entities.jar)

I've also got an EAR application that uses all four modules listed above. When I publish the project I get this:

EAR file's structure is:
- common-dao.jar
- common-entities.jar
- review-entities.jar
- ShowMe.war

----- MAINFEST.MF (Class-Path: common-entities.jar review-entities.jar)

common-entities.jar and review-entities.jar:
----- persistence.xml

Any idea appreciated,

Ankit Garg

Joined: Aug 03, 2008
Posts: 9280

I think your common-dao.jar project is using a persistence context to manipulate entity beans. But since you don't have any persistence context in that ejb project, the server is unable to inject a persistence context in your EJBs. I found a solution here which states that you should define your persistence.xml i.e. the persistence unit at the EAR level. I've never tried it so this is the much that I can do. Sorry...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
I agree. Here's the link:
subject: Glassfish Deployment Problem
Similar Threads
Glassfish v2.1 Deployment of Jar problem
EAR deplyment error in glassfish
Glassfish web app deployment error
Error while deploying JPA
This bundle has no bean of name error on GlassFish 2.1.1