GRECLIPSE
  1. GRECLIPSE
  2. GRECLIPSE-1385

An internal error occurred during: "Refresh DSLD scripts"

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.0.Release
    • Fix Version/s: 2.7.1.Release
    • Component/s: None
    • Labels:
      None
    • Environment:
      Eclipse IDE 3.7 SR2 EE
      JDK 1.7 update 2
      m2e 1.0.100
      Groovy-Eclipse M2E integration 2.6.0
    • Number of attachments :
      0

      Description

      On importing existing Maven projects, out of which some use groovy, error dialog gets shown:

      An internal error occurred during: "Refresh DSLD scripts"

      Also in eclipse log file following entry appears:

      !ENTRY org.eclipse.core.jobs 4 2 2012-03-02 09:18:13.468
      !MESSAGE An internal error occurred during: "Refresh DSLD scripts".
      !STACK 0
      BUG! exception in phase 'semantic analysis' in source unit 'DSLD_meta_script.dsld' Argument "clazz" must not be null!
      	at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:929)
      	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:594)
      	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:543)
      	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:306)
      	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:287)
      	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:267)
      	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:214)
      	at org.codehaus.groovy.eclipse.dsl.script.DSLDScriptExecutor.executeScript(DSLDScriptExecutor.java:240)
      	at org.codehaus.groovy.eclipse.dsl.RefreshDSLDJob.refreshProject(RefreshDSLDJob.java:295)
      	at org.codehaus.groovy.eclipse.dsl.RefreshDSLDJob.run(RefreshDSLDJob.java:227)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
      Caused by: java.lang.IllegalArgumentException: Argument "clazz" must not be null!
      	at org.eclipse.equinox.weaving.internal.caching.BundleCachingService.storeClass(Unknown Source)
      	at org.eclipse.equinox.weaving.adaptors.WeavingAdaptor.storeClass(Unknown Source)
      	at org.eclipse.equinox.weaving.hooks.WeavingHook.recordClassDefine(Unknown Source)
      	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:614)
      	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:562)
      	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:486)
      	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:459)
      	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
      	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
      	at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35)
      	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:473)
      	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
      	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
      	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
      	at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:696)
      	at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:564)
      	at org.codehaus.groovy.control.ResolveVisitor.resolveToClass(ResolveVisitor.java:842)
      	at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:364)
      	at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:316)
      	at org.codehaus.groovy.control.ResolveVisitor.transformPropertyExpression(ResolveVisitor.java:1014)
      	at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:877)
      	at org.codehaus.groovy.ast.expr.MapEntryExpression.transformExpression(MapEntryExpression.java:41)
      	at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:892)
      	at org.codehaus.groovy.ast.expr.Expression.transformExpressions(Expression.java:63)
      	at org.codehaus.groovy.ast.expr.NamedArgumentListExpression.transformExpression(NamedArgumentListExpression.java:36)
      	at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:892)
      	at org.codehaus.groovy.ast.expr.Expression.transformExpressions(Expression.java:49)
      	at org.codehaus.groovy.ast.expr.TupleExpression.transformExpression(TupleExpression.java:82)
      	at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:892)
      	at org.codehaus.groovy.control.ResolveVisitor.transformMethodCallExpression(ResolveVisitor.java:1222)
      	at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:883)
      	at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitExpressionStatement(ClassCodeExpressionTransformer.java:139)
      	at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
      	at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:35)
      	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:179)
      	at org.codehaus.groovy.control.ResolveVisitor.visitBlockStatement(ResolveVisitor.java:1505)
      	at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
      	at org.codehaus.groovy.control.ResolveVisitor.transformClosureExpression(ResolveVisitor.java:1201)
      	at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:885)
      	at org.codehaus.groovy.ast.expr.Expression.transformExpressions(Expression.java:49)
      	at org.codehaus.groovy.ast.expr.ArgumentListExpression.transformExpression(ArgumentListExpression.java:67)
      	at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:892)
      	at org.codehaus.groovy.control.ResolveVisitor.transformMethodCallExpression(ResolveVisitor.java:1222)
      	at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:883)
      	at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitExpressionStatement(ClassCodeExpressionTransformer.java:139)
      	at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
      	at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:35)
      	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:179)
      	at org.codehaus.groovy.control.ResolveVisitor.visitBlockStatement(ResolveVisitor.java:1505)
      	at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
      	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:102)
      	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:113)
      	at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitConstructorOrMethod(ClassCodeExpressionTransformer.java:50)
      	at org.codehaus.groovy.control.ResolveVisitor.visitConstructorOrMethod(ResolveVisitor.java:225)
      	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:124)
      	at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1172)
      	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:51)
      	at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1440)
      	at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:200)
      	at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:659)
      	at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:920)
      	... 10 more
      

        Activity

        Hide
        Andrew Eisenberg added a comment -

        To get a little more context here:

        1. Is this problem repeatable?
        2. Do you see any behaviors not working for you?
        3. If you go to Preferences -> Groovy -> DSLD and click "Recompile Scripts", does the problem happen again?

        Also, if this is reproducible, any chance I can get a hold of the maven project that causes this?

        Show
        Andrew Eisenberg added a comment - To get a little more context here: Is this problem repeatable? Do you see any behaviors not working for you? If you go to Preferences -> Groovy -> DSLD and click "Recompile Scripts", does the problem happen again? Also, if this is reproducible, any chance I can get a hold of the maven project that causes this?
        Hide
        Andrew Eisenberg added a comment -

        Here is what is going on: This problem is happening while compiling a DSLD script. The DSLD script is compiled using a classloadeer that is a child of an Eclipse (OSGi) classloader. You have equinox weaving installed in your Eclipse (a part of AJDT). Equinox weaving is attempting to cache the woven class after it has been loaded, but is getting an error there.

        However, equinox weaving has no business trying to touch the DSLD class since it is not an aspect class, nor will it have any aspects applied to it. Rather, it should be ignored by equinox weaving.

        Show
        Andrew Eisenberg added a comment - Here is what is going on: This problem is happening while compiling a DSLD script. The DSLD script is compiled using a classloadeer that is a child of an Eclipse (OSGi) classloader. You have equinox weaving installed in your Eclipse (a part of AJDT). Equinox weaving is attempting to cache the woven class after it has been loaded, but is getting an error there. However, equinox weaving has no business trying to touch the DSLD class since it is not an aspect class, nor will it have any aspects applied to it. Rather, it should be ignored by equinox weaving.
        Hide
        Andrew Eisenberg added a comment -
        Show
        Andrew Eisenberg added a comment - Raised an equinox weaving bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=373397
        Hide
        Andrew Eisenberg added a comment -

        Will ask to get it fixed for 2.7.0.

        Show
        Andrew Eisenberg added a comment - Will ask to get it fixed for 2.7.0.
        Hide
        Stevo Slavic added a comment -

        Great, thanks! Just voted there.

        Show
        Stevo Slavic added a comment - Great, thanks! Just voted there.
        Hide
        Andy Clement added a comment -

        As mentioned in the other bug - it is possible the Java7 verification strictness is a factor here. To see if it makes any difference you could try running with the older verifier strategy by starting the JVM with this option:

        -XX:-UseSplitVerifier

        I think you'll need to put it in the vmargs section in the sts.ini (or eclipse.ini) file.

        Show
        Andy Clement added a comment - As mentioned in the other bug - it is possible the Java7 verification strictness is a factor here. To see if it makes any difference you could try running with the older verifier strategy by starting the JVM with this option: -XX:-UseSplitVerifier I think you'll need to put it in the vmargs section in the sts.ini (or eclipse.ini) file.
        Hide
        Stevo Slavic added a comment -

        Configuring UseSplitVerifier did the trick. Thanks!

        Show
        Stevo Slavic added a comment - Configuring UseSplitVerifier did the trick. Thanks!
        Hide
        Stevo Slavic added a comment -

        Unfortunately now other things started breaking, e.g. here is stacktrace:

        !ENTRY org.eclipse.core.jobs 4 2 2012-03-08 11:30:36.873
        !MESSAGE An internal error occurred during: "Initialize Java Debug Options".
        !STACK 0
        java.lang.IllegalArgumentException: Argument "clazz" must not be null!
        	at org.eclipse.equinox.weaving.internal.caching.BundleCachingService.storeClass(Unknown Source)
        	at org.eclipse.equinox.weaving.adaptors.WeavingAdaptor.storeClass(Unknown Source)
        	at org.eclipse.equinox.weaving.hooks.WeavingHook.recordClassDefine(Unknown Source)
        	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:614)
        	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:562)
        	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:486)
        	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:459)
        	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
        	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
        	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
        	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
        	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
        	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
        	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        	at org.eclipse.jdt.debug.core.JDIDebugModel.createExceptionBreakpoint(JDIDebugModel.java:437)
        	at org.eclipse.jdt.internal.debug.ui.JavaDebugOptionsManager$InitJob.run(JavaDebugOptionsManager.java:153)
        	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
        

        "Argument "clazz" must not be null!" error also appeared when just opening type in editor.

        Show
        Stevo Slavic added a comment - Unfortunately now other things started breaking, e.g. here is stacktrace: !ENTRY org.eclipse.core.jobs 4 2 2012-03-08 11:30:36.873 !MESSAGE An internal error occurred during: "Initialize Java Debug Options". !STACK 0 java.lang.IllegalArgumentException: Argument "clazz" must not be null! at org.eclipse.equinox.weaving.internal.caching.BundleCachingService.storeClass(Unknown Source) at org.eclipse.equinox.weaving.adaptors.WeavingAdaptor.storeClass(Unknown Source) at org.eclipse.equinox.weaving.hooks.WeavingHook.recordClassDefine(Unknown Source) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:614) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:562) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:486) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:459) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216) at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400) at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) at org.eclipse.jdt.debug.core.JDIDebugModel.createExceptionBreakpoint(JDIDebugModel.java:437) at org.eclipse.jdt.internal.debug.ui.JavaDebugOptionsManager$InitJob.run(JavaDebugOptionsManager.java:153) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) "Argument "clazz" must not be null!" error also appeared when just opening type in editor.
        Hide
        Andrew Eisenberg added a comment -

        The fix for this is now in Equinox 3.8 (available in the e42 branch of groovy-eclipse). I am resolving this bug. If you still see it in e42, then something else is going on and please raise a new issue.

        Show
        Andrew Eisenberg added a comment - The fix for this is now in Equinox 3.8 (available in the e42 branch of groovy-eclipse). I am resolving this bug. If you still see it in e42, then something else is going on and please raise a new issue.

          People

          • Assignee:
            Andrew Eisenberg
            Reporter:
            Stevo Slavic
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: