• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Unable to find the class in EAR file

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
My application has around six ejb's all make use of some common classes. So what I did is jared all those common clases files. I kept that jar file in the EAR file and deployed the application. At runtime I am not able to find out the classed which are there in the common classes jar file.
Did the EJB specification say anything regarding where to put the common class files. If so how to package them.
Is this packaging is specific to the app server classloader implementation, if so how to tackle this problem in WebSphere.
Can you throw some light on how to package those kind of classes.
Thanks in advance.
Vydeek
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You generally have to modify the manifest of the EJB-JAR files to let them know to look in the "common" jar file. See this book excerpt for details and examples.
Read this articlefor some useful pros and cons on various ways of sharing common code.
Kyle
 
sharp shooter, and author
Posts: 1913
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"vydeek",
Thanks for joining JavaRanch, but could you just take a quick look at the naming policy and edit your profile.
Also, only members with valid names will be eligible for the book giveaways.
Thanks
Simon
 
surya sudhakar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks,
the url you gave are very informative. I've tried the class path in manifest file, it is working now. Should I follow the same approach if the web module need the common jar file.
One approch is I can copy the commmon jar in the lib folder of the WEB-INF. Is there any other approch so that I can avoid copying the common jar into WEB-INF/lib.
Thanks
Vydeek
 
Kyle Brown
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by vydeek:
Thanks,
the url you gave are very informative. I've tried the class path in manifest file, it is working now. Should I follow the same approach if the web module need the common jar file.
One approch is I can copy the commmon jar in the lib folder of the WEB-INF. Is there any other approch so that I can avoid copying the common jar into WEB-INF/lib.
Thanks
Vydeek


Putting the common JAR file reference in the manifest of a WAR file works too. That's the best way to handle this kind of thing.
Kyle
 
New rule: no elephants at the chess tournament. Tiny ads are still okay.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic