Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ant 1.6 and wlappc

6 views
Skip to first unread message

George Coller

unread,
Apr 21, 2004, 10:27:57 AM4/21/04
to

We ran into a problem with upgrading to ant 1.6.1 and using the weblogic ant tasks.
One of our developers did some digging and found the following solution. It
bypasses the weblogic ant tasks because of an incompatibility between weblogic
and ant 1.6

Our developer's solution:

I finally got it to work. Kind of.
There is obviously a class loader issue between ant and weblogic.
Playing with my favorite decompiler tool, I found that the errors occur when wlappc
checks the validity of the EJB classes. To do so, it does things like
if (javax.ejb.EJBObject.class.equals(myEJBClass)) ...
The result is false because the classes are loaded in separate classloader with
the different visibility. (I guess they should check the name of the class instead
of the class itself).

Anyway, the only way I got it to run is by using the <java> ant task and force
it to run in a separate JVM:
<!-- run rmic -->
<java fork="true" newenvironment="true" classname="weblogic.appc">
<classpath refid="dev.classpath"/>
<arg line="-forceGeneration -verbose ${build.dir}"/>
</java>


Kermitt

unread,
Apr 27, 2004, 4:36:03 PM4/27/04
to
I would like to thank you I walk trough the same issue but I got Ant 1.5.3
and eclipse 1.2.1.
It is now working...

But I would like really understand why we have to make this. I did the same
for wldeploy to use the update feathure.

Kermitt


"George Coller" <geo...@coller.com> wrote in message
news:4086...@newsgroups.bea.com...

Franck

unread,
May 10, 2004, 2:05:58 PM5/10/04
to

This problem has really been irritating me.

First, I do not understand why I have to include a 36MByte jar file to run a ANT
task.
Second, I think that BEA's documentation is really lacking with respect to getting
the ANT tasks up and running with an off-the-shelf ANT installation (i.e. not
the ANT that is provided by BEA themselves).
Third, BEA's ANT tasks (at least wlappc) does not work together with Eclipse.
I have tried both ANT 1.5.3 and 1.6.1.

George's email below helped me, although the proposed solution did not work for
me. In the
end I got it all working with the following definitions:

<target name="clientjar_weblogic" depends="compile"
if="perform.clientjar.weblogic"
description="generates the client jar file through weblogic compiler">


<java fork="true" newenvironment="true" classname="weblogic.appc">
<classpath>

<pathelement location="${jar.weblogic}"/>
<pathelement location="C:\java\sdk\j2sdk141_02\lib\tools.jar"/>
</classpath>
<arg value="-classpath"/>
<arg pathref="j2ee.classpath"/>
<arg value="-output"/>
<arg value="${classes.clientjar}"/>
<arg value="-basicClientJar"/>
<arg value="-iiop"/>
<arg value="${classes.source}"/>
</java>
</target>

This target starts a java application in a separate JVM without the inheritance
of any variables and settings.

${jar.weblogic} points to the weblogic.jar that BEA provides.
You must include the tools.jar file, in order for BEA to invoke javac.
the id 'j2ee.classpath' at least needs to include j2ee.jar file, but probably
also any libraries that the code you want to compile is dependent on.
Don't try to use the <arg line=" ... "> option, since this will not work.

Good luck!

I hope someone from BEA reads this and can try to do something about it. It's
really a pity how it is at this moment.

Cheers,
Franck

0 new messages