Fix a ClassNotFoundException raised during demarshalling

Under certain conditions an error like:

Caused by: java.lang.ClassNotFoundException: org.opendaylight.controller.sal.reader.FlowOnNode
	at org.eclipse.gemini.web.tomcat.internal.loading.BundleWebappClassLoader.loadClass(BundleWebappClassLoader.java:312) ~[na:na]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356) ~[na:1.7.0_09]
	at java.lang.Class.forName0(Native Method) ~[na:1.7.0_09]
	at java.lang.Class.forName(Class.java:264) ~[na:1.7.0_09]
	at org.jboss.marshalling.AbstractClassResolver.loadClass(AbstractClassResolver.java:135) ~[na:na]
	at org.jboss.marshalling.AbstractClassResolver.resolveClass(AbstractClassResolver.java:116) ~[na:na]
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:893) ~[na:na]
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1205) ~[na:na]
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272) ~[na:na]
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209) ~[na:na]

this is due to the fact that by default the Jboss Marshaller used by
Infinispan uses the Thread Context Class Loader to retrieve the
classloader to be used in the demarshalling function. Equinox provides
a default one
(org.eclipse.core.runtime.internal.adaptor.ContextFinder) as TCCL,
however it heuristically try to find the classloader and in some cases
can fetch the wrong one. Now given that all the classes managed by
clustering services must go via OSGi it make sense to force the usage
of only the bundle class loader and we let OSGi framework to figure
out how to load the class.

Change-Id: I24a9056eda5f6ab7b8cf0ab2e476be56cb61f6c1
Signed-off-by: Giovanni Meo <gmeo@cisco.com>
Remove public from interface methods. Cleans sonar warnings.

Change-Id: I5a64f93cb452522c50f788fd24bd10340f61a4e5
Signed-off-by: Alissa Bonas <abonas@redhat.com>
Bug #65 - Fix inconsistencies in the NB REST APIs

1) PUT is used to create resources (when resource path is known to client and
the action is idempotent).
2) Use plural resource name when listing contents.
3) Rename service names (flow -> flowprogrammer, host -> hosttracker, subnet ->
subnetservice) as they conflict with resource names.

Change-Id: I7171ec725b83799ec3686460ab7aa23c7df56c9b
Signed-off-by: Prasanth Pallamreddy <ppallamr@cisco.com>
Add helper class for RpcError interface

Change-Id: I981d63d0c6ccc899a3f2db5985b16d31c8e2742e
Signed-off-by: Michal Rehak <mirehak@cisco.com>
Merge "Fix a ClassNotFoundException raised during demarshalling"
Remove unused class member SAVE.

Change-Id: I936914928b92b314bd9aa5e9b0d4454a53cc0722
Signed-off-by: Alissa Bonas <abonas@redhat.com>
Declare a property for commons-lang version in poms and use it.

Change-Id: I0e5b15931b895f0aaf4aa57d88e33c9885f9238e
Signed-off-by: Alissa Bonas <abonas@redhat.com>
Merge "Remove public from interface methods. Cleans sonar warnings."
Merge "Remove unused class member SAVE."
Add page loading semaphore

Change-Id: I625eb9fe50732ce4fad17ffdfc650ba129c9ef5c
Signed-off-by: Andrew Kim <andrekim@cisco.com>
On container removal FRM does not uninstall flows

ISSUE:
If a container had container flow specified, when it is removed FRM fails to uninstall
the flows that were installed in that container context

ROOT CAUSE:
On FRM stop(), the uninstallAllFlowEntries() function is called.
uninstallAllFlowEntries() does 2 things:
 1) it stores the original FlowEntry elements for later re-install irrespectively
it is called because FRM is being shutdown (container removal) or because controller
is moving to container mode (and this is the default container context) which is a bug.
 2) It uninstall the flows using the removeEntry(FlowEntry fe, ...) function which recomputes
the hw flows to be removed merging fe with the container flows for this container
returned by IContainer service, which is unefficient anyway.

Problem is that when FRM is being stopped because of container removal, IContainer service does no
longer have the container flows for the given container when queried by FRM.

FIX:
- Have uninstallAllFlowEntries() take a parameter to specify if the back up of the original flow entries is needed.
- Have uninstallAllFlowEntries() use the removeEntryInternal() to directly remove the FlowEntryInstall elements, because
  besides of the inefficinecy of recomputing the container flow merged entries there is really no need for it.
- Updated the java docs

Change-Id: If33d80f9593ee81fa58d84dea05514921e143225
Signed-off-by: Alessandro Boch <aboch@cisco.com>
Merge "Bug #65 - Fix inconsistencies in the NB REST APIs"
Merge "Add page loading semaphore"
Fix NPEs on switch disconnect in cluster mode

- Fixed null pointer exceptions on switch disconnect that was
  connected to 2 or more controllers in "Any controller-One master" scheme
- Added node count to clustered controllers table in UI

Change-Id: I0c322a7a4105955a545b24a9ba1f36743800a802
Signed-off-by: Yevgeny Khodorkovsky <ykhodork@cisco.com>
Container Management and associated Northbound APIs.

Features :
1. Create, Modify and delete containers
2. ContainerFlow management
3. Northbound APIs
4. Application authorization support (contributed by Alessandro Boch)

Change-Id: I080d58c2869720c7e78fcdff673b51b142b1c2c2
Signed-off-by: Madhu Venugopal <vmadhu@cisco.com>
FRMsync get stuck, miscelaneous fix

- The future FlowEntryDistributionOrderFutureTask was erroneously
thinking and entry was not expected simply because the equality check
was failing.
- Added more extensive logging to catch further bugs in the area.

Change-Id: I8c2cb08ecf7bd9ea3623d79eae9a3ec16f023724
Signed-off-by: Giovanni Meo <gmeo@cisco.com>
Merge "Add helper class for RpcError interface"
Merge "Declare a property for commons-lang version in poms and use it."
Merge "On container removal FRM does not uninstall flows"
Added Configurable parameter for the Connection Manager scheme and Container profile.

Change-Id: I2b65f80b9d2d0d914ff34cdf18af2e652d04a8b1
Signed-off-by: Madhu Venugopal <vmadhu@cisco.com>