This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Compiling project using apache mina fails
- From: Andrew Haley <aph at redhat dot com>
- To: Patrick Schäfer <ps at ekse dot de>
- Cc: java at gcc dot gnu dot org
- Date: Fri, 05 Jun 2009 16:31:40 +0100
- Subject: Re: Compiling project using apache mina fails
- References: <123E4985-164D-41A0-A30C-5F8B5AAA4AA2@ekse.de>
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.