ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: BindException on db call
Date Tue, 28 Jun 2005 04:19:48 GMT
Hmmm, that exception is generally thrown when an application tries to
grab a port to listen to requests on - i.e., when tomcat starts, it
tries to bind to port 8080, and if it is already running, you will get
that error.

iBATIS does not bind any ports (since it is a client app, not a server app). 

What OS is this? Windows? 

Does it tell you what port it is trying to bind to? 

Did you try it with just JDBC?

Larry


On 6/27/05, dr_nailz <dr.nailz@gmail.com> wrote:
> 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