ClassNotFoundException exceptions when running from Eclipse

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ClassNotFoundException exceptions when running from Eclipse

Omri
Hi,
I'm using Spock framework with eclipse (both Luna and Mars).
We have an annoying issue where some tests cannot run from eclipse with a ClassNotFoundException. 
The workaround I use to solve this issue is to create any groovy class on that project test directory (src/test/groovy). This will make all the tests for that project to work (I can then delete that groovy dummy file I've created).
It looks like creating the file invokes some sort of compilation to these groovy classes which doesn't occur otherwise.
Anyone heard of that issue and have an idea of how to fix this?
I'm currently using groovy 2.3.10 with spock 1.0-groovy-2.3 and Java8. The same error occured on multiple machines and multiple different versions.
Thanks,
Omri.

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/spockframework.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ClassNotFoundException exceptions when running from Eclipse

Kostis Kapelonis
Yes I have seen this

It has to do with the combination of Eclipse plugins that are
installed (Groovy/Grails/Jspresso/STS) and which "facets" are
activated in the project that contains the Spock tests.

Quick advice: I would start by re-importing the project in Eclipse
from scratch and following these instructions (scroll down a bit)

http://mrhaki.blogspot.gr/2011/01/spocklight-add-spock-support-to-java.html

Kostis




On Sun, Sep 20, 2015 at 11:58 AM, Omri <[hidden email]> wrote:

> Hi,
> I'm using Spock framework with eclipse (both Luna and Mars).
> We have an annoying issue where some tests cannot run from eclipse with a
> ClassNotFoundException.
> The workaround I use to solve this issue is to create any groovy class on
> that project test directory (src/test/groovy). This will make all the tests
> for that project to work (I can then delete that groovy dummy file I've
> created).
> It looks like creating the file invokes some sort of compilation to these
> groovy classes which doesn't occur otherwise.
> Anyone heard of that issue and have an idea of how to fix this?
> I'm currently using groovy 2.3.10 with spock 1.0-groovy-2.3 and Java8. The
> same error occured on multiple machines and multiple different versions.
> Thanks,
> Omri.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Spock Framework - User" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> To post to this group, send email to [hidden email].
> Visit this group at http://groups.google.com/group/spockframework.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/spockframework.
For more options, visit https://groups.google.com/d/optout.
Loading...