• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Access denied Error in the Ant

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While building using maven or ant for the huge application,

the below error occur. Please advise to resolve the error:

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Unable to write files: C:\Users\m1018785\.jenkins\workspace\PATH\TO\LOCAL\JAVA\FILE.java (Access is denied)

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch

Thanks in advance
 
Ranch Hand
Posts: 440
Hibernate Eclipse IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

(Access is denied)



This is just a write-permission related issue. See if you have the required permission to write in the specified file.
 
karthikeyan suresh
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I think it is not a write access error. I am able to proceed with the build if i try twice or thrice...But it is giving this error frequently and waste lot of time.

Regards,
Karthik
 
Saif Asif
Ranch Hand
Posts: 440
Hibernate Eclipse IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am able to proceed with the build if i try twice or thrice



If you are able to do that after re-attempts then it might be a file locking issue. Is it possible that the file may be open for writing by another thread ? Could it be a synchronization issue ? Also how are you writing to the file ?
 
karthikeyan suresh
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Saif,

Just while building using mvn clean install command, frequently that error occurs and wasting lot of time...Once that error occurs, if we reattempt, the build is getting through.

Any permanent solution?
 
Saif Asif
Ranch Hand
Posts: 440
Hibernate Eclipse IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

karthikeyan suresh wrote:Hi Saif,

Just while building using mvn clean install command, frequently that error occurs and wasting lot of time...Once that error occurs, if we reattempt, the build is getting through.

Any permanent solution?



Well before proposing a permanent fix , we first need to find the root cause of the problem and see where is the problem coming from. Can you share here how is the write process being done ?
 
karthikeyan suresh
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just i have executed the mvn clean install in my local directory(where the pom file exists). It trying to install the package into the local repository. Logs:

154 [main] INFO xjcmarkentity.MarkEntities - processing is: Gr2
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Unable to write files: C:\Users\m1018785\.jenkins\workspace\PATH\TO\LOCAL\JAVA\FILE.java (Access is denied)

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 minutes 57 seconds
[INFO] Finished at: Wed May 15 11:11:11 BST 2013
[INFO] Final Memory: 40M/133M
[INFO] ------------------------------------------------------------------------
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE
 
Saif Asif
Ranch Hand
Posts: 440
Hibernate Eclipse IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

karthikeyan suresh wrote:Just i have executed the mvn clean install in my local directory(where the pom file exists). It trying to install the package into the local repository. Logs:

154 [main] INFO xjcmarkentity.MarkEntities - processing is: Gr2
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Unable to write files: C:\Users\m1018785\.jenkins\workspace\PATH\TO\LOCAL\JAVA\FILE.java (Access is denied)

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 minutes 57 seconds
[INFO] Finished at: Wed May 15 11:11:11 BST 2013
[INFO] Final Memory: 40M/133M
[INFO] ------------------------------------------------------------------------
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE



Can you clean your .m2 repo and test it again ?
 
karthikeyan suresh
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Yes correct. If i clean in the repo and try the issue is getting resolved. But after some time, the same issue is existing in differenct module.

Morning i faced the similar issue in one module, after that i cleaned up the repo and build it again. it is resolved.

Afternoon while trying again i am gettin the similar issue. So lot of time are getting wasted and needs to start once again from scratch.

Regards,
Karthik
 
Saif Asif
Ranch Hand
Posts: 440
Hibernate Eclipse IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It seems that some of your artifacts are not getting installed correctly. I have a hunch this is a configuration bug. Which IDE are you using ? Netbeans or Eclipse ?
 
karthikeyan suresh
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Eclipse. Repository manager we are using Artifactory.
 
Saif Asif
Ranch Hand
Posts: 440
Hibernate Eclipse IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look at the Artifactory logs . There will be an IOException coming . Paste the recent log here (not the whole log file ) .
 
karthikeyan suresh
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Access denied error
 
Saif Asif
Ranch Hand
Posts: 440
Hibernate Eclipse IDE Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

karthikeyan suresh wrote:Access denied error



No I want to see the whole stack trace.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic