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 Re: BindException on db call
Date Tue, 28 Jun 2005 08:00:04 GMT
I didn't think it would try to bind any ports, which is what confused
me - the only reference I can find to what it would be trying to bind
is "JVM_Bind", and I'm not sure what this means (I think that this
would normally be the place in the exception to mention the IP and
port it was trying to bind, something like "JVM_Bind:8080"), would it
be something to do with trying to use a socket or named pipe or
something like that rather than TCP/IP?

I've only tried with JDBC... should I try with something else?

I'm testing this on Windows XP SP2.  There's a 3rd party firewall
running but I've tried disabling it (there was no notification or
anything in the logs to say it blocked anything anyway).

The test is part of a larger Struts application, but I'm pretty sure
it shouldn't be referencing anything from there, as this is just one
JUnit test making the queryForObject call. Tomcat is set to run on
8084, but is not running (and I don't think it's trying to be used in
this instance).
(just did a bit of testing...)

Mentioning Tomcat got me thinking... maybe it is trying to use it
somehow.  So I started it up (Tomcat 5.5.7 bundled with netBeans), and
I get a very similar exception:

java.net.BindException: Cannot assign requested address: JVM_Bind:8084

(8084 being the port Tomcat is meant to run on).  Port 8084 is not in
use, and I can't figure out why it wouldn't be able to use it.  Could
it be some kind of permissions issue?  Again, I'm not really sure
where to look.

Sorry if this is getting a bit off topic for this list - it now to not
be an issue with iBATIS at all.


On 6/28/05, Larry Meadors <larry.meadors@gmail.com> wrote:
> 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:
> >
> >
> > java.net.SocketException
> > MESSAGE: java.net.BindException: Cannot assign requested address: JVM_Bind
> > ----
> >
> > I'm using the DataMapper contained in the "iBATIS_DBL-"
> > 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,, 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
> >

View raw message