Bharath Raj (2015-04-22 21:28):
Hi team ,
I am trying to deploy artifact through Weblogic server ..After building project 
I have written build.xml which is generating war successfully .. I am able to 
undeploy but while deploying I am getting the below error . Could you please 
help me in solving the issue and let me know the cause for the error..

  Task completed abnormally (exit code =1) .

Not sure about Weblogic server, but for Tomcat the best way to make sure deployment works is to stop the server (and wait for it to actually stop) and then copy war and then start the sever again.

Here is a stopping script which you could adjust for Weblogic server:
# Set timeout (in seconds).
# default value
TIMEOUT=240
# run-time value
if [ ! -z "$1" ]; then
    TIMEOUT=$1
fi
echo "[INFO] Timeout will occur at: " $(date -d "$TIMEOUT seconds")

# stopping...
/etc/init.d/tomcat stop

# timeout setup
END_TIME=$(date -d "$TIMEOUT seconds" +%s)

# waiting...
echo "-------------------"
echo "  Stop log"
echo "- - - - - - - - - -"
while read line
do
    echo $line
    if echo $line|grep -i "INFO: Destroying ProtocolHandler \[\"ajp"
    then
        break
    fi
    # break if no java is running...
    runningJava=`ps -A|grep -i "java"`
    if [ -z "$runningJava" ]
    then
        echo "[INFO] Java is not running"
        break
    fi
    if [ $(date +%s) -ge $END_TIME ]
    then
        echo "[INFO] Timeout occurred - killing java"
        killall java
        break
    fi
done < <(tail -5f /usr/share/apache-tomcat/logs/catalina.out)
echo -e "\n-------------------\n\n"

--
You received this message because you are subscribed to the Google Groups "Jenkins 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5538BDA8.8000909%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.

Reply via email to