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 Thu, 30 Jun 2005 03:11:57 GMT
To add some closure to this:
after much pain and suffering, reinstalling everything involved,
checking the 'net for info (there were stories about 127.0.0.1 being
removed from the routing table, and a 1.4.2 java version causing the
problem), I went for the last resort and (ugh) reinstalled windows. 
I'm sorry to say that it worked.  I have no idea why - I guess because
of something running on a required port (what, I have no idea), or a
failed install of Tomcat or netBeans, something like that.  How
frustrating.

dr_nailz

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