LibCBackedTerminalDetector throws exception on JamVM

Hi, I’m trying to integrate a java library into an embedded system. I’m currently using gradle 1.0 and my native environment has JamVM as the virtual machine. This is a thin native environment suitable for building openjdk for the target.

java -v reports something like this:

java version “1.5.0” JamVM version 1.6.0-devel Copyright © 2003-2012 Robert Lougher

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Build information:

Execution Engine: inline-threaded interpreter with stack-caching Compiled with: gcc 4.6.1

Boot Library Path: /home/gizero/Documents/research/denzil-build/tmp/sysroots/i686-linux/usr/lib/classpath Boot Class Path: /home/gizero/Documents/research/denzil-build/tmp/sysroots/i686-linux/usr/share/jamvm/

This environment causes gradle to except even on a simple “gradle -v” as follows:

FAILURE: Build aborted because of an internal error.

  • What went wrong: Build aborted because of an unexpected internal error. Please file an issue at:

  • Try: Run with --debug option to get additional debug info.

  • Exception is: org.gradle.internal.UncheckedException: java.lang.NoSuchFieldException

at org.gradle.internal.UncheckedException.throwAsUncheckedException(

at org.gradle.internal.nativeplatform.jna.LibCBackedTerminalDetector.isTerminal(

at org.gradle.logging.internal.OutputEventRenderer.addStandardOutputAndError(

at org.gradle.logging.LoggingServiceRegistry.createOutputEventRenderer(

at java.lang.reflect.VMMethod.invoke(Native Method)

at java.lang.reflect.Method.invoke(

at org.gradle.internal.service.DefaultServiceRegistry.invoke(

at org.gradle.internal.service.DefaultServiceRegistry.access$300(

at org.gradle.internal.service.DefaultServiceRegistry$FactoryMethodService.create(

at org.gradle.internal.service.DefaultServiceRegistry$ManagedObjectProvider.getInstance(

at org.gradle.internal.service.DefaultServiceRegistry$SingletonService.getService(

at org.gradle.internal.service.DefaultServiceRegistry$OwnServices.getService(

at org.gradle.internal.service.DefaultServiceRegistry.get(

at org.gradle.logging.LoggingServiceRegistry.(

at org.gradle.logging.LoggingServiceRegistry.newCommandLineProcessLogging(

at org.gradle.launcher.cli.CommandLineActionFactory.createLoggingServices(

at org.gradle.launcher.cli.CommandLineActionFactory.convert(

at org.gradle.launcher.Main.doAction(


at org.gradle.launcher.Main.main(

at java.lang.reflect.VMMethod.invoke(Native Method)

at java.lang.reflect.Method.invoke(

at org.gradle.launcher.ProcessBootstrap.runNoExit(


at org.gradle.launcher.GradleMain.main( Caused by: java.lang.NoSuchFieldException

at java.lang.Class.getDeclaredField(

at org.gradle.internal.nativeplatform.jna.LibCBackedTerminalDetector.isTerminal(

…23 more

Any idea how to further debug this? It looks like something wrong happening at the very beginning of execution. Running with --debug as suggested does not add any information.

TIA Andrea

It’s something that needs to be fixed on our side. I’ve raised GRADLE-2459 for this.