ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SHAILJA <shalja.ru...@gmail.com>
Subject Re: Ant1.8 copy task gives error "Failed to copy" with "Permission denied"
Date Tue, 13 Apr 2010 14:14:23 GMT

install_scripts:
    [mkdir] Skipping /u/kumari/main/shailja/bin/share because it already
exists.
     [copy] load_stats.pl added as load_stats.pl is outdated.
     [copy] No sources found.
     [copy] Copying 1 file to /u/kumari/main/shailja/bin/share
     [copy] Copying
/u/kumari/main/shailja/src/java/a/utd/writer/realtimelagstats/load_stats.pl
to /u/kumari/main/shailja/bin/share/load_stats.pl
      [ant] Exiting /u/kumari/main/shailja/src/java/a/build.xml.

BUILD FAILED
/u/kumari/main/shailja/src/java/build.xml:13: The following error occurred
while executing this line:
/u/kumari/main/shailja/src/java/a/build.xml:17: The following error occurred
while executing this line:
/u/kumari/main/shailja/src/java/a/guas/build.xml:193: The following error
occurred while executing this line:
/u/kumari/main/shailja/src/java/a/guas/utd/build.xml:60: The following error
occurred while executing this line:
/u/kumari/main/shailja/src/java/a/guas/utd/writer/build.xml:69: The
following error occurred while executing this line:
/etc/ScriptBuild.xml:50: Failed to copy
/u/kumari/main/shailja/src/java/a/guas/utd/writer/realtimelagstats/load_stats.pl
to /u/kumari/main/shailja/bin/share/load_stats.pl due to
java.io.FileNotFoundException /u/kumari/main/shailja/bin/share/load_stats.pl
(Permission denied)
	at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:839)
	at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:508)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:390)
	at org.apache.tools.ant.Target.performTasks(Target.java:411)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
	at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:390)
	at org.apache.tools.ant.Target.performTasks(Target.java:411)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
	at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:390)
	at org.apache.tools.ant.Target.performTasks(Target.java:411)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
	at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:390)
	at org.apache.tools.ant.Target.performTasks(Target.java:411)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
	at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:390)
	at org.apache.tools.ant.Target.performTasks(Target.java:411)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
	at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:390)
	at org.apache.tools.ant.Target.performTasks(Target.java:411)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1329)
	at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
	at org.apache.tools.ant.Main.runBuild(Main.java:801)
	at org.apache.tools.ant.Main.startAnt(Main.java:218)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.io.FileNotFoundException:
/u/kumari/main/shailja/bin/share/load_stats.pl (Permission denied)
	at java.io.FileOutputStream.open(Native Method)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
	at
org.apache.tools.ant.util.ResourceUtils.copyResource(ResourceUtils.java:460)
	at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:519)
	at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:481)
	at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:310)
	at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:827)
	... 77 more

Total time: 1 minute 14 seconds

>>
 ls -alh
/u/kumari/main/shailja/src/java/a/guas/utd/writer/realtimelagstats/load_stats.pl
-rwxrwxr-x

this file exists with right permission
>>
copy task should copy from source to detination location
/u/kumari/main/shailja/bin/share/load_stats.pl 
here location /u/kumari/main/shailja/bin/share exists and no symlink is
there.




Stefan Bodewig wrote:
> 
> On 2010-04-12, SHAILJA <shalja.rudra@gmail.com> wrote:
> 
>> I am executing ant from /u/kumari/main/shailja/src/java, means my
>> build.xml
>> file is /u/kumari/main/shailja/src/java/build.xml. The error occurs only
>> if
>> I invoke ant from src/java in my project. The error is not comming if I
>> invoke ant from /u/kumari/main/shailja/src/java/a/jsh/mm. what could be
>> the
>> reason behind it?
> 
> Hard to tell without looking at your filesystem.  A symbolic link (sorry
> to bring that up again 8-) using a relative path would be different if
> you followed it from different places.
> 
>> Even the output in verbose mode is not clear to say what ant1.8 is
>> doing.
> 
> It may be clearer for one of Ant's developers.  Could you please at
> least give us the full stack trace of the exception so we can see which
> file operation is failing?
> 
> Stefan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Ant1.8-copy-task-gives-error-%22Failed-to-copy%22-with-%22Permission-denied%22-tp28179282p28230841.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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


Mime
View raw message