GRECLIPSE
  1. GRECLIPSE
  2. GRECLIPSE-411

NoClassDefFoundError exception when using a Grab annotation

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0alpha
    • Fix Version/s: 2.6.0.Release
    • Component/s: None
    • Labels:
    • Environment:
    • Number of attachments :
      0

      Description

      When I try to compile a code with a @Grab annotation:

      import groovy.lang.Grab;
      
      @Grab(group="joda-time", module="joda-time", version="1.6")
      def printDate() {
             def dt = new DateTime()
      }
      

      I get the following exception:

      Error
      Sat Sep 26 14:58:46 CEST 2009
      Error in JDT Core during AST creation

      java.lang.NoClassDefFoundError: org/apache/ivy/core/report/ResolveReport
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
      at java.lang.Class.getDeclaredMethods(Class.java:1791)
      at org.codehaus.groovy.reflection.CachedClass$3$1.run(CachedClass.java:83)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:80)
      at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:79)
      at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:33)
      at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:20)
      at org.codehaus.groovy.reflection.CachedClass.getMethods(CachedClass.java:249)
      at groovy.lang.MetaClassImpl.populateMethods(MetaClassImpl.java:341)
      at groovy.lang.MetaClassImpl.fillMethodIndex(MetaClassImpl.java:291)
      at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:2889)
      at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:154)
      at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:170)
      at groovy.grape.GrapeIvy.$getStaticMetaClass(GrapeIvy.groovy)
      at groovy.grape.GrapeIvy.<init>(GrapeIvy.groovy:49)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at java.lang.Class.newInstance0(Class.java:355)
      at java.lang.Class.newInstance(Class.java:308)
      at groovy.grape.Grape.getInstance(Grape.java:103)
      at groovy.grape.Grape.grab(Grape.java:138)
      at groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:176)
      at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:268)
      at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:863)
      at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:478)
      at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.processToPhase(GroovyCompilationUnitDeclaration.java:137)
      at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyParser.dietParse(GroovyParser.java:115)
      at org.codehaus.jdt.groovy.integration.internal.MultiplexingCommentRecorderParser.dietParse(MultiplexingCommentRecorderParser.java:48)
      at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:769)
      at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:389)
      at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:838)
      at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:545)
      at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:908)
      at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:657)
      at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider$1.run(ASTProvider.java:544)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:537)
      at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:478)
      at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:468)
      at org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:126)
      at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:169)
      at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:154)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
      Caused by: java.lang.ClassNotFoundException: org.apache.ivy.core.report.ResolveReport
      at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:489)
      at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:405)
      at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:393)
      at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
      ... 47 more

        Activity

        Hide
        Andy Clement added a comment - - edited

        nothing further I plan to do here for now

        Show
        Andy Clement added a comment - - edited nothing further I plan to do here for now
        Hide
        Andrew Eisenberg added a comment -

        Andy, assigning to you. Should this bug be closed, or should the target of 2.0.2 be moved?

        Show
        Andrew Eisenberg added a comment - Andy, assigning to you. Should this bug be closed, or should the target of 2.0.2 be moved?
        Hide
        Andy Clement added a comment -

        just to note reconciling for grab is currently broken

        Show
        Andy Clement added a comment - just to note reconciling for grab is currently broken
        Hide
        Andrew Eisenberg added a comment -

        Andy, assigning to you to see if there's anything you can do before the 2.0.2 release.

        Show
        Andrew Eisenberg added a comment - Andy, assigning to you to see if there's anything you can do before the 2.0.2 release.
        Hide
        Andy Clement added a comment -

        Reconcile producing extra errors is fixed with changes for STS-1360.

        Show
        Andy Clement added a comment - Reconcile producing extra errors is fixed with changes for STS-1360.

          People

          • Assignee:
            Andy Clement
            Reporter:
            Dominik Leszyk
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: