ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Venkatesh Vijayakumar04" <Venkatesh_...@infosys.com>
Subject RE: exit from the script running in the remote machine usingsshexec
Date Wed, 17 May 2006 02:24:19 GMT
I am using bea-weblogic 7.0SP3 version,so there is no possibility of
using the ant task provided by bea-weblogic 9.0 

-----Original Message-----
From: Anderson, Rob (Global Trade) [mailto:Rob.Anderson@nike.com] 
Sent: Tuesday, May 16, 2006 9:31 PM
To: Ant Users List
Subject: RE: exit from the script running in the remote machine
usingsshexec

I believe the functionality you are looking for is already available in
the Ant tasks provided by BEA. Please see the BEA documentation...

http://edocs.bea.com/wls/docs90/programming/ant_tasks.html

Similar tasks exist for earlier versions of Weblogic also. If you are
trying to start managed servers, you can do so remotely without using
the sshexec task.

-Rob Anderson 

> -----Original Message-----
> From: Venkatesh Vijayakumar04 [mailto:Venkatesh_V04@infosys.com] 
> Sent: Tuesday, May 16, 2006 1:57 AM
> To: Ant Users List
> Cc: atsuhiko.yamanaka@gmail.com
> Subject: FW: exit from the script running in the remote 
> machine using sshexec
> 
> 
> Hi
> 
> 
> 
> 
> 
> Thanks for your response.
> 
> 
> 
> 
> As many people said that sshexec has a bug in apache ant 
> 1.6.1.I have migrated to apache ant 1.6.5 so now I am using 
> jdk1.3 and apache ant
> 1.6.5 and jsch-0.1.28.In this case also the command executes 
> in the remote machine successfully but it throws Build 
> Failed. I am getting a problem like below. I have to close 
> this issue by today.My aim is to start,shutdown and deploy 
> the weblogic services in the remote machine from ant. Please 
> advice me how to solve this below issue .
> 
> 
> 
> 
> Connectt.sh
> 
> 
> 
> 
> cd bea/AMITSMILE/mydomain/
> 
> ./startapp.sh
> 
> if [ $? -eq 0 ]
> 
> then
> 
>  echo "Successful Connection"
> 
>  exit 0
> 
> fi
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> connect:
> 
>      [echo] Starting the FTP operation for using connect script
> 
>       [ftp] Opening FTP connection to 172.25.41.22
> 
>       [ftp] connected
> 
>       [ftp] logging in to FTP server
> 
>       [ftp] login succeeded
> 
>       [ftp] sending files
> 
>       [ftp] transferring C:\Automation\Build_Scripts\connectt.sh
> 
>       [ftp] File C:\Automation\Build_Scripts\connectt.sh copied to
> 172.25.41.22
> 
>       [ftp] 1 files sent
> 
>       [ftp] disconnecting
> 
>      [echo] Ending the FTP operation for using connect script
> 
>      [echo] Starting the SSHEXEC operation for using connect script
> 
>   [sshexec] Connecting to 172.25.41.22:22
> 
>   [sshexec] Successful Connection
> 
> 
> 
> 
> BUILD FAILED
> 
> java.lang.NoSuchMethodError
> 
>         at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1225)
> 
>         at 
> org.apache.tools.ant.Project.executeTarget(Project.java:1185)
> 
>         at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
> 
> cutor.java:40)
> 
>         at
> org.apache.tools.ant.Project.executeTargets(Project.java:1068)
> 
>         at org.apache.tools.ant.Main.runBuild(Main.java:668)
> 
>         at org.apache.tools.ant.Main.startAnt(Main.java:187)
> 
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
> 
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
> 
> --- Nested Exception ---
> 
> java.lang.NoSuchMethodError
> 
>         at com.jcraft.jsch.PortWatcher.<clinit>(Unknown Source)
> 
>         at com.jcraft.jsch.Session.disconnect(Unknown Source)
> 
>         at
> org.apache.tools.ant.taskdefs.optional.ssh.SSHExec.execute(SSHExec.ja
> 
> va:225)
> 
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> 
>         at org.apache.tools.ant.Task.perform(Task.java:364)
> 
>         at org.apache.tools.ant.Target.execute(Target.java:341)
> 
>         at org.apache.tools.ant.Target.performTasks(Target.java:369)
> 
>         at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
> 
>         at 
> org.apache.tools.ant.Project.executeTarget(Project.java:1185)
> 
>         at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
> 
> cutor.java:40)
> 
>         at
> org.apache.tools.ant.Project.executeTargets(Project.java:1068)
> 
>         at org.apache.tools.ant.Main.runBuild(Main.java:668)
> 
>         at org.apache.tools.ant.Main.startAnt(Main.java:187)
> 
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
> 
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
> 
> 
> 
> 
> Total time: 8 seconds
> 
> C:\Automation\Build_Scripts>
> 
> 
> 
> 
> -----Original Message-----
> From: atsuhiko.yamanaka@gmail.com [mailto:atsuhiko.yamanaka@gmail.com]
> On Behalf Of Atsuhiko Yamanaka
> Sent: Tuesday, May 16, 2006 2:12 PM
> To: Venkatesh Vijayakumar04
> Subject: Re: exit from the script running in the remote 
> machine using sshexec
> 
> 
> 
> 
> Hi,
> 
> 
> 
> 
> 2006/5/15, Venkatesh Vijayakumar04 <Venkatesh_V04@infosys.com>:
> 
> > I want to execute commands in the remote machine from ant.i used
> sshexec
> 
> > for execution, but what happens is, it establishes connection and
> 
> > executes commands successfully but the problem is the control is not
> 
> > returning to the ant build scripts once all the commands in 
> the shell
> 
> > scripts are executed.
> 
> ...
> 
> >
> 
> 
> ><target name="connect"
> 
> > <echo message="Starting the SSHEXEC operation for using connect
> script"/>
> 
> > <sshexec host="172.25.41.22"
> 
> >                username="e5760"
> 
> >                Password="******"
> 
> >                trust="true"
> 
> >               command="./connectt.sh"/>
> 
> > <echo message="Ending the SSHEXEC operation for using connect
> script"/>
> 
> > </target>
> 
> 
> 
> 
> How about "echo foo" instead of "./connect.sh" ?
> 
> Do you have also the problem?
> 
> If so, can you try
> 
>   http://www.jcraft.com/jsch/jsch-0.1.29-rc2-test.zip
> 
> # You may know that jsch is the core of sshexec task and has 
> developed by us.
> 
> 
> 
> 
> And also, what kind of sshd are you connecting to? OpenSSH or 
> other proprietary
> 
> sshd?
> 
> 
> 
> **************** CAUTION - Disclaimer ***************** This 
> e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION 
> intended solely for the use of the addressee(s). If you are 
> not the intended recipient, please notify the sender by 
> e-mail and delete the original message. Further, you are not 
> to copy, disclose, or distribute this e-mail or its contents 
> to any other person and any such actions are unlawful. This 
> e-mail may contain viruses. Infosys has taken every 
> reasonable precaution to minimize this risk, but is not 
> liable for any damage you may sustain as a result of any 
> virus in this e-mail. You should carry out your own virus 
> checks before opening the e-mail or attachment. Infosys 
> reserves the right to monitor and review the content of all 
> messages sent to or from this e-mail address. Messages sent 
> to or from this e-mail address may be stored on the Infosys 
> e-mail system.
> ***INFOSYS******** End of Disclaimer ********INFOSYS***
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message