Java, Spring, Javascript: errorThrown SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Problema:
errorThrown SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Solucion:
JSON esta esperando por lo menos un array vacio, un objecto tipo String (return new String()) no es suficiente.

@RequestMapping("/xxx")
public @ResponseBody String[] xxx(HttpServletRequest request, @RequestParam("xxxx") String xxx) {
            (...)
            return new String[]{""};
        }
}

JAVA - Problem accessing the absolute URL; java.net.ConnectException: Connection refused

Problem:org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Problem accessing the absolute URL "http://localhost:8089/xxxx/xxxx.jsp". java.net.ConnectException: Connection refused

Solution:
Fix the http port number on the application server. On this particular case it should be 8089.

Spring - Bean property 'propertyXXX' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

Error:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'beanXXX' defined in class path resource [pathXXX/filenameXXX]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'propertyXXX' of bean class [packageXXX.classXXX]: Bean property 'propertyXXX' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

Solution:
Add the setter and getter methods for the invalid property

JAVA - Codility PermCheck test 100% score

Solution to Codility PermCheck Problem at:

https://codility.com/c/intro/demoJH2RM2-UZ8

class Solution {
    public static void main(String[] args) {
 int A[] = {4, 1, 3, 2};
 //int A[] = {4, 4, 3, 2};
 //int A[] = {4, 3, 2};
 //int A[] = {};
 //int A[] = {1000000000, 3, 2};
 //int A[] = {1000000000, 1000000001, 1000000002};
 //int A[] = new int[100000];
 System.out.println(solution(A));  
    }

    public static int solution(int[] A) {
     int result = 0;
     int size = A.length;
     int[] B = new int[A.length];
     if(size == 0)
      return 0;
     for(int i=0; i<A.length; i++){
      if(A[i]>size)
       return result;
      if(A[i]<1)
       return result;
      if(B[A[i]-1] == -1)
       return result;
      else 
       B[A[i]-1] = -1;
     }
     return 1;
    }
}