Teamviewer established an outgoing connection using the local port 1098 which is also the JNDI port.
I spent 2 hours until I realized what the error was because I was focusing in the resulting exceptions, e.g. :
Exception: javax.transaction.NotSupportedException: Cannot set transactional mode, error is setAutoCommit() is not allowed - use TransactionHelper instead
javax.transaction.NotSupportedException:
Cannot set transactional mode, error is setAutoCommit() is not allowed - use TransactionHelper instead
at daoframework.daofactory.transactions.LocalUserTransaction.begin(LocalUserTransaction.java:78)
Is there any way to block teamviewer from using this port?
Found using:
$ netstat -aon | grep 1098
TCP XX.XXX.XX.XX:1098 XXX.XX.XXX.XXX:80 ESTABLISHED 2596
And then looking up the PID in taskmanager.
Update
It seems this more more of a windows 7 problem. In windows vista and beyond:
To comply with Internet Assigned Numbers Authority (IANA) recommendations, Microsoft has increased the dynamic client port range for outgoing connections in Windows Vista and in Windows Server 2008. The new default start port is 49152, and the default end port is 65535. This is a change from the configuration of earlier versions of Windows that used a default port range of 1025 through 5000.
Is there a way to patch windows 7 to use higher port numbers for outgoing connections?
Update2
My windows 7 machine was indeed running with a low port limit.
C:\Windows\system32>netsh int ipv4 show dynamicport tcp
Protocol tcp Dynamic Port Range
---------------------------------
Start Port : 1025
Number of Ports : 64510