Access is denied. message appearing on trying to call ant targets any one hase an idea about this?

778 views
Skip to first unread message

Abhishek Bisht

unread,
Dec 11, 2013, 4:35:32 AM12/11/13
to jenkins...@googlegroups.com
Hi All

Access is denied. message appearing on whenever i am trying to build job whilc on executing from cmd its working fine

Thanks

Abhishek Bisht

unread,
Dec 11, 2013, 6:20:56 AM12/11/13
to jenkins...@googlegroups.com
my error log


ntrib-1.0b3.jar: 
  [taskdef] java.io.FileNotFoundException: C:\ant-contrib-1.0b3.jar (Access is denied)
  [taskdef] 	at java.util.zip.ZipFile.open(Native Method)
  [taskdef] 	at java.util.zip.ZipFile.<init>(ZipFile.java:114)
  [taskdef] 	at java.util.jar.JarFile.<init>(JarFile.java:135)
  [taskdef] 	at java.util.jar.JarFile.<init>(JarFile.java:99)
  [taskdef] 	at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1006)
  [taskdef] 	at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:149)
  [taskdef] 	at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.<init>(AntClassLoader.java:110)
  [taskdef] 	at org.apache.tools.ant.AntClassLoader.findResources(AntClassLoader.java:953)
  [taskdef] 	at org.apache.tools.ant.AntClassLoader.getNamedResources(AntClassLoader.java:922)
  [taskdef] 	at org.apache.tools.ant.loader.AntClassLoader5.getResources(AntClassLoader5.java:58)
  [taskdef] 	at org.apache.tools.ant.taskdefs.Definer.resourceToURLs(Definer.java:360)
  [taskdef] 	at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:246)
  [taskdef] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
  [taskdef] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  [taskdef] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  [taskdef] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  [taskdef] 	at java.lang.reflect.Method.invoke(Method.java:597)
  [taskdef] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
  [taskdef] 	at org.apache.tools.ant.Task.perform(Task.java:348)
  [taskdef] 	at org.apache.tools.ant.Target.execute(Target.java:435)
  [taskdef] 	at org.apache.tools.ant.Target.performTasks(Target.java:456)
  [taskdef] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
  [taskdef] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
  [taskdef] 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
  [taskdef] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
  [taskdef] 	at org.apache.tools.ant.Main.runBuild(Main.java:851)
  [taskdef] 	at org.apache.tools.ant.Main.startAnt(Main.java:235)
  [taskdef] 	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
  [taskdef] 	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Abhishek Bisht

unread,
Dec 11, 2013, 11:44:17 PM12/11/13
to jenkins...@googlegroups.com

Hi all

Please refer screenshot for more details it would be really helpful if some one know its solution

On Wednesday, 11 December 2013 15:05:32 UTC+5:30, Abhishek Bisht wrote:
jenkins error.png

Mark Waite

unread,
Dec 12, 2013, 12:01:53 AM12/12/13
to jenkins...@googlegroups.com
I think the "access denied" message usually hints that there is a permission problem which prevents access to that file.

Have you checked on that specific node to confirm the file C:\ant-contrib-1.0b3.jar exists and can be read by the user running the Jenkins process?

Mark Waite


--
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-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Abhishek Bisht

unread,
Dec 12, 2013, 12:07:27 AM12/12/13
to jenkins...@googlegroups.com
yes i have provided access to everyone on file security mode but jenkins still not able to get the fil

Mark Waite

unread,
Dec 12, 2013, 12:14:45 AM12/12/13
to jenkins...@googlegroups.com
You might try some simple steps in a trivial job, like COPY C:\ant-contrib-1.0b3.jar %TEMP%, just to prove to yourself that the file can be read by the Jenkins user using other commands.  Another simple command to test might be "jar tvf C:\ant-contrib-1.0b3.jar" to prove that the contents of the file are readable and are a jar file.

Mark Waite

Abhishek Bisht

unread,
Dec 12, 2013, 1:58:35 AM12/12/13
to jenkins...@googlegroups.com
Yes its a permission issue but as i have already given permission for the file  any suggestion for the solution

Mark Waite

unread,
Dec 12, 2013, 9:14:46 AM12/12/13
to jenkins...@googlegroups.com

How about

DEL C:\ant-contrib-1.0b3.jar

COPY %ANT_HOME%\ant-contrib-1.0b3.jar C:\ant-contrib-1.0b3.jar

That source location (%ANT_HOME%) may not be the location to find the ant-contrib jar file, but if that is not the location, I suspect you can find it elsewhere on your system, or download it again.

I thought I remembered a facility in Windows which would allow a user to copy or modify files in otherwise secured locations, without actually making those files or their changes visible to any other user.  If something like that had happened in this case, then the original user who copied the file to C:\ might be able to see it while other users would not be able to see it.  Unfortunately, my few minutes of google search did not find any indication that there is such a facility.

Mark Waite

Reply all
Reply to author
Forward
0 new messages