Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Evaluating expressions in Expressions window fails
Evaluating expressions in Expressions window fails [message #1705821] Wed, 19 August 2015 11:21 Go to next message
Mahesh Abnave is currently offline Mahesh AbnaveFriend
Messages: 3
Registered: November 2012
Junior Member
I am using Eclipse based development environment - a Groovy/Grails Tool Suite. The issue seems to be that eclipse is not able to find some JARs. And I dont understand where to put those JARs. Below are the details.

I am trying to step through the code. However when I put watch on any variable it gives error, but the same variable evaluates correctly on Variables window. I did one obeservation, that when there are a lot of expressions in my Expressions window, the debugger slows down, it takes time to evaluate those expressions but gives error for all. When I remove all expressions it steps through without any slow down. Also similar error occur when I use Display window

Below is the screen shot of whats happening
(Not able to post image since having less than five posts on the forum. Here is the obfuscated link (remove spaces in the link)): h t t p : / / i . stack . imgur . com / 8J57n . png)


I checked the eclipse error log file. There are many errors, but below seems to be relevant one:
!ENTRY org.grails.ide.eclipse.groovy.debug.core 4 0 2015-08-19 12:40:09.963
!MESSAGE Internal error logged from Groovy Core Debug: 
!STACK 0
java.lang.Exception: (Groovy) Complete snippet:
/////start    
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;    
println it
/////end
    at org.grails.ide.eclipse.groovy.debug.core.evaluation.GroovyJDIEvaluator.performEvaluate(GroovyJDIEvaluator.java:202)
    at org.grails.ide.eclipse.groovy.debug.core.evaluation.GroovyJDIEvaluator$1$1.run(GroovyJDIEvaluator.java:160)
    at org.eclipse.jdt.internal.debug.core.model.JDIThread.runEvaluation(JDIThread.java:764)
    at org.grails.ide.eclipse.groovy.debug.core.evaluation.GroovyJDIEvaluator$1.run(GroovyJDIEvaluator.java:165)
    at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:3157)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
____Eval.groovy: 8: unable to resolve class org.slf4j.Logger
 @ line 8, column 18.
   import org.slf4j.Logger;
                    ^

____Eval.groovy: 9: unable to resolve class org.slf4j.LoggerFactory
 @ line 9, column 18.
   import org.slf4j.LoggerFactory;
                    ^

2 errors

    at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:313)
    at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:1040)
    at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:647)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:596)
    at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:279)
    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:258)
    at org.grails.ide.eclipse.groovy.debug.core.evaluation.GroovyJDIEvaluator.convertSnippetToScript(GroovyJDIEvaluator.java:349)
    at org.grails.ide.eclipse.groovy.debug.core.evaluation.GroovyJDIEvaluator.performEvaluate(GroovyJDIEvaluator.java:183)
    ... 5 more


Seems like it needs some jars, but which and where to put them? I tried adding the file slf4j-api-1.7.2.jar which contains these classes to %JAVA_HOME%/lib and %JAVA_HOME%\jre\lib and also to ggts' plugins folder, but it did not helped.

[Updated on: Wed, 19 August 2015 11:24]

Report message to a moderator

Re: Evaluating expressions in Expressions window fails [message #1705895 is a reply to message #1705821] Wed, 19 August 2015 20:55 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
Most of what I see in your post relates to Groovy and Groovy-Eclipse not Java and JDT.
Thus your chances for getting a useful answer are way better when you ask the experts of Groovy-Eclipse.
Stephan
Previous Topic:-clean launch
Next Topic:Eclipse with Mac El Capitan
Goto Forum:
  


Current Time: Mon Oct 07 08:38:44 GMT 2024

Powered by FUDForum. Page generated in 0.02812 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top