• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

class conflict in jar and war

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When we prepare a war ,We have some classes which are go into the war as well as the jar(to be kept in ejb tier)When thsi EAR is deployed on Weblogic7.0 and the class is accessed then at runtime this gives 500 internal server error. Can anybody pl tell why?
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should take a look at WebLogic's log files. The HTTP 500 error you're seeing in your browser would indicate that someone threw an exception and it's probably logged somewhere...
 
Monmohan Singh
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
actually all this problem is because we do not know how to package third party jars along with the ear . It is simple if the war uses them ,we can simply place them ine WEB-INF/lib , but what when they are needed by the ejb tier classes.
PL help
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.theserverside.com/resources/articles/J2EE-Deployment/chapter.html
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah, you need to add the "utility" .jar file into the .ear file next to your .wars and .jars and then add a "Class-Path:" manifest entry into each "mywebapp.war" and "myejb.jar" that needs to use the utility classes.
Take a look at this article (search for "better solution"...)
 
Monmohan Singh
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
we have tried that but still the problem remains. do we need to make any entries in the application.xml
the structure is as follow
App.ear :
a.war
b.jar
util1.jar
util2.jar
in b.jar's manifest.mf we have entires Class-Path: util1.jar util2.jar
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lasse is correct. Hopefully this article from TheServerSide helps:
Understanding J2EE Application Server Class Loading Architectures
 
Monmohan Singh
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if a class(cacheloader) is present in both the war and ejb-jar but is used only by the web classes will the server give any error
With the fact that this class uses a third party jar which IS present in WEB-INF/lib but not in ejb-jar dependent's
Pls note that this class is never instantiated in the ejb container hence would never require the third party jar.
I am using weblogic7
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The class-path entry should be in the manifest files of war and ear files rather than b.jar.

Originally posted by Monmohan Singh:
we have tried that but still the problem remains. do we need to make any entries in the application.xml
the structure is as follow
App.ear :
a.war
b.jar
util1.jar
util2.jar
in b.jar's manifest.mf we have entires Class-Path: util1.jar util2.jar

 
Monmohan Singh
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
okay, will we need in war also ( since we are keeping the jars in WEB-INF/lib)
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

okay, will we need in war also ( since we are keeping the jars in WEB-INF/lib)


It is better to put the common jar files outside of ear and war.
 
Monmohan Singh
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
just now I have tried it.Now it is not able to load the properties files in web ( they are placed at WEB-INF/classes)
do we need to place them as well in the ear and put the .properties in the classpath entry in manifest.mf??
 
Thank you my well lotioned goddess! Here, have my favorite tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic