We're updating the issue view to help you get more done. 

Transient MissingResourceException when using annotation processor

Description

We have just integrated hibernate-validator-annotation-processor into our build. Since then some of our Travis CI builds have started to fail randomly. A representative stack trace is the following:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile (default-testCompile) on project <redacted>: Fatal error compiling: CompilerException: InvocationTargetException: java.util.MissingResourceException: Can't find bundle for base name org.hibernate.validator.ap.ValidationProcessorMessages, locale en_US: Stream closed -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile (default-testCompile) on project analytics-event-listener-logic: Fatal error compiling at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:200) at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:196) at java.util.concurrent.FutureTask.run (FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511) at java.util.concurrent.FutureTask.run (FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624) at java.lang.Thread.run (Thread.java:748) Caused by: org.apache.maven.plugin.MojoExecutionException: Fatal error compiling at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:1140) at org.apache.maven.plugin.compiler.TestCompilerMojo.execute (TestCompilerMojo.java:181) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:200) at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:196) at java.util.concurrent.FutureTask.run (FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511) at java.util.concurrent.FutureTask.run (FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624) at java.lang.Thread.run (Thread.java:748) Caused by: org.codehaus.plexus.compiler.CompilerException at org.codehaus.plexus.compiler.javac.errorprone.JavacCompilerWithErrorProne.performCompile (JavacCompilerWithErrorProne.java:96) at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:1129) at org.apache.maven.plugin.compiler.TestCompilerMojo.execute (TestCompilerMojo.java:181) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:200) at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:196) at java.util.concurrent.FutureTask.run (FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511) at java.util.concurrent.FutureTask.run (FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624) at java.lang.Thread.run (Thread.java:748) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor171.invoke (Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.ja

(The stacktrace is not quite complete; this is probably due to Travis CI not retaining the last bit of output after receiving an error signal.)

A Google search turns up one other report of this issue. There the users decided to drop the annotation processor; we'd rather not do that.

We have a rather complicated Maven setup and since it's all private code I cannot share a simple reproduction case, but the maven-compiler-plugin configuration effectively amounts to the following:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.0</version> <configuration> <annotationProcessorPaths> <path> <groupId>org.immutables</groupId> <artifactId>value-processor</artifactId> <version>2.7.1</version> </path> <path> <groupId>org.hibernate.validator</groupId> <artifactId>hibernate-validator-annotation-processor</artifactId> <version>6.0.13.Final</version> </path> </annotationProcessorPaths> <compilerArgs> <arg>-Xdoclint:reference</arg> <arg>-Xlint:all</arg> <arg>-Xlint:-path</arg> <arg>-Xlint:-processing</arg> <arg>-Xlint:-serial</arg> <arg>-XepAllErrorsAsWarnings</arg> <arg>-XepAllDisabledChecksAsWarnings</arg> <arg>-XepDisableWarningsInGeneratedCode</arg> <arg>-Xep:BooleanParameter:OFF</arg> <arg>-Xep:CannotMockFinalClass:OFF</arg> <arg>-Xep:ConstructorInvokesOverridable:OFF</arg> <arg>-Xep:ConstructorLeaksThis:OFF</arg> <arg>-Xep:FieldMissingNullable:OFF</arg> <arg>-Xep:MethodCanBeStatic:OFF</arg> <arg>-Xep:ReturnMissingNullable:OFF</arg> <arg>-Xep:StaticOrDefaultInterfaceMethod:OFF</arg> <arg>-Xep:Var:OFF</arg> </compilerArgs> <compilerId>javac-with-errorprone</compilerId> <forceJavacCompilerUse>true</forceJavacCompilerUse> <showWarnings>true</showWarnings> <failOnWarning>true</failOnWarning> <maxmem>256m</maxmem> <parameters>true</parameters> <source>1.8</source> <target>1.8</target> <useIncrementalCompilation>false</useIncrementalCompilation> </configuration> <dependencies> <dependency> <groupId>com.google.errorprone</groupId> <artifactId>error_prone_core</artifactId> <version>2.2.0</version> </dependency> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-compiler-api</artifactId> <version>2.8.5</version> </dependency> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-compiler-javac</artifactId> <version>2.8.5</version> </dependency> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-compiler-javac-errorprone</artifactId> <version>2.8.5</version> </dependency> </dependencies> </plugin>

Our Travis CI build uses mvn -T 2; this concurrency aspect may be relevant.

Environment

  • Travis CI

  • Ubuntu 14.04.5 LTS

  • javac 1.8.0_151

  • Apache Maven 3.5.3

Status

Assignee

Unassigned

Reporter

Stephan Schroevers

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Affects versions

6.0.13.Final

Priority

Major