When setting up any ColdFusion MX datasource, there is a upper limit of 65535 for the port. If you enter a port greater than this value then the datasource verification will print an error message such as:

Connection verification failed for data source: myDatasource
[]java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. port out of range:65536 The root cause was that: java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. port out of range:65536

I found that an IllegalArgumentException for the "port out of range" error is thrown from the java.net.InetSocketAddress class. I was able to generate a stack trace to demonstrate this:

java.lang.IllegalArgumentException: port out of range:65536
at java.net.InetSocketAddress.(InetSocketAddress.java:108)
at java.net.Socket.(Socket.java:124)


From there, I looked up the java.net.InetSocketAddress class in the Java 1.4.2 API, http://java.sun.com/j2se/1.4.2/docs/api/java/net/InetSocketAddress.html

There I found the following:

"A valid port value is between 0 and 65535. A port number of zero will let the system pick up an ephemeral port in a bind operation."

As ColdFusion MX is implemented in Java, it is bound by the same constraints as the underlying Java API and so you must restrict the port on which the database listens to 65535 or lower.