Ubuntu vpn connects successfully and shortly thereafter fails - network traffic stops - either VPN and local network

I've started to use Ubuntu for my job needs and experienced first pretty annoying challenge with VPN connection.
I'm using openvpn client with network manager. After successfull connect to VPN server I can use local and remote networks with no problem. After a while - like 1 -10 minutes , sometimes a bit longer up to couple hours or sometimes immediately - all network interfaces stop functioning - either no VPN and no local network.
   I 've googled a lot and found a confirmed network-manager package bug with very similar behaviour described - Bug #991666 . But the bug is unresolved so far.
   Nevertheless I was trying to find the reason and workaround for this issue. And found a problem in routing table.

  • My routing table before connection to VPN (local network works OK):

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.100.1   0.0.0.0         UG    0      0        0 eth0
192.168.100.0   0.0.0.0         255.255.255.0   U     1      0        0 eth0
  •    My routing table after connection to VPN (all network traffic stops working after a short time):
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.100.1   0.0.0.0         UG    0      0        0 eth0
10.242.2.1      10.242.2.21     255.255.255.255 UGH   0      0        0 tun0
10.242.2.21     0.0.0.0         255.255.255.255 UH    0      0        0 tun0
78.47.224.80    10.242.2.21     255.255.255.248 UG    0      0        0 tun0
80.249.167.64   10.242.2.21     255.255.255.192 UG    0      0        0 tun0
82.195.75.160   10.242.2.21     255.255.255.224 UG    0      0        0 tun0
82.195.78.142   192.168.100.1   255.255.255.255 UGH   0      0        0 eth0
172.16.10.0     10.242.2.21     255.255.254.0   UG    0      0        0 tun0
192.168.1.0     10.242.2.21     255.255.255.0   UG    0      0        0 tun0
192.168.100.0   10.242.2.21     255.255.255.0   UG    0      0        0 tun0

192.168.100.0   0.0.0.0         255.255.255.0   U     1      0        0 eth0

10.242.2.21 - my VPN gateway
192.168.100.0 - my local network

As you see two strange static routes are pushed by server (marked in red). The green one (192.168.100.0) - my network points to default destination. One of the red ones (192.168.100.0) points to the VPN gateway. I'm really not a network guy and it is not my strength, but it looks for me suspicious. Probably some kind of collision happens when OS does not know where to forward packets when routing table shows two directions. As far as I know Metric should help to make this decision, but maybe it is not interpreted correctly, whatever... What I did - just asked network admin to remove those two extra static routes and thereafter everything started to function properly... Those routes were not needed and used for any puposes anyway - some legacy stuff...
If there is possibility that you experience similar reason, some test can be made by manually locally removing particular routing records, or by connecting some intermediate router.

So thats my story with happy-end  after long fustrating hours of investigation. Good luck!

Ubuntu 14.04

ADF how to stretch table vertically and horizontally?

How to stretch ADF table vertically to fill maximum available vertical space in browser?

Answer:
  • Put table into af:panelStretchLayout component center facet.
  • Put dimensionsFrom="parent" attribute into af:panelStretchLayout (parent of af:panelStretchLayout component must stretch its children)

How to stretch ADF table horizontally to fill maximum available horizontal space in browser?

Answer:
  • Put table into af:panelStretchLayout component center facet.
  • Add styleClass="AFStretchWidth" attribute to af:panelStretchLayout
 
Example:
 
<af:panelStretchLayout id="psl1"  styleClass="AFStretchWidth" dimensionsFrom="parent">
    <f:facet name="center">
        <af:table value="#{bindings.EmployeesView11.collectionModel}"
                      var="row" rows="#{bindings.EmployeesView11.rangeSize}"
                      emptyText="empty"
                      fetchSize="#{bindings.EmployeesView11.rangeSize}"
                      rowBandingInterval="0" id="t1">
              

<af:column sortProperty="#{bindings.EmployeesView11.hints.FirstName.name}"
                         sortable="false"
                         headerText="#{bindings.EmployeesView11.hints.FirstName.label}"
                         id="c2">

.....
.....
.....
 </table>
</f:facet>
</af:panelStretchLayout>

Sample can be downloaded here
If stretching issues in ADF 12.2.1 this post might help: ADF application layout messed up after migration to 12.2.1 ... What might be the reason ?

Version 12.1.3.0

ADF java.lang.ClassCastException: ...ViewRowImpl cannot be cast to ...ViewRow ?

For example:
java.lang.ClassCastException: model.DepartmentsViewRowImpl cannot be cast to model.common.DepartmentsViewRow

JDeveloper, when generating View Object Row client interface sometimes goes wrong with class definition. Such error can be displayed when implementation of class is not defined. In particular error sample -  "implements DepartmentsViewRow" is missing in DepartmentsViewRowImpl class:

public class DepartmentsViewRowImpl extends ViewRowImpl implements DepartmentsViewRow {
...
}