Solved

Groovy:unable to resolve class error

Posted on 2016-11-07
2
210 Views
Last Modified: 2016-11-08
I'm following a tutorial here for a product called bonitasoft.  

The tutorial calls a webservice (http://www.webserviceX.NET getWeather) and then if the call was successful, it tries to load the data onto a form for the user.

The form has a table widget and then as can be seen in the script creates rows for each key pair value brought back from the web service.

In order to do this, the form uses a grovy script to parse the data from a Map object into the table.

As I have cut and pasted the text from the tutorial onto the script which is launched on the form I can't get any further as I get the error shown in the title of this post (see file).  It creates the error in regard to "Entry".

I don't expect an answer that will make the tutorial work, I'm looking for an understanding as to why this error has been raised.  If there is something really obvious missing than I wouldn't know as I'm only following the tutorial and I'm not a groovy expert.

Thanks for reading and please get in contact with any questions that you may have.
bonita2.png
0
Comment
Question by:Anthony Horner
2 Comments
 
LVL 27

Accepted Solution

by:
dpearson earned 500 total points
ID: 41878136
I'm also not a groovy expert, but groovy generally follows the rules from Java and in Java the type "Entry" is internal to the Map class.

So I'd try modifying the lines where it says Entry<String,String> to be Map.Entry<String, String> and see if that works.

Another way to solve this would be adding an import statement - but I'm less clear on where those go in a groovy script.

Hope that helps,

Doug
0
 

Author Closing Comment

by:Anthony Horner
ID: 41878361
Yes, that worked!

You can import libraries in the normal way (listed above it doesn't seem to throw an error, bonitasoft it seems is based on the eclipse IDE in that respect.

However just including Map. before made the errors go away so thanks!
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The viewer will learn how to dynamically set the form action using jQuery.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question