From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12052 invoked by alias); 8 Jun 2009 10:05:09 -0000 Received: (qmail 12044 invoked by uid 22791); 8 Jun 2009 10:05:07 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 08 Jun 2009 10:05:01 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n58A4tuO002013; Mon, 8 Jun 2009 06:04:56 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n58A4sUC032607; Mon, 8 Jun 2009 06:04:55 -0400 Received: from zebedee.pink (vpn-12-4.rdu.redhat.com [10.11.12.4]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n58A4rL4027940; Mon, 8 Jun 2009 06:04:53 -0400 Message-ID: <4A2CE244.9030702@redhat.com> Date: Mon, 08 Jun 2009 10:05:00 -0000 From: Andrew Haley User-Agent: Thunderbird 2.0.0.17 (X11/20081009) MIME-Version: 1.0 To: =?UTF-8?B?UGF0cmljayBTY2jDpGZlcg==?= CC: java@gcc.gnu.org Subject: Re: Compiling project using apache mina fails References: <123E4985-164D-41A0-A30C-5F8B5AAA4AA2@ekse.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2009-06/txt/msg00025.txt.bz2 Patrick Schäfer wrote: > hi andrew, thank you for looking into the stacktrace problem anyways! > > i have another problem running the code in gcj version 4.3.3 though. > > using jdk 1.5 the code runs just fine. > > using gcj I receive an exception when trying to access the local socket > port, though the connection has been successfully established (which I > can see on connected machine): > > java.lang.IllegalArgumentException: Bad port number: -1 > at java.net.InetSocketAddress.(libgcj.9.dylib) > at java.net.Socket.getLocalSocketAddress(libgcj.9.dylib) > at > org.apache.mina.transport.socket.nio.NioSocketSession.getLocalAddress(paa_mina) > > at > org.apache.mina.transport.socket.nio.NioSocketSession.getLocalAddress(paa_mina) > > at paa.networklayer.paaClient.getSessionLocalAddress(paa_mina) > > is it possible that the local port number isn't stored in libgcj after > connection establishment? > > would be great, if you had any idea what could be wrong. If I had a way to look at what was happening I'd just have a look. I don't know what class the Socket belongs to. At the call to Socket.getLocalSocketAddress, do something like println(socket) println(socket.getClass()) Andrew.