Yegor Bryukhov | 10 May 03:16
Picon

Re: [groovy-user] problems compiling with 1.6-beta1

>
> org/codehaus/groovy/runtime/callsite/CallSite is a class in Groovy 1.6. If
> it can't be found, then it is normally a classpath problem. Now If I see it
> right you do include 1 1.6 in the classpath and if this error happens, then
> you probably use also the groovyc from 1.6... then this should not happen.
> would be nice of you to produce a running example so we can see into it.
>

I think, I localized the problem. I have class B that lives in a jar:

package com.caiss.stat.modelImpl

class B {
    static def b = 1
}

when I compile A:

package com.caiss.stat.chartModels

class A {
    def f() {
        def t = com.caiss.stat.modelImpl.B.b
    }
}

I get the following error, when I compile both classes together the
problem does not manifest itself

compile:
Compiling 1 source file to
/home/yegor/caiss/caiss-stat2/beta2/chartModels/build/classes
>>> a serious error occurred: [Lorg/codehaus/groovy/runtime/callsite/CallSite;
>>> stacktrace:
java.lang.NoClassDefFoundError: [Lorg/codehaus/groovy/runtime/callsite/CallSite;
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
        at java.lang.Class.getDeclaredMethods(Class.java:1763)
        at org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:264)
        at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:219)
        at org.codehaus.groovy.ast.ClassNode.getInterfaces(ClassNode.java:306)
        at org.codehaus.groovy.ast.ClassNode.declaresInterface(ClassNode.java:742)
        at org.codehaus.groovy.ast.ClassNode.implementsInterface(ClassNode.java:728)
        at org.codehaus.groovy.ast.ClassNode.isDerivedFromGroovyObject(ClassNode.java:718)
        at org.codehaus.groovy.classgen.AsmClassGenerator.isGroovyObject(AsmClassGenerator.java:2778)
        at org.codehaus.groovy.classgen.AsmClassGenerator.visitPropertyExpression(AsmClassGenerator.java:2756)
        at org.codehaus.groovy.ast.expr.PropertyExpression.visit(PropertyExpression.java:55)
        at org.codehaus.groovy.classgen.AsmClassGenerator.visitAndAutoboxBoolean(AsmClassGenerator.java:4169)
        at org.codehaus.groovy.classgen.AsmClassGenerator.visitDeclarationExpression(AsmClassGenerator.java:1450)
        at org.codehaus.groovy.ast.expr.DeclarationExpression.visit(DeclarationExpression.java:35)
        at org.codehaus.groovy.classgen.AsmClassGenerator.visitAndAutoboxBoolean(AsmClassGenerator.java:4169)
        at org.codehaus.groovy.classgen.AsmClassGenerator.evaluateExpression(AsmClassGenerator.java:1406)
        at org.codehaus.groovy.classgen.AsmClassGenerator.visitReturnStatement(AsmClassGenerator.java:1367)
        at org.codehaus.groovy.ast.stmt.ReturnStatement.visit(ReturnStatement.java:44)
        at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:38)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:129)
        at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:791)
        at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:52)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:73)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:80)
        at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:643)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:88)
        at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethod(AsmClassGenerator.java:748)
        at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:849)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:48)
        at org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:247)
        at org.codehaus.groovy.control.CompilationUnit$10.call(CompilationUnit.java:689)
        at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:883)
        at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:433)
        at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:414)
        at org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:63)
        at org.codehaus.groovy.tools.FileSystemCompiler.main(FileSystemCompiler.java:246)
        at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:786)
        at org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:554)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor164.invoke(Unknown Source)
        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 org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277)
        at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:461)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
/home/yegor/caiss/caiss-stat2/beta2/nbproject/groovy-compile-impl.xml:30:
Compilation Failed
BUILD FAILED (total time: 1 second)

--

-- 
Best regards,
Yegor
__________________________________________________________
Yegor Bryukhov,
Research Associate
Center for Algorithms and Interactive Scientific Software
City College of New York

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Gmane