Knowledge Seeking

Drools and Gwt – Small Post, Big Issue May 11, 2011

Filed under: Drools,GWT — nicozan @ 3:47 pm
Tags: , , ,

Short Approach…

It’s an excellent idea to combine 2 two technologies such as Drools and GWT to build Intelligent Web Applications. But there is a little bit of a problem at the moment to integrate them. Because Drools and GWT include the org.eclipse.jdt classes but with different JDT version. And when you run your application (mvn gwt:run) you will have an error like this:

Unable to parse module:
java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.CompilationResult.getErrors()
at org.eclipse.jdt.internal.compiler.Compiler.compile


So to solve this problem you need to add an exclusion to your dependecy (that has the Drools-Core dependency) added in your Maven Gwt Application pom.xml. The exclusion in your pom should look like this:


Short but helpful 😉


GWT Visualization – Transform Data into Information March 30, 2011

Filed under: GWT,Java — nicozan @ 12:22 pm
Tags: , ,


Beginning with the concept, that data it is not information. A table full of rows (i.e. 1000 rows) it can be consider data, and you’ll agree with me that trying to find meaningful data (Information) from the table it’s going to be a tedious task. At this point of the reasoning is when we use Charts (i.e. Line Charts, Pie Charts, Scatter Charts, etc) to summarize the data from the table and in that way we obtain information to make a decision. GWT Visualization will help us to add Charts to our GWT webapp, by using its simple API.

Using the GWT Visualization API

If you are not familiarized with the GWT Framework, you need to have a look at its documentation or my post. Considering that you are using the Maven GWT Plugin, all you have to do is define the next dependency in the projects pom.xml.


The next thing to do is define the module inheritance so the client side of the webapp can use it. In the “myWebApp”.gwt.xml you have to write:

<inherits name=''/>

Now that we have GWT Visualization ready to use, let’s see the elements that are part of a Chart:
-DataTable (Data Format that is going to be injected into the Chart so it can display information)
-Options (Set of characteristics of the Chart: width, height,background,color,etc. )

If you want to see a basic example working go to this page: GWT Visualization Example.

Short Tip:

If you want to draw a Line Chart and you have dots or coordinates best thing, you should use a Scatter Chart and set the option ScatterChart.Option.setLineSize(1); . The line size has to be 1 or greater than 1.