Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 41614 invoked from network); 30 Jun 2005 03:12:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Jun 2005 03:12:07 -0000 Received: (qmail 65617 invoked by uid 500); 30 Jun 2005 03:12:02 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 65572 invoked by uid 500); 30 Jun 2005 03:12:01 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 65498 invoked by uid 99); 30 Jun 2005 03:11:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2005 20:11:58 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of dr.nailz@gmail.com designates 64.233.162.196 as permitted sender) Received: from [64.233.162.196] (HELO zproxy.gmail.com) (64.233.162.196) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2005 20:12:01 -0700 Received: by zproxy.gmail.com with SMTP id n1so17397nzf for ; Wed, 29 Jun 2005 20:11:57 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=k59tNN2N6QCgZ/+jnaIzGdVLyEsW3S5kw38nxFqJKgX2Xfw4VU60gaybuYYnB7gXqAeEtPai94b3j5ktaAHynVoENOzWsiB7NALFWW75uY65JnqyK3SFvaM+rIMwIm0ZIbIaZ15g0UNMdU/jPniKr3RyPDOy3v5mBGCv/o7Gmeg= Received: by 10.36.36.14 with SMTP id j14mr104791nzj; Wed, 29 Jun 2005 20:11:57 -0700 (PDT) Received: by 10.36.82.19 with HTTP; Wed, 29 Jun 2005 20:11:57 -0700 (PDT) Message-ID: <2f0b68b5050629201132403507@mail.gmail.com> Date: Thu, 30 Jun 2005 13:11:57 +1000 From: dr_nailz Reply-To: Tom Clift To: user-java@ibatis.apache.org, lmeadors@apache.org Subject: Re: BindException on db call In-Reply-To: <2f0b68b505062801002f179af9@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <2f0b68b5050627204237ece853@mail.gmail.com> <2f0b68b505062801002f179af9@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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.=20 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 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? >=20 > I've only tried with JDBC... should I try with something else? >=20 > 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). >=20 > 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...) > ______ >=20 > 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: >=20 > java.net.BindException: Cannot assign requested address: JVM_Bind:8084 >=20 > (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. >=20 > Sorry if this is getting a bit off topic for this list - it now to not > be an issue with iBATIS at all. >=20 > dr_nailz >=20 > On 6/28/05, Larry Meadors 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 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 databas= e > > > (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 =3D (Member)sqlMap.queryForObject("getMember", new Integer(1))= ; > > > (a row exists in the db with PK value of 1, and the mapping for Membe= r > > > 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 appreciate= d! > > > > > > Cheers, > > > dr_nailz > > > > > >