One Star

commandline.bat not working

Hi,
I'm running TIS 4.0.2 on a Windows 7 machine and I'm trying to drive Talend from the command line. I ran commandline.bat from a DOS prompt but got the attached error message (sorry, I couldn't copy and past it). For the record, commandline.bat contains:
TISEE-win32-x86.exe -nosplash -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace startServer -p 8002
The error message states the jvm terminated with an exit code of -1, but there's no obvious "error". Can anybody help? I noticed both my CLASSPATH and JAVA_HOME parameters were empty. Could that explain it?
Any help, greatly appreciated.
4 REPLIES
Community Manager

Re: commandline.bat not working

Hi
Is your system a 64bit or 32bit machine? Please see a related 11124.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: commandline.bat not working

Hi Shong,
I'm running a 64 bit machine. I took your hint and changed the command to use the 64 bit executable, as follows:
TISEE-win32-x86_64.exe -nosplash -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace startServer -p 8002
The good news is I now don't get an error. The bad news is nothing much else happens (see attached). Am I supposed to see something after the command executes (like a TIS prompt, for example)?
Just to be sure, I should point out I'm running this command on my local machine (where I've installed the TIS client), not the Talend server. Is that OK?
Even better, Shong, do you have an example of a "commandline" scripting conversation that runs TIS from the command line? That way, I will know what to aim for. I'm working somewhat blind at the moment.
Many thanks,
Keith
One Star

Re: commandline.bat not working

Further news:
I found this file ".log" in directory C:\TIS_EE-All-r43696-V4.0.2\TIS_EE-All-r43696-V4.0.2\commandline-workspace\.metadata
I tried to attach it, but the website wouldn't let me, so I've pasted it below.
It may be helpful.
Regards,
Keith
=================================================================

!SESSION 2010-07-19 09:12:12.956 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en
Framework arguments: -application org.talend.commandline.CommandLine
Command-line arguments: -os win32 -ws win32 -arch x86_64 -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace
!ENTRY org.talend.commandline 1 0 2010-07-19 09:12:13.848
!MESSAGE Starting up Command Line Application
!ENTRY org.talend.commandline 1 0 2010-07-19 09:12:14.485
!MESSAGE Shutting down Command Line Application
!SESSION 2010-07-19 09:13:10.842 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en
Framework arguments: -application org.talend.commandline.CommandLine startServer -p 8002
Command-line arguments: -os win32 -ws win32 -arch x86_64 -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace startServer -p 8002
!ENTRY org.talend.commandline 1 0 2010-07-19 09:13:11.745
!MESSAGE Starting up Command Line Application
!ENTRY org.talend.commandline 1 0 2010-07-19 09:13:12.118
!MESSAGE Server is shutting down : Unrecognized Windows Sockets error: 0: JVM_Bind
!ENTRY org.talend.commandline 1 0 2010-07-19 09:13:12.280
!MESSAGE Shutting down Command Line Application
!SESSION 2010-07-19 10:22:27.742 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en
Framework arguments: -application org.talend.commandline.CommandLine
Command-line arguments: -os win32 -ws win32 -arch x86_64 -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace
!ENTRY org.talend.commandline 1 0 2010-07-19 10:22:28.816
!MESSAGE Starting up Command Line Application
!ENTRY org.talend.commandline 1 0 2010-07-19 10:22:29.855
!MESSAGE Shutting down Command Line Application
!SESSION 2010-07-19 10:22:38.885 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en
Framework arguments: -application org.talend.commandline.CommandLine shell
Command-line arguments: -os win32 -ws win32 -arch x86_64 -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace shell
!ENTRY org.talend.commandline 1 0 2010-07-19 10:22:39.762
!MESSAGE Starting up Command Line Application
!ENTRY org.talend.commandline 1 0 2010-07-19 10:22:40.337
!MESSAGE Shutting down Command Line Application
!SESSION 2010-07-19 10:31:54.664 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en
Framework arguments: -application org.talend.commandline.CommandLine startServer -p 8002
Command-line arguments: -os win32 -ws win32 -arch x86_64 -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace startServer -p 8002
!ENTRY org.talend.commandline 1 0 2010-07-19 10:31:55.546
!MESSAGE Starting up Command Line Application
!ENTRY org.talend.commandline 1 0 2010-07-19 10:31:55.909
!MESSAGE Server is shutting down : Unrecognized Windows Sockets error: 0: JVM_Bind
!ENTRY org.talend.commandline 1 0 2010-07-19 10:31:56.071
!MESSAGE Shutting down Command Line Application
One Star

Re: commandline.bat not working

OK, got it to work. Here's a cutdown and anonymized version of my bash shell script that I run directly on the Talend server. The pathnames within it will need some tweaking to make it actually run.

#!/bin/sh
read -s -p "Enter your password to the subversion repository YOUR_REPOSITORY: " repository_password
echo "initRemote http://localhost:8080/org.talend.administrator/" > script.tld # start new file
echo "logonProject -pn YOUR_PROJECT -ul YOUR_REPOSITORY_USERNAME -up $repository_password" >> script.tld
echo "executeJob NAME_OF_TALEND_JOB -i /usr/lib/jvm/java-1.4.2/bin/java -jv 0.1 -jc Prod -jrdd ../results001" >> script.tld
rm -f ../results001/*
....../talend/commandline/TISEE-linux-gtk-x86 -nosplash -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace scriptFile "script.tld"
rm -f script.tld # because it contains a cleartext password

I hope this helps.