... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)

2006-01-23

WebLogic 9.1 JWSC Ant Task

I tried to follow an example from the WLS9.1 web services documentation that uses the JWSC Ant task.  I got the error message:

Deployment descriptor: tempdir\_9tdo9x\web.xml does not exist.

I found a message in the BEA forums that suggested using BEA's setDomainEnv command before running the Ant task.  This worked, but complicates using a stock "headless" Ant build (e.g. running within Eclipse or CruiseControl).  I had found a similar bug in WLS8.1's source2wsdd Ant task (the other WLS8.1 Ant tasks had no such dependencies).

I ran Ant with -debug and saw this:

Deployment descriptor: C:\DOCUME~1\MM\LOCALS~1\Temp\_9tdo9x\web.xml does not exist.
 at org.apache.tools.ant.taskdefs.War.setWebxml(War.java:84)
 at weblogic.wsee.tools.anttasks.JwscTask.jar(JwscTask.java:397)
 at weblogic.wsee.tools.anttasks.JwscTask.pkg(JwscTask.java:331)
 at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:166)

 the option explode="true" on the jws subelement of the jwsc task, then the process seems to proceed a little bit further, but then dies for a completely different reason:

java.lang.AssertionError: java.lang.ClassNotFoundException: weblogic.j2ee.descriptor.ApplicationBeanImpl
 at weblogic.descriptor.internal.DescriptorImpl.createRootBean(DescriptorImpl.java:357)
 at weblogic.descriptor.DescriptorManager.createDescriptorRoot(DescriptorManager.java:328)
 at weblogic.wsee.tools.jws.build.EarFile.getApplicationBean(EarFile.java:127)
 at weblogic.wsee.tools.jws.build.EarFile.addWebModule(EarFile.java:61)
 at weblogic.wsee.tools.anttasks.JwscTask.addToEar(JwscTask.java:230)
 at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:167)

That last one looks like a typical Ant classloader problem since the named class actually *does* exist in weblogic.jar.  I looked at the code for DescriptorImpl.createRootBean() and found that it was hard-coded to use the thread's class loader (instead of using its own class loader).  In an Ant context, the implications of this are complex, resulting in the exhibited failure.

[I later found a workaround.]

Blog Archive