Question : weblogic deploy using ant?

I got the following error while deploying a war file into weblogic.
 $ant deploy-war
Buildfile: build.xml

deploy-war:
     [java] Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/deploy
     [java] Caused by: java.lang.ClassNotFoundException: weblogic.deploy
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
     [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
     [java]     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

BUILD FAILED
/export/home/abcde/build.xml:146: Java returned: 1


I have used in ant for deploying application in weblogic 10.3

what could be the reason for this?


Thanks,

Answer : weblogic deploy using ant?

Charan,

In weblogic 9.x and higher, there is a concept of locking and unlocking in weblogic admin console. i.e, you click on lock button in console to start deploying and make changes (I guess the button no top left corner goes green). When you are done with changes, you release that lock by clicking on "Apply changes" button. i.e same button.

Now, in one of your browser sessions you already have that locked it. And when you try to deploy through command prompt, it is trying to aquire the lock as well. Hence this exception.

Soln:  Release the lock by clicking on the button in top left most corner (first button) by logging into admin console. Now, run this ant script from command line.

Random Solutions  
 
programming4us programming4us