Dependency Injection on ejbclient

Only one sentence:
"DI can only be used by classes which are managed by containers: other EJB and servlet"!!!

JasperReport: Subreport overflowed

Oooops: JRRuntimeException: Subreport overflowed on a band that does not support overflow

 The problem was in the band that include the suberport: tha band was static (footer page) and, also, it was too small for the report rows! I resolved enlarging tha band and the subreport height. Oh Yeah!

Increase Memory Space for Tomcat

"Uston, i've a problem: MemoryError: PermGen space; java.lang.OutOfMemoryError: PermGen space"

On Tomcat on Windows (started manually)

If you run Tomcat (eg. from JIRA Standalone) on Windows, and are starting it manually by running bin\startup.bat, edit bin\setenv.bat and add the line:

set JAVA_OPTS=-Xms256m -Xmx256m -XX:MaxPermSize=512m 
and then restart. Adjust 256 to the maximum memory you want to allocate.


If bin\setenv.bat does not exist, create it or edit directly tha catalina.bat

fix eclipse error: "resource is out of sync with the file system: ..."

To fix this problem, right click on the project and select "Refresh"!

wsdl to java

wsdl2java -p org/apache/axis2 -pn CatalogoFattureHttpSoap11Endpoint -uri http://w2k302/CipelPortalBackEnd/services/CatalogoFatture?wsdl

where
-p org/apache/axis2 is the command for create the classes in that package, but the directories must already exist!
-pn CatalogoFattureHttpSoap11Endpoint, is the name of the endpoint
-uri http://w2k302/CipelPortalBackEnd/services/CatalogoFatture?wsdl, is the wsdl referenced

From Array ([]) to Collection

// Fixed-size list
List list = Arrays.asList(array);

// Growable list
list = new LinkedList(Arrays.asList(array));

// Duplicate elements are discarded
Set set = new HashSet(Arrays.asList(array));

From Collection to Array ([ ])

Create an array containing the elements in a list:
MyClass[] array = (MyClass[])list.toArray(new MyClass[list.size()]);

Create an array containing the elements in a set:
MyClass[] array = (MyClass[]) set.toArray(new MyClass[set.size()]);