ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dr_nailz <dr.na...@gmail.com>
Subject BindException on db call
Date Tue, 28 Jun 2005 03:42:59 GMT
I've set up an environment very similar to that mentioned in the
SQLMaps tutorial, and I'm getting a BindException: "cannot assign
requested address: JVM_Bind" when I try to make a call on the database
(MySQL).  I'm not exactly sure what this means, or where to look
(given that I'm just making a call to a local database on a standard
port).

The complete exception message is:

----
com.mysql.jdbc.CommunicationsException: Communications link failure
due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: java.net.BindException: Cannot assign requested address: JVM_Bind
----

I'm using the DataMapper contained in the "iBATIS_DBL-2.1.0.565"
release, MySQL-4.1.11 and the standard driver from
MySQL_Connector_J-3.1.8a (com.mysql.jdbc.Driver).  Also, although I'm
not sure that it matters, I'm using netBeans-4.1, and the class the
exception is thrown from is a JUnit-3.8.1 test.

The URL I'm using to access the database (which is running) is:
jdbc:mysql://localhost/cgcs
(the user account I'm using has access to this database, and I've
tried my IP, 127.0.0.1, and my hostname in place of localhost).

The line that causes the exception is:
member = (Member)sqlMap.queryForObject("getMember", new Integer(1));
(a row exists in the db with PK value of 1, and the mapping for Member
seems to be correct - errors in the Member class and Member.xml show
up as different exceptions).

I have a feeling that I'm doing/missing something very obvious, I'm
just not sure what.

Any pointers on where to look or what to try would be much appreciated!

Cheers,
dr_nailz

Mime
View raw message