I frequently see people asking about where the JAR is that has the Ant tasks defined for WebLogic, such as weblogic.ant.taskdefs.management.WLDeploy
If you get an Ant error like this:
taskdef class weblogic.ant.taskdefs.management.WLDeploy cannot be found
here is how to fix it.
If you installed WebLogic in the default location, then the location of this and many other useful JARs to have on your classpath is /root/bea/wlserver_10.0/server/lib
If your "Deploy to WebLogic" Ant tasks (or like that) are failing, you can put this in Ant's classpath. On Eclipse you do that this way: Window > Preferences > Ant > Runtime > Classpath > Global Entries then Add External JARs.
If you run a jar -tf weblogic.jar | less, you can browse through them, but this is a lot of items, so you can also just output the contents to a file:
> jar -tf weblogic.jar > /home/ehewitt/WEBLOGICJAR.txt
But that is a huge file. Limit the output to listing only the Ant task definitions in that weblgoic.jar:
> jar -tf weblogic.jar | grep "weblogic/ant/taskdefs*" > /home/ehewitt/WeblogicJarAntTasks.txt
That produces 93 items for WebLogic 10.0, including our WLDeploy.class.
An excellent solution which helped in saving a lot of time for my project and resolved an issue which is pending in my project from a long time.Thanks a lot for your solution
Posted by: Anil Kumar | March 25, 2008 at 01:17 PM
Thanks It helped me alot
Posted by: mahesh Sirikonda | May 29, 2008 at 12:28 AM
I am getting the error below:
java.lang.NoClassDefFoundError: weblogic/utils/NestedException
i am trying to build an ejb jar for Weblogic 10, using Ant in Eclipse. This seems to be becuase the older weblogic jar had an "weblogic/utils/NestedException", but the Weblogic10 jar has a class "weblogic/auddi/NestedException".
I tried using the Ant in the Weblogic 10 folder also, with no success.
Any suggestions?
Thanks
Posted by: Karthika | December 08, 2008 at 07:37 AM
haha,
i know how to do.
Posted by: huangjianhui | July 07, 2009 at 01:42 AM