Google Analytics

Wednesday, October 26, 2016

Sonar Qube plugin

Sonar cube plugin is support to Eclipse IDE. It shows code quality errors on the go.

Plugin name : SonarLint

More Details:
http://www.sonarlint.org/eclipse/

Sonar Qube Issue Report generate

Sonar qube issue report can be generate using below command. You must start sonar qube server and the sonar runner from the source code path.

sonar-runner -Dsonar.analysis.mode=preview -Dsonar.issuesReport.html.enable=true

More info:
http://docs.sonarqube.org/display/SONARQUBE53/SonarLint+for+Command+Line

Sonar Qube 404 error


If the Sonar runner throw localhost/9000 unreachable with 404 code, try to upgrade the Sonar DB. (Need to up and running Sonar Qube server)

Below is the upgrade url.

http://127.0.0.1:9000/setup

More info:
http://stackoverflow.com/questions/32097414/error-sonar-server-http-localhost9000-can-not-be-reached

Tuesday, October 25, 2016

Eclipse JDK version change

If we want to keep the JAVA_HOME environment variable to a different JDK version than Eclipse, we can change the JDK version of the Eclipse.

Add below entry to the beginning line of eclipse.ini file .

-vm
 C:/Program Files/Java/jdk1.7.0_79/bin/javaw.exe 

Sunday, June 5, 2016

Tomcat server is not starting - WELD-000100 Weld initialized. Validating beans

If Tomcat server is not starting from "DEBUG org.jboss.weld.Bootstrap - WELD-000100 Weld initialized. Validating beans" line, try to do below steps:

1)Check DB connections.
or
2)If external services access via network, disable the any internet/network connections.
or
3)Try to debug Skip all debug points.
or
4)if you are experienced this issue in Debug mode, try to run the app without debug mode.


DEBUG org.jboss.weld.Bootstrap - WELD-000100 Weld initialized. Validating beans

Tuesday, May 10, 2016

Prime Face Sub data tables represent in workaround

In p:dataTable, if we need to add List of values (List<String>) we can use another p:dataTable oppose to p:subTable. Although this workaround is worked, we need to do some adjustments to add scroll bars to the sub table. Below is the prime face source.

Check the div tags and styles use to get the scroll bar. In this case we didn't use prime face scrollerble property.

Source:



Output:


Jasper Reports - Customized field values for List

Jasper supports List of values in a single field. However jasper prints List<String> as below format.
(Jasper List of Values) Presentation

Print format of the Jasper - [aaa,bbb,ccc].

If you want to print above value line by line with additional horizontal dash line, you can modify your .jrxml field as below.

From java side field value sends :

List<String> xxx = new List<String>;
String d = "xx1"+"("+"ssss"+")"+ "-"+Date+"/"+"OOO";
String e = "xx2"+"("+"vvvv"+")"+ "-"+Date+"/"+"HHH";
String f = "xx3"+"("+"hhhh"+")"+ "-"+Date+"/"+"KKK";

xxx.add(d);
xxx.add(e);
xxx.add(f);

--------------------------------------------------------------------------------------------
In Jrxml

($F{xxx}.substring(1, $F{xxx}.length() - 1 )).replaceAll( ",", System.getProperty("line.separator")+"-----------------------------------------------"+ System.getProperty("line.separator"))


-------------------------------------------------------------------------------------------------

Out put:

xx1 (ssss) - 03/11/2015 / OOO
-----------------------------------------------
 xx2 (vvvv) - 05/10/2015 / HHH
----------------------------------------------- 
xx3 (hhhh) - 02/08/2015 / KKK