From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4216 invoked by alias); 5 Jun 2009 15:31:58 -0000 Received: (qmail 4198 invoked by uid 22791); 5 Jun 2009 15:31:56 -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; Fri, 05 Jun 2009 15:31:49 +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 n55FViVj026758; Fri, 5 Jun 2009 11:31:45 -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 n55FVg97025742; Fri, 5 Jun 2009 11:31:43 -0400 Received: from zebedee.pink (vpn-12-117.rdu.redhat.com [10.11.12.117]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n55FVfiB028797; Fri, 5 Jun 2009 11:31:41 -0400 Message-ID: <4A293A5C.9090202@redhat.com> Date: Fri, 05 Jun 2009 15:31:00 -0000 From: Andrew Haley User-Agent: Thunderbird 2.0.0.17 (X11/20081009) MIME-Version: 1.0 To: =?ISO-8859-1?Q?Patrick_Sch=E4fer?= CC: java@gcc.gnu.org Subject: Re: Compiling project using apache mina fails References: <123E4985-164D-41A0-A30C-5F8B5AAA4AA2@ekse.de> In-Reply-To: <123E4985-164D-41A0-A30C-5F8B5AAA4AA2@ekse.de> Content-Type: text/plain; charset=ISO-8859-1 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/msg00018.txt.bz2 Patrick Schäfer wrote: > I am trying to compile a project using the apache mina library to native > code using gcj. I succeeded building the native library but the program > fails with an exception while trying to access VMThreadMXBeanImpl. > getThreadInfoForId(): > > java.lang.UnsupportedOperationException: > gnu::java::lang::management::VMThreadMXBeanImpl::getThreadInfoForId > (jlong, jint) not implemented > at > gnu.java.lang.management.ThreadMXBeanImpl.getThreadInfo(libgcj.9.dylib) > at java.lang.reflect.Method.invoke(libgcj.9.dylib) > at java.lang.Thread.getStackTrace(libgcj.9.dylib) This is a bug in libgcj. There really is no good reason that Thread.getStackTrace() should be calling ManagementFactory.getThreadMXBean().getThreadInfo().getStackTrace(). Please try replacing the call to Thread.getStackTrace() with new Throwable().getStackTrace(). Andrew.