Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-6717

CLONE - Occasional "Access is denied" message with <groovyc>

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.5.6, 1.5.7, 1.6-beta-2
    • Fix Version/s: None
    • Component/s: class generator
    • Labels:
      None
    • Environment:
      Windows Server 2003 R2 SP2 (virtual machine)
      Intel Xeon CPU
      Java 1.5.0_12
      Ant 1.7.0

      Description

      I've seen this problem with 1.5.6, 1.5.7, and 1.6-beta-2.

      Occasionally I am seeing a IOException "Access is denied" during <groovyc>.

      The stacktrace mentions java.io.IOException: Access is denied at java.io.WinNTFileSystem.createFileExclusively(Native Method) when the groovy compiler is trying to create a temp dir (FileSystemCompiler.createTempDir).

      I put code in to look for an exception that says "java.io.IOException: Access is denied". If it happens, I have it retry. I think it usually passes the second time.

      An improvement would be to keep this from happening or to retry when it happens.

      Here are interesting parts of the stacktrace:

      : Compilation Failed at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:798) at org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:531)

      java.io.IOException: Access is denied at org.codehaus.groovy.ant.Groovyc.makeCompileUnit(Groovyc.java:820) at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:783) ... 170 more

      Caused by: java.io.IOException: Access is denied at java.io.WinNTFileSystem.createFileExclusively(Native Method) at java.io.File.checkAndCreate(File.java:1345) at java.io.File.createTempFile(File.java:1434) at java.io.File.createTempFile(File.java:1471) at org.codehaus.groovy.tools.FileSystemCompiler.createTempDir(FileSystemCompiler.java:266) at org.codehaus.groovy.ant.Groovyc.makeCompileUnit(Groovyc.java:816) ... 171 more

      — Nested Exception ---java.io.IOException: Access is denied at org.codehaus.groovy.ant.Groovyc.makeCompileUnit(Groovyc.java:820) at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:783) at org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:531) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at groovy.util.AntBuilder.nodeCompleted(AntBuilder.java:204) at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:153) at groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:154) at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:41) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:41) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128) at com.sas.djte.library.DJTE$_buildTestware_closure3.doCall(DJTE.groovy:119) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:271) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:845) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:58) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:142) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:150)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                blackdrag Jochen Theodorou
                Reporter:
                brahmanand Brahma Choudhary
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: