Improve company productivity with a Business Account.Sign Up

x
?
Solved

Caught exception: java.io.IOException: No such file or directory when running cvs ant task

Posted on 2009-06-30
13
Medium Priority
?
1,752 Views
Last Modified: 2012-08-13
I am trying to write a script that can download a project from cvs.  It works on windows but if I put it on a fedora 10 machine. I receive this error and I can't seem to figure out what's causing it.
 [cvs] Caught exception: java.io.IOException: No such file or directory

I took a guess that maybe it was the .cvspass file since it comes right after that line and I tried just setting the rights on that file to 777 to make sure it had full access.  It had no effect and I still receive the error.

Below is the verbose log from the ant script

trak-checkout:
     [echo] Checking out the required sources from CVS
    [input] Please enter the tag name(default is head): [HEAD]
 
      [cvs] Using cvs passfile: /home/user/.cvspass
      [cvs] Executing 'cvs' with arguments:
      [cvs] '-d:pserver:ptg\username:******@10.0.1.26:/comanche'
      [cvs] '-q'
      [cvs] '-z3'
      [cvs] 'checkout'
      [cvs] '-rHEAD'
      [cvs] 'project_trak/trak'
      [cvs] 
      [cvs] The ' characters around the executable and arguments are
      [cvs] not part of the command.
      [cvs] 
      [cvs] 
      [cvs] environment:
      [cvs] 
      [cvs] 	ORBIT_SOCKETDIR=/tmp/orbit-alandauser
      [cvs] 	HOSTNAME=localhost.localdomain
      [cvs] 	SHELL=/bin/bash
      [cvs] 	TERM=xterm
      [cvs] 	HISTSIZE=1000
      [cvs] 	XDG_SESSION_COOKIE=0a5e7f3f32307f40b33b325f4a4507fe-1246368860.903027-2138618770
      [cvs] 	GTK_RC_FILES=/etc/gtk/gtkrc:/home/user/.gtkrc-1.2-gnome2
      [cvs] 	WINDOWID=69206079
      [cvs] 	USER=user
      [cvs] 	LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:do=00;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=00;32:*.tar=00;31:*.tgz=00;31:*.svgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.dz=00;31:*.gz=00;31:*.bz2=00;31:*.tbz2=00;31:*.bz=00;31:*.tz=00;31:*.deb=00;31:*.rpm=00;31:*.jar=00;31:*.rar=00;31:*.ace=00;31:*.zoo=00;31:*.cpio=00;31:*.7z=00;31:*.rz=00;31:*.jpg=00;35:*.jpeg=00;35:*.gif=00;35:*.bmp=00;35:*.pbm=00;35:*.pgm=00;35:*.ppm=00;35:*.tga=00;35:*.xbm=00;35:*.xpm=00;35:*.tif=00;35:*.tiff=00;35:*.png=00;35:*.mng=00;35:*.pcx=00;35:*.mov=00;35:*.mpg=00;35:*.mpeg=00;35:*.m2v=00;35:*.mkv=00;35:*.ogm=00;35:*.mp4=00;35:*.m4v=00;35:*.mp4v=00;35:*.vob=00;35:*.qt=00;35:*.nuv=00;35:*.wmv=00;35:*.asf=00;35:*.rm=00;35:*.rmvb=00;35:*.flc=00;35:*.avi=00;35:*.fli=00;35:*.gl=00;35:*.dl=00;35:*.xcf=00;35:*.xwd=00;35:*.yuv=00;35:*.svg=00;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:
      [cvs] 	GNOME_KEYRING_SOCKET=/tmp/keyring-XtaGY3/socket
      [cvs] 	SSH_AUTH_SOCK=/tmp/keyring-XtaGY3/ssh
      [cvs] 	SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/2161,unix/unix:/tmp/.ICE-unix/2161
      [cvs] 	USERNAME=user
      [cvs] 	MAIL=/var/spool/mail/user
      [cvs] 	PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/alandauser/bin
      [cvs] 	DESKTOP_SESSION=gnome
      [cvs] 	PWD=/home/user/Desktop
      [cvs] 	XMODIFIERS=@im=imsettings
      [cvs] 	LANG=en_US.UTF-8
      [cvs] 	GNOME_KEYRING_PID=2154
      [cvs] 	GDM_LANG=en_US.UTF-8
      [cvs] 	GDMSESSION=gnome
      [cvs] 	SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
      [cvs] 	SHLVL=7
      [cvs] 	HOME=/home/user
      [cvs] 	GNOME_DESKTOP_SESSION_ID=this-is-deprecated
      [cvs] 	LOGNAME=alandauser
      [cvs] 	DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-23vgO14Fua,guid=84f46e3f9c5c47660458f6484a4a145d
      [cvs] 	LESSOPEN=|/usr/bin/lesspipe.sh %s
      [cvs] 	DISPLAY=:0.0
      [cvs] 	G_BROKEN_FILENAMES=1
      [cvs] 	COLORTERM=gnome-terminal
      [cvs] 	CVS_PASSFILE=/home/user/.cvspass
      [cvs] Caught exception: java.io.IOException: No such file or directory

Open in new window

0
Comment
Question by:ethnarch
  • 7
  • 6
13 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 24749748
Your username is presumably something other than 'user' ..? 'user' looks like a placeholder to me
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24749755
If in doubt, run

whoami
0
 
LVL 2

Author Comment

by:ethnarch
ID: 24749814
I changed some of the values I didn't want to post this online

1. user is a place holder for my real username
2. username is also a place holder for my real username
3. project  is really the name of a project

0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 2000 total points
ID: 24749837
Please post result of


ls -l ~/.cvspass

Open in new window

0
 
LVL 2

Author Comment

by:ethnarch
ID: 24749941
[user@localhost ~]$ ls -l ~/.cvspass
-rwxrwxrwx 1 user user 57 2009-06-30 14:26 /home/user/.cvspass
[user@localhost ~]$


I had previously ran chmod a+rwx on it (only as a temporary solution) so it has all rights
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24749962
Well maybe that's not the file it's complaining about. What's the current ant command?
0
 
LVL 2

Author Comment

by:ethnarch
ID: 24749990
I am running the command below

ant -v -f setup.xml project-checkout

I'll post the script
0
 
LVL 2

Author Comment

by:ethnarch
ID: 24750014
below is the target that is being called
  <target name="project-checkout" depends="dir" 
          description="Update or check out required sources
                       from CVS">
 
    <echo message="Checking out the required sources from CVS"/>
	<cvspass cvsroot="${project.cvsroot}"
       password="password"
	   passfile=".cvspass"
	/>
	<input
		message="Please enter the tag name(default is head):"
		addproperty="cvs.tag"
		defaultvalue="HEAD"
	/>
    <cvs cvsroot="${project.cvsroot}" quiet="true"
         command="checkout" 
         dest="${src.local}" compression="true" 
		 tag="${cvs.tag}"
		 package="project_trak/trak"
		 />
  </target>

Open in new window

0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 2000 total points
ID: 24750072
You could try using the --debug parameter to Ant. Probably a good idea to echo the properties too to make sure they're set
0
 
LVL 2

Author Comment

by:ethnarch
ID: 24750162
I am only getting the lines below in between CVS_PASSFILE and the ioexception line

This really is one of those times where you just wished they put the file name out to the console/log.  Probably is a ridiculously simple problem, just can't figure out what the problem is!
      [cvs] 	CVS_PASSFILE=/home/alandauser/.cvspass
Execute:Java13CommandLauncher: Executing 'cvs' with arguments:
'-d:pserver:rtg\user:password@10.0.1.26:/comanche'
'-q'
'-z3'
'checkout'
'-rHEAD'
'project_trak/trak'
The ' characters around the executable and arguments are
not part of the command.
      [cvs] Caught exception: java.io.IOException: No such file or directory

Open in new window

0
 
LVL 2

Accepted Solution

by:
ethnarch earned 0 total points
ID: 24750204
I fixed it, ugh I didn't have cvs installed on the linux box.  On fedora i just did

yum install cvs

I got the clue from this site http://www.java-tips.org/other-api-tips/ant/how-to-use-cvs-task-2.html
where it says
     This task needs "cvs" on the path. If it isn't, you will get an error (such as error 2 on windows). If  
     <cvs> doesn't work, try to execute cvs.exe from the command line in the target directory in which
     you are working.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24750267
Glad you got it ;-)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24779182
:-)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
A discussion about automated testing of Web Applications utilizing Selenium, along with illustrated configuration steps for the Jenkins open source tool.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

584 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question