ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Holger Engels <>
Subject Re: Websphere ejbjar task
Date Fri, 04 Jan 2002 08:14:43 GMT
On Thu, 3 Jan 2002, Todd Chambery wrote:

> > > apart from the manifest problem, it looks like it works great.
> >
> > At least on linux and windows 2k .. I did not test it on other platforms.
> > The automatical 'ejbdeploy' did only work for me, if I used the ibm-jdk.
> > otherwise ibm's rmic throws a ClassFormatError, that complains about a
> > bad UTF8-String constant in the class' constant pool.
> >
> I've found this too (after much pain).  It seems WebSphere's very picky
> about using the IBM jdk.
> The GDT's manifest naming convention works, but it checks for the manifest
> in the
>       getConfig().descriptorDir, baseName + ""
> which in my case is the root of the descriptors, or
>     [ejbjar] building foo.jar with 18 files
> --->    [ejbjar]   looking for manifest name of
> B:\projectRoot\ant_descriptors\
>     [ejbjar] adding file 'com\bar\common\ABFoo1.class'
>     [ejbjar] adding file 'com\bar\common\ABFoo2.class'
>     [ejbjar] adding file 'com\bar\session\ba\FooSessionHome.class'
> My directory structure may not fit the convention, but it is in the form of:
>     projectRoot
>         ant_descriptors
>             foo
>                 Meta-inf
>                     foo-ejbjar.xml
>                     ...
> all the descriptors get picked up but I had to modify the GDT.writeJar(...)
>     log("\n\n\nlooking for manifest name of " + getConfig().descriptorDir+
> baseName + "\\Meta-inf" + baseName + "" + "\n\n",
> Project.MSG_VERBOSE);
>     File manifestFile = new File(getConfig().descriptorDir, baseName +
> "\\Meta-inf" + baseName + "");
> to get it to pick up my manifest.  Is this looking for the manifest in the
> descriptor root directory intentional?

Yes. I thought, it was a good idea, to fetch all kinds of meta data from a 
single location.

> Apart from that, I think I only have one more concern:  rmic is not being
> invoked.  Running the CVS version of WDT gives me this:
>     [ejbdeploy]   Validation of ABFoo.jar by EJB Validator is complete. All
> known problems have been reported.
>     [ejbdeploy] Generating deployment code
>     [ejbdeploy]   Processing session bean: Foo
>     [ejbdeploy]   Committing working copy...
>     [ejbdeploy]   Updating.
>     ...
>     [ejbdeploy] Shutting down workbench.
>     [ejbdeploy] EJBDeploy complete.
> Am I missing an attribute that fires off rmic?

May be, your classpath's getting too long? Invoke ant with the "-verbose" 
option and see what happens. Make sure to unset the CLASSPATH variable in 
your DOS box. IMHO it's a bad habit anyway, to have a system wide 
CLASSPATH variable!

The WDT does nothing different than ejbdeploy(.bat/.sh). It requires two 
classpaths. One as the systemclasspath and one for the "-cp" option of
"". Following is my code, that invokes 
the WDT:

    <ejbjar srcdir="${build.class}"
      <include name="*-ejb-jar.xml"/>
      <websphere dbvendor="${dbvendor}"
          <path refid="was4.ejbdeploy.classpath"/>
        <path refid="was4.classpath"/>
      <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 

BTW: Are you willing to contribute some documentation?



To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message