• 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
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

EARs, WARs, classpaths, and manifests

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I am using WAS 4.0.4, and using Ant 1.5.3 for builds. I've got a couple of problems. First, I have a set of classes I use as a framework for both the web and ejb tiers that I package as, say fwk.jar. For the web tier, I just put the jar in my war's WEB-INF/lib. For the ejb tier, I want to put the jar in the manifest classpath (e.g. Class-Path: lib/fwk.jar). I have tried this, but no matter what, when the EJBs load, I get a ClassNotFoundException on the base EJB classes/interfaces.
I've seen a lot of posts about setting classpaths for various class loaders, and setting the JVM classpath works, but then leads to another problem, which is I also using the commons-logging/log4j classes, and wind up with a class loader issue ("Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log"), since the web tier is loading one class with the JVM class loader and another with the web module loader. So what I would like to do is remove all my jars from WEB-INF/lib and place them in a shared lib directory in my EAR and use the manifest classpaths to reference what I need appropriately, but since the EJB tier isn't working, I need to figure out why.
My other issue is that when I enter a long classpath in the manifest, either jar or ant is splitting the line up into two lines (e.g.,
"Class-Path: foo.jar bar.jar foo-bar.jar" becomes
"Class-Path: foo.jar bar.jar foo-\n bar.jar"). Perhaps the second issue is causing a problem with the first, but if I simply take out the "foo-bar.jar" entry, the line stays intact, but the EJB tier still doesn't load the other two jars.
Help!
 
Soing Wang
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, by the way, I'm using AE (not AEs or AEd) on Win2000 server, and the built-in JDK, although I have installed the Sun JDK 1.3.1-b7 and J2EE 1.3.1 separately on the same machine.
 
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What IDE are you using for your builds?
Is that WSAD? or some other eclipse derivative?

Best Regards,
Prasad.
 
Soing Wang
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an entity ejb jar built from WSAD, but aside from that, I'm trying to do the build outside of an IDE using Ant, with command line tools (i.e. javac, jar, ejbdeploy, wscp).
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic