Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

[groovy-user] Power asserts, Groovy, Eclipse and Gant

Russel Winder

2010-03-19

Replies: Find Java Web Hosting

Author LoginPost Reply
Gant seems to compile and run its tests fine using IntelliJ IDEA.
Eclipse however is giving me a bit of grief. I have (finally -- long
story) managed to upgrade my Eclipse installation. Compilation of Gant
is fine, but the tests are showing some unexpected problems.
Exemplified by the stack trace below. Now as far as I am aware
powerassert is a subpackage of org.codehaus.groovy.runtime, and there is
no package org.codehaus.groovy.transform.powerassert. So how can a
fully cleaned and recompiled project have any references to a package
that doesn't exist?

    java.lang.NoClassDefFoundError: org/codehaus/groovy/transform/powerassert/ValueRecorder
     at gant.Gant.dispatch(Gant.groovy:418)
     at gant.Gant.this$2$dispatch(Gant.groovy)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:57)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke (Method.java:616)
     at org.codehaus.groovy.reflection.CachedMethod.invoke (CachedMethod.java:88)
     at groovy.lang.MetaMethod.doMethodInvoke (MetaMethod.java:233)
     at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:1058)
     at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:886)
     at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:708)
     at gant.Gant.invokeMethod(Gant.groovy)
     at groovy.lang.GroovyObject$invokeMethod.callCurrent(Unknown Source)
     at gant.Gant.processTargets(Gant.groovy:579)
     at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke (Method.java:616)
     at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
     at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent (PogoMetaMethodSite.java:51)
     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent (AbstractCallSite.java:155)
     at gant.Gant.processArgs(Gant.groovy:540)
     at org.codehaus.gant.tests.GantTestCase.processCmdLineTargets(GantTestCase.java:164)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:57)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke (Method.java:616)
     at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
     at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent (PogoMetaMethodSite.java:51)
     at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent (CallSiteArray.java:44)
     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent (AbstractCallSite.java:143)
     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent (AbstractCallSite.java:147)
     at org.codehaus.gant.tests.bugs.Assorted_Test.test_GANT_34_originalIvycachePathProblemFixed(Assorted_Test.groovy:88)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:57)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke (Method.java:616)
     at junit.framework.TestCase.runTest (TestCase.java:168)
     at junit.framework.TestCase.runBare (TestCase.java:134)
     at junit.framework.TestResult$1.protect(TestResult.java:110)
     at junit.framework.TestResult.runProtected (TestResult.java:128)
     at junit.framework.TestResult.run (TestResult.java:113)
     at junit.framework.TestCase.run (TestCase.java:124)
     at junit.framework.TestSuite.runTest (TestSuite.java:232)
     at junit.framework.TestSuite.run (TestSuite.java:227)
     at org.junit.internal.runners.JUnit38ClassRunner.run (JUnit38ClassRunner.java:83)
     at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
     at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (RemoteTestRunner.java:467)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (RemoteTestRunner.java:683)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run (RemoteTestRunner.java:390)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main (RemoteTestRunner.java:197)
    Caused by: java.lang.ClassNotFoundException: org.codehaus.groovy.transform.powerassert.ValueRecorder
     at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass (URLClassLoader.java:205)
     at java.lang.ClassLoader.loadClass (ClassLoader.java:321)
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
     at java.lang.ClassLoader.loadClass (ClassLoader.java:266)
     at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:334)
     ... 51 more
   


--
Russel.
=============================================================================
Dr Russel Winder    Partner
                            xmpp: russel@(protected)
Concertant LLP     t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,  f: +44 8700 516 084  voip: sip:russel.winder@(protected)
London SW11 1EN, UK  m: +44 7770 465 077  skype: russel_winder

Attachment: signature.asc (zipped)
©2008 gg3721.com - Jax Systems, LLC, U.S.A.