ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Holger Engels <heng...@mercatis.de>
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 + "-manifest.mf"
> 
> 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\foo-manifest.mf
> 
>     [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-manifest.mf
>                     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 + "-manifest.mf" + "\n\n",
> Project.MSG_VERBOSE);
>     File manifestFile = new File(getConfig().descriptorDir, baseName +
> "\\Meta-inf" + baseName + "-manifest.mf");
> 
> 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
"com.ibm.etools.ejbdeploy.EJBDeploy". Following is my code, that invokes 
the WDT:

    <ejbjar srcdir="${build.class}"
	    descriptordir="etc/ejb">
      <include name="*-ejb-jar.xml"/>
      <websphere dbvendor="${dbvendor}"
                 ejbdeploy="${ejbdeploy}"
                 oldCMP="false"
		 quiet="false"
		 keepgeneric="true"
		 tempdir="/tmp"
                 destdir="${dist.server}">
        <wasclasspath>
          <path refid="was4.ejbdeploy.classpath"/>
        </wasclasspath>
      <classpath>
        <path refid="was4.classpath"/>
      </classpath>
      </websphere>
      <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 
1.1//EN"
           location="${lib}/dtd/ejb-jar_1_1.dtd"/>
    </ejbjar>


BTW: Are you willing to contribute some documentation?


Cheers,

Holger


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message