J'essaie de créer un mojo de base (juste bonjour le monde). Cependant, lorsque j'essaie de compiler le plugin maven, la JVM se bloque comme ceci :
[INFO] --- maven-plugin-plugin:3.3:descriptor (default-descriptor) @ xyz-compiler-plugin ---
[INFO] Using 'UTF-8' encoding to read mojo metadata.
[INFO] Applying mojo extractor for language: java
[INFO] Mojo extractor for language: java found 0 mojo descriptors.
[INFO] Applying mojo extractor for language: bsh
[INFO] Mojo extractor for language: bsh found 0 mojo descriptors.
[INFO] Applying mojo extractor for language: java-annotations
[INFO] Mojo extractor for language: java-annotations found 1 mojo descriptors.
2016-06-13 22:14:58.813 java[36254:2194441] Apple AWT Internal Exception: Critical error: required built-in appearance SystemAppearance not found
2016-06-13 22:14:58.814 java[36254:2194441] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Critical error: required built-in appearance SystemAppearance not found'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff9997a4f2 __exceptionPreprocess + 178
1 libobjc.A.dylib 0x00007fff8f27bf7e objc_exception_throw + 48
2 CoreFoundation 0x00007fff999e14bd +[NSException raise:format:] + 205
3 libdispatch.dylib 0x00007fff8f7a640b _dispatch_client_callout + 8
4 libdispatch.dylib 0x00007fff8f7a6303 dispatch_once_f + 67
5 AppKit 0x00007fff981c12ad +[NSAppearance _defaultAppearance] + 22
6 AppKit 0x00007fff981c113b +[NSAppearance appearanceNamed:] + 24
7 AppKit 0x00007fff981c09ee +[NSWindow initialize] + 166
8 libobjc.A.dylib 0x00007fff8f2723c8 _class_initialize + 711
9 libobjc.A.dylib 0x00007fff8f271d08 lookUpImpOrForward + 179
10 libobjc.A.dylib 0x00007fff8f26c591 objc_msgSend + 209
11 AppKit 0x00007fff981c05ed +[NSApplication initialize] + 719
12 libobjc.A.dylib 0x00007fff8f2723c8 _class_initialize + 711
13 libobjc.A.dylib 0x00007fff8f272156 _class_initialize + 85
14 libobjc.A.dylib 0x00007fff8f271d08 lookUpImpOrForward + 179
15 libobjc.A.dylib 0x00007fff8f26c591 objc_msgSend + 209
16 libawt_lwawt.dylib 0x0000000125cef2dc -[AWTStarter starter:] + 266
17 Foundation 0x00007fff8a0b3f5e __NSThreadPerformPerform + 279
18 CoreFoundation 0x00007fff9990f881 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
19 CoreFoundation 0x00007fff998eefbc __CFRunLoopDoSources0 + 556
20 CoreFoundation 0x00007fff998ee4df __CFRunLoopRun + 927
21 CoreFoundation 0x00007fff998eded8 CFRunLoopRunSpecific + 296
22 java 0x0000000103edc463 CreateExecutionEnvironment + 871
23 java 0x0000000103ed81ac JLI_Launch + 1952
24 java 0x0000000103ede4c0 main + 101
25 java 0x0000000103ed7a04 start + 52
26 ??? 0x000000000000000c 0x0 + 12
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
Le projet a un projet POM parent. J'ai essayé de compiler à partir d'IntelliJ et du terminal mais le problème reste le même.
Ma classe est très simple
@Mojo(name="test")
public class BasicMojo extends AbstractMojo
{
public void execute() throws MojoExecutionException
{
getLog().info( "Hello, this is a test." );
}
}
Mes dépendances POM ressemblent à ceci :
<dependencies>
<dependency>
<groupId>com.xyz.network.tools</groupId>
<artifactId>xyz-compiler</artifactId>
<version>${micro.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.4</version>
</dependency>
</dependencies>
Des indices?
2 réponses
En fait, j'ai trouvé le problème. J'ai défini une variable d'environnement appelée NEXT_ROOT et cela pose problème. Si je le désactive avant d'exécuter mon programme Java, je n'obtiens pas cette exception. Merci à tous pour votre aide.
Vous manquez peut-être de mémoire, ce qui oblige le système à envoyer des messages à faible mémoire aux contrôleurs de vue instanciés. L'implémentation par défaut de -didReceiveMemoryWarning efface la variable membre de la vue. En théorie, la prochaine fois que la vue est requise, elle devrait être réinstanciée, mais vous avez peut-être remplacé quelque chose qui l'empêche.
Questions connexes
De nouvelles questions
java
Java est un langage de programmation de haut niveau. Utilisez cette balise lorsque vous rencontrez des problèmes pour utiliser ou comprendre la langue elle-même. Cette balise est rarement utilisée seule et est le plus souvent utilisée en conjonction avec [spring], [spring-boot], [jakarta-ee], [android], [javafx], [hadoop], [gradle] et [maven].