Getting Started with Source Code


(kalpana pinnaka) #1

Hi

when i am running gradlew test...getting following

ant:groovyc] >>> a serious error occurred: junit/framework/TestCase
[ant:groovyc] >>> stacktrace:
[ant:groovyc] java.lang.NoClassDefFoundError: junit/framework/TestCase
[ant:groovyc] at java.lang.ClassLoader.defineClass1(Native Method)
[ant:groovyc] at java.lang.ClassLoader.defineClass(ClassLoader.java:
634)
[ant:groovyc] at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
142)
[ant:groovyc] at
java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
[ant:groovyc] at java.net.URLClassLoader.access
$000(URLClassLoader.java:73)
[ant:groovyc] at java.net.URLClassLoader$1.run(URLClassLoader.java:
212)
[ant:groovyc] at java.security.AccessController.doPrivileged(Native
Method)
[ant:groovyc] at
java.net.URLClassLoader.findClass(URLClassLoader.java:205)
[ant:groovyc] at java.lang.ClassLoader.loadClass(ClassLoader.java:
321)
[ant:groovyc] at sun.misc.Launcher
$AppClassLoader.loadClass(Launcher.java:294)
[ant:groovyc] at java.lang.ClassLoader.loadClass(ClassLoader.java:
314)
[ant:groovyc] at
groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:696)
[ant:groovyc] at
groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:564)
[ant:groovyc] at
org.codehaus.groovy.control.ResolveVisitor.resolveToClass(ResolveVisitor.java:
709)
[ant:groovyc] at
org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:
275)
[ant:groovyc] at
org.codehaus.groovy.control.ResolveVisitor.resolveFromDefaultImports(ResolveVisitor.java:
466)
[ant:groovyc] at
org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:
275)
[ant:groovyc] at
org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:
243)
[ant:groovyc] at
org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:
227)
[ant:groovyc] at
org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:
239)
[ant:groovyc] at
org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:
235)
[ant:groovyc] at
org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:
1271)
[ant:groovyc] at
org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:
148)
[ant:groovyc] at org.codehaus.groovy.control.CompilationUnit
$8.call(CompilationUnit.java:601)
[ant:groovyc] at
org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:
839)
[ant:groovyc] at
org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:
544)
[ant:groovyc] at
org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:
493)
[ant:groovyc] at
org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:
476)
[ant:groovyc] at
org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:
67)
[ant:groovyc] at
org.codehaus.groovy.tools.FileSystemCompiler.doCompilation(FileSystemCompiler.java:
180)
[ant:groovyc] at
org.codehaus.groovy.tools.FileSystemCompiler.commandLineCompile(FileSystemCompiler.java:
148)
[ant:groovyc] at
org.codehaus.groovy.tools.FileSystemCompiler.main(FileSystemCompiler.java:
162)
[ant:groovyc] Caused by: java.lang.ClassNotFoundException:
junit.framework.TestCase
[ant:groovyc] at java.net.URLClassLoader$1.run(URLClassLoader.java:
217)
[ant:groovyc] at java.security.AccessController.doPrivileged(Native
Method)
[ant:groovyc] at
java.net.URLClassLoader.findClass(URLClassLoader.java:205)
[ant:groovyc] at java.lang.ClassLoader.loadClass(ClassLoader.java:
321)
[ant:groovyc] at sun.misc.Launcher
$AppClassLoader.loadClass(Launcher.java:294)
[ant:groovyc] at java.lang.ClassLoader.loadClass(ClassLoader.java:
266)
[ant:groovyc] ... 32 more

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':plugins-lang-groovy:compileTestGroovy'.
    Cause: Forked groovyc returned error code: 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info
    or --debug option to get more log output.

BUILD FAILED

can anyone suggest me how to overcome those exceptions

Thanq


(system) #2