This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Cloud Application Architecture Patterns: Designing, Building, and Modernizing for the Cloud and have Kyle Brown, Bobby Woolf and Joseph Yodor on-line!
See this thread for details.
  • 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Manifest file not working in J2EE project?

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a problem with my project. I have an EAR file with a few jars in it.
a.jar, b.jar, c.jar.

a.jar has the logging classes and uses log4j. Therefore a.jar has a manifest file with log4j in its class path.

The final EAR file has in its root:
a.jar
b.jar
c.jar
log4j

b.jar references a.jar. I get NoClassDefFound log4j errors due to the Category class. Basically, it can't find the log4j jar even though its specified in the manifest. Strangest thing is it works in all of my servers but not on one of them. Is there some configuration problem I have that is problematic in that one server? I tried adding log4j explicitly to the server startup classpath, and it works. However, that's not a long term solution.

Its as though the manifest file of a.jar is not being read in correctly. I think I have the projects organized correctly... Any help or suggestions would really help.
 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Manifest file has many rules as per i know

after the last line, press enter for extra line
case sesitive
it gives error even if small space is extra

search google for all it's rules
 
Kevin Cheong
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. I have Websphere building the manifest file initially and later on Ant modifies it with some version info. If the manifest file is invalid, it probably shouldn't work for the other servers as well. I'm thinking it should have something to do with the server. Is there a possibility that the Application Server (I'm using WAS) is 'corrupt' and not processing the manifest file?
 
naveen gupta
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i really doubt of application server being corrupt

If you are sure, what your are doing is correct, then i would say, do it all over again from the begining, you might have missed something
 
Kevin Cheong
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would but its not as easy as that.. We have everything automated by Ant. It used to work on the server that does not presently though. My colleague tried to make a mod just before this problem though. WAS actually extracts the EAR that you deploy and places it somewhere in the WAS directory. My colleague tried replacing a utility jar in that EAR and everything suddenly blowed up. I've double checked and triple checked the classpaths and settings across all servers and I can't find anything drastically different that will cause the problems. We're going to decide what to do next. Meanwhile if you have any other suggestions on what I should do, I would be glad to hear it!
reply
    Bookmark Topic Watch Topic
  • New Topic