I've got a problem where I need to set a property on the JVM that runs the
weblogic.ejbc compile portion of the ejbjar task, and I need to know how
that can be done, or whether I need to submit a patch for this.
First, let me describe the problem I've been having.
I am running an Ant build on a machine which does not have Weblogic
installed, although it will be deployed on machines that have it. When I
create my EJBs in this build, it works for all except the Container Managed
Persistence beans. These generate the output:
[ejbjar] building MyEJB.jar with 7 files
[ejbc] ERROR: Error from ejbc: weblogic.boot.ZipSource
[ejbc] ERROR: ejbc found errors
After spending many hours hashing it out with BEA tech support, it turned
out the problem was that the CMP beans require the
${weblogic.home}/lib/persistence/weblogic_rdbms.jar classes to be loaded by
weblogic.ejbc. Trouble is, the classes are not loaded from the classpath
like any sensible program would do, but from the specific file
${weblogic.home}/lib/persistence/weblogic_rdbms.jar.
I verified that this was indeed the problem by creating the lib/persistence
directory structure with the JAR file in it, and manually running "java
-Dweblogic.home=/my/dummy/dir weblogic.ejbc -compiler javac
MyEJB-generic.jar MyEJB.jar". Sure enough, everything worked.
So I tried to pass the weblogic.home property to the JVM of the <weblogic>
task. First I tried setting the weblogic.home property in build.xml, no
dice. Then I tried passing "-Dweblogic.home=/my/dummy/directory" in the ant
shellscript. Nada. I created environmental variables "WEBLOGIC_HOME" and
"WL_HOME". No can do.
Then I checked the documentation on the EJB tasks. Neither <ejbc>,
<ejbjar>, or <weblogic> allows you to pass arguments in to the JVM.
<weblogic> has an args attribute, but that is for passing arguments to the
weblogic.ejbc program itself, not the JVM instance which runs it.
So now I am turning to you, fellow list members. Is there a way to do this,
or do I need to write a patch to Ant? This behaviour has bitten a few
people in the past, according to Google Groups and this mailing list's
archive, so if it is not possible to set "weblogic.home", at least in the
<weblogic> task, it should probably be considered a bug in Ant (although an
obscure one) and fixed.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>