• 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

Glassfish Deployment Problem

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

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:
- META-INF
----- MAINFEST.MF
- common-dao.jar
- common-entities.jar
- review-entities.jar
- ShowMe.war


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


common-entities.jar and review-entities.jar:
- META-INF
----- MAINFEST.MF
----- persistence.xml

Any idea appreciated,

Thanks
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Remember to always leap before you look. But always take the time to smell the tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic