Monday, February 08, 2016

OpenDayLight Framework information

The domain is called SDN (Software Defined Network). Traditionally the networking devices have routing logic and controlling logic as well built into the hardware device(with software built into them). SDN takes away the controlling and additional responsibilities into application layer while the physical network still focus on the core functionality (data forwarding).
mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller -DarchetypeArtifactId=opendaylight-startup-archetype -DarchetypeVersion=1.1.0-SNAPSHOT -DarchetypeRepository=http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/-DarchetypeCatalog=http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/archetype-catalog.xml

wiki.opendaylight.org
CCFT Facts: Project Creation Date: January 8th, 2015 Lifecycle State: Incubation Primary Contact: Keith Burns Project Lead: Tom Pantelis ...




You can download VM that has eclipse and other stuff installed already. This is a ubuntu VM. 
To import an appliance in one of the above formats, simply double-click on the OVF/OVA file.[7] Alternatively, select "File" -> "Import appliance" from the Manager window. In the file dialog that comes up, navigate to the file with either the .ovf or the .ova file extension.








Java




We don't need to setup system by ourself in the beginning, the VM image from the site allows you to download ubuntu desktop version image.

since i have less RAM, I needed to modify the setting of the VM to 1.2G RAM from its 2GB ram (TOtal i have is 4GB running win 7)

YangTools



In case if you have any difficulty with maven version (ubuntu has 3.0.5 as default where as ODL needs 3.3.1 onwards, so we can download the maven zip file and unzip and then link it to mvn so that it ODL compilation will not have any problem.


        sudo apt-get remove maven
        sudo mkdir -p /opt/maven
        cd /opt/maven
        sudo tar xvzf apache-maven-3.3.9-bin.tar.gz
        sudo ln -s /opt/maven/apache-maven-3.3.9/bin/mvn /usr/local/bin/mvn



Networking concepts


SDN terminology:
http://www.cse.wustl.edu/~jain/cse570-13/ftp/m_16sdn.pdf

SDN for dummies, simple book
http://www.cisco.com/c/dam/en/us/solutions/collateral/data-center-virtualization/application-centric-infrastructure/sdnfordummies.pdf


http://events.linuxfoundation.org/sites/events/files/slides/odlsummit15_dmitriy_mirantis_081215.pdf 

http://www.fujitsu.com/global/documents/about/resources/publications/fstj/archives/vol49-3/paper07.pdf

https://www.infinera.com/wp-content/uploads/2015/07/Infinera_TP_Paving_the_Path_to_Multi-_Layer_Networking_via_SDN.pdf

Saturday, February 06, 2016

java.lang.String out of START_OBJECT token

If you are developing new spring rest services and encounter the following issue


Feb 06, 2016 10:17:05 AM org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver handleHttpMessageNotReadable
WARNING: Failed to read HTTP message: org.springframework.http.converter.HttpMessageNotReadableException: Could not read document: Can not deserialize instance of java.lang.String out of START_OBJECT token
 at [Source: java.io.PushbackInputStream@353e55b8; line: 1, column: 1]; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String out of START_OBJECT token

 at [Source: java.io.PushbackInputStream@353e55b8; line: 1, column: 1]


{
   "user": {
      "organizationId": 1,
      "roleId": 1,
      "statusId": 2,
      "email": "test@test.com,
      "password": "admin"
   },
   "person": {
      "firstName": "",
      "lastName": "",
      "phone": "",
      "mobile": ""
   }
}


The resolutions could be:

  • Your JSON request is invalid, check if it is complete and correct. 
  • You configured the spring mvc correctly.
  • You have required POM depedencies configured.
  • Your annotations are correct. @RequestBody is an important tag. 

               @RequestMapping(method = RequestMethod.POST,value = "/test")
  • public Response testData(@RequestBody TestData request){
    Response response = Response.positiveResponse();
    return response;
    }